redhat-developer / redhat-developer/vscode-java
Maven settings file is ignored and dependencies are not downloaded
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra lệnh thông tin dependency được hiển thị trong log và cách lệnh này đọc java.configuration.maven.globalSettings và settings.xml. Tái hiện việc tra cứu cây dependency với một profile Maven của doanh nghiệp; được xem là hoàn tất khi các dependency của doanh nghiệp được phân giải thay vì chỉ được tìm kiếm trong Maven Central.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100