Maven import fails with Nisse + Maven Tiles on VS Code Java 1.46.0 (works on 1.45.0)
維護者通常 4 天內回覆
@snjeza 已經在處理了。
開始於 2025年11月3日。
評估
這個 Issue 還沒有評估資料。
描述
Bug: Maven import fails with Nisse + Maven Tiles on VS Code Java 1.46.0 (works on 1.45.0)
Summary
When opening a Maven project that uses both Nisse dynamic versioning (Maven Core Extension) and Maven Tiles, the Red Hat Java language server fails to import the project on VS Code Java extension 1.46.0 (JDT LS 1.51.0).
- ✅ Using only Nisse works fine.
- ✅ Using only Maven Tiles works fine.
- ❌ The issue occurs only when Nisse and Maven Tiles are used together.
This appears to be a regression in how JDT LS handles Maven model building when multiple Maven extensions (provided via maven.ext.class.path) interact during the import phase.
Reproduction Steps
-
Clone the two minimal reproduction repositories:
- Tile project: https://github.com/lfvJonas/vscode-issue-example-tile
- Main project: https://github.com/lfvJonas/vscode-issue-example-project
-
Install the tile locally:
mvn clean install -
Generate the required Nisse Maven extension classpath to MAVEN_OPTS:
mvn eu.maveniverse.maven.plugins:toolbox:0.14.0:gav-classpath -Dgav=eu.maveniverse.maven.nisse:extension3:0.6.1The output will look something like this:
[INFO] /home/<user>/.m2/repository/eu/maveniverse/maven/nisse/extension3/0.6.1/extension3-0.6.1.jar:/home/<user>/.m2/repository/eu/maveniverse/maven/nisse/core/0.6.1/core-0.6.1.jar:... -
Set the
MAVEN_OPTSenvironment variable using that output:export MAVEN_OPTS="-Dnisse.source.jgit.dynamicVersion=true -Dmaven.ext.class.path=${output form previous command}" -
Verify that the project builds successfully on the command line:
mvn clean install -
Open
vscode-issue-example-projectin VS Code with the Red Hat Java extension 1.46.0, and wait for import.
Expected Behavior
The project should import successfully (as it does with version 1.45.0).
Actual Behavior (only on 1.46.0)
Project import fails during Maven model building with:
org.apache.maven.model.building.ModelBuildingException: ... effective model for com.example:demo:${nisse.jgit.dynamicVersion}
[WARNING] 'version' contains an expression but should be a constant. @ line 9, column 11
[ERROR] 'version' must be a constant version but is '${nisse.jgit.dynamicVersion}'. @ line 9, column 11
at io.repaint.maven.tiles.TilesMavenLifecycleParticipant.thunkModelBuilder(...)
at io.repaint.maven.tiles.TilesMavenLifecycleParticipant.orchestrateMerge(...)
at io.repaint.maven.tiles.TilesMavenLifecycleParticipant.afterProjectsRead(...)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.executeParticipants(...)
Key observations
- ✅ Using only Nisse → Works fine.
- ✅ Using only Maven Tiles → Works fine.
- ❌ Using Nisse + Maven Tiles together → Fails only on VS Code Java 1.46.0.
The same setup works perfectly with VS Code Java 1.45.0, suggesting a regression in 1.46.0 affecting how multiple Maven extensions are applied during model resolution.
Environment
| Component | Version / Info |
|---|---|
| OS | Ubuntu 24.04 |
| JDK | Eclipse Adoptium Temurin 21.0.8 |
| VS Code Java Extension | 1.46.0 (broken) / 1.45.0 (works) |
| JDT LS | 1.51.0.202510021738 (with 1.46.0) / 1.50.0.202509040211 (with 1.45.0) |
| Build System | Maven + Maven Tiles + Nisse |
| Nisse version | 0.6.1 |
Logs
- 主要語言
- TypeScript
- 星號
- 2.3k
- 分支
- 547
- 平均合併
- 5 小時 36 分鐘
- 30 天內合併 PR
- 10
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
redhat-developer/vscode-java 的其他 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
redhat-developer/vscode-java#4511 ·
維護者通常 4 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
redhat-developer/vscode-java#4426 ·
維護者通常 4 天內回覆
-
bug
難度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4506 · 6 則留言 · 4 個 reaction ·
維護者通常 4 天內回覆
-
bug
難度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4505 · 5 則留言 · 2 個 reaction ·
維護者通常 4 天內回覆
-
難度 4/5 3-5 天 新手友好度 52/100
redhat-developer/vscode-java#4504 · 3 則留言 · 1 個 reaction ·
維護者通常 4 天內回覆
查看 redhat-developer/vscode-java 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
opengovsg/FormSG#10118 · 1 則留言 ·
維護者通常 1 天內回覆
-
ai-driven-qa bug claude
難度 1/5 1 小時以內 新手友好度 75/100
linagora/twake-calendar-frontend#1434 · 1 則留言 ·
維護者通常 1 天內回覆
-
check:passed streams:add
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
難度 2/5 半天 新手友好度 78/100
jaegertracing/jaeger-ui#4512 ·
維護者通常 1 天內回覆
-
area:ide documentation enhancement platform:macos platform:vscode
難度 1/5 1-3 小時 新手友好度 88/100
anthropics/claude-code#97389 ·
維護者通常 1 天內回覆