Enhancement: read the Java version from `maven-compiler-plugin` `<release>` / `<source>` configuration
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- java, typescript
调研方向
从 src/core-open/scanners/java-scanner.ts 中的 parsePom 开始,阅读代码如何检查 POM 属性并调用 resolveProperty。为 build.plugins 和 build.pluginManagement.plugins 下编译器插件的 release、source 和 target 设置补充测试,包括属性引用。运行相关的 Java scanner 测试;当插件值能够被识别且 maven.compiler.release 属性仍然优先时,任务即告完成。
由索引模型根据 Issue 内容生成。
描述
Context
parsePom in src/core-open/scanners/java-scanner.ts (around line 188) only looks for the Java version in <properties>: java.version, maven.compiler.source, maven.compiler.target, maven.compiler.release and java.source.version.
Plenty of POMs set it on the compiler plugin instead:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>17</release>
</configuration>
</plugin>
</plugins>
</build>
Those projects get no Java runtime in vg scan, so runtime drift and EOL status are missing for them.
What to do
- When no property gave a version, look for
maven-compiler-pluginunderbuild.plugins.pluginandbuild.pluginManagement.plugins.plugin(one plugin or an array). - Read
configuration.releasefirst, thenconfiguration.source, thenconfiguration.target. - Run the value through
resolvePropertyso<release>${jdk.version}</release>works when the property exists. - Add tests for each form, including a property reference.
Acceptance
- A POM whose only Java version is
<release>17</release>onmaven-compiler-pluginreports Java 17 -
<source>11</source>is used when<release>is absent - A
maven.compiler.releaseproperty still wins over plugin configuration - A property reference in the plugin configuration is resolved
- 主要语言
- TypeScript
- 星标
- 4
- 派生
- 3
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 76
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vibgrate/cli 的其他 Issue
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
相似的 Issue
-
documentation Entwickler
难度 1/5 1 小时以内 新手友好度 89/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:frontend bug ci-test level:low priority:high
难度 2/5 1-3 小时 新手友好度 75/100
skytuhua-org/Gen-V1#2974 · 4 条评论 ·
维护者通常 2 天内回复
-
area: cli area: core priority: P3 type: bug
难度 2/5 1-3 小时 新手友好度 75/100
appandflow/stim#6736 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
naomiaro/waveform-playlist#973 ·
维护者通常 1 天内回复