redhat-developer / redhat-developer/vscode-java
Compilation error : Java is picking wrong version for dependency resolution for gradle projects
未关闭
还没有人认领这个 Issue。
upstream
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
[Java is picking wrong version for dependency resolution for gradle projects]
Environment
- Operating System: MAC M1
- JDK version: 17
- Visual Studio Code version: latest
- Java extension version: latest
Steps To Reproduce
My Project is working with intellij but not in the vscode
(check image below)also the junit 4.3 is registed as dependency in the nested project build.gradle file and 4.2 is transitive dependency
the transitive dep is prioritizing the the registered version
because of this im getting errors in java file
- [step 1] create a gradle nested project and add same dependency (transitive) with different versions
- [step 2] this plugin is resolving the lowest version of plugin instead of greatest version of above
Current Result
Expected Result
4.3 should be taken priority than 4.2
Additional Informations
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 macOS 上使用 JDK 17,通过遵循嵌套项目 build.gradle 中描述的依赖声明,复现这个问题。将直接 4.3 依赖和传递 4.2 依赖解析出的版本与 IntelliJ 和 VS Code 进行比较。当 VS Code 解析并使用 4.3,且不再出现报告的 Java 文件错误时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript
- 领域
- build-system, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100