redhat-developer / redhat-developer/vscode-java
${project.basedir} in pom.xml interpreted wrongly to a wrong absolute path in Windows 10.
Open
Nobody has claimed this yet.
bug
configuration
Maven
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Environment
- Operating System: Windows 10
- JDK version: 14
- Visual Studio Code version: 1.63.2
- Java extension version: 0.20.0 (Extension pack)
Steps To Reproduce
- Set
sourceDirectoryinpom.xmlto${project.basedir} - Update project and use the command palette to open
Java: Configure Classpath. - See the result.
- Change
${project.basedir}to${project.basedir}/srcor anyone else. Repeat the steps above and see result.
[Sample project reproducing the error]https://github.com/Berkeley-CS61B/skeleton-sp21/tree/master/lab2setup
Current Result
${project.basedir}is interpreted as a fake absolute path. For example:Users\aoliu\OneDrive\Projects\cs61b-sp21\lab2setupwhich should beC:\Users\aoliu\OneDrive\Projects\cs61b-sp21\lab2setupin Windows 10.${project.basedir}\srcor other path that under the basedir is correctly interpreted. For example:${project.basedir}\srcis interpreted assrc, a relative path.

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked sample project and reproduce the issue using the Java: Configure Classpath command on Windows 10. Compare how ${project.basedir} and ${project.basedir}/src are resolved; done means the basedir retains its Windows drive letter and produces the correct classpath.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100