redhat-developer / redhat-developer/vscode-java
Maven settings file is ignored and dependencies are not downloaded
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Company-specific dependencies from a corporate Nexus are not downloaded.
Environment
- Operating System: Windows
- JDK version: 8
- Visual Studio Code version: 1.79
- Java extension version: 1.20. 1.21 (pre-release)
Steps To Reproduce
- Load a Maven project with dependencies from a corporate repository specified by a profile in settings.xml file
Current Result
The company-specific dependencies are not loaded
Expected Result
All the dependencies shall be loaded
Additional Informations
In the Output window, following log appears:
CMD :"c:\Users\4637965_software\apache-maven-3.9.1\bin\mvn" --quiet clean -f "c:\Users\4637965_work\projects<project>\pom.xml" && "c:\Users\4637965_software\apache-maven-3.9.1\bin\mvn" --quiet org.apache.maven.plugins:maven-dependency-plugin:3.0.2:tree -f "c:\Users\4637965_work\projects<project>\pom.xml" -DoutputFile="c:\Users\4637965_work\projects<project>\target\dependencies.txt" -DoutputType=dot -DappendOutput=true
STDOUT : [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.0.2:tree (default-cli) on project : Cannot build project dependency graph: Could not resolve nor collect following dependencies: []: ...Could not find artifact ... in central (https://repo.maven.apache.org/maven2) -> [Help 1]
It seems like when the project dependency information is read, the settings like java.configuration.maven.globalSettings are not applied at all. Because the settings.xml file is not used in the command mentioned in the logs above.
Maven build works fine, and Microsoft's "Maven for Java" plugin also works just fine. The problem is only with the Java support plugin by RedHat.
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 by examining the dependency-information command shown in the logs and how it reads java.configuration.maven.globalSettings and settings.xml. Reproduce the dependency tree lookup with a corporate Maven profile; done means the corporate dependencies are resolved instead of being searched only in Maven Central.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100