redhat-developer / redhat-developer/vscode-java

Maven settings file is ignored and dependencies are not downloaded

未关闭
#3,185 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
2.3k
派生
546
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

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
  1. 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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查日志中显示的依赖信息命令,以及它如何读取 java.configuration.maven.globalSettings 和 settings.xml。使用企业 Maven 配置文件复现依赖树查找;完成标准是企业依赖能够被解析,而不是仅在 Maven Central 中搜索。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
build-system
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。