Skip to content

Maven import fails with Nisse + Maven Tiles on VS Code Java 1.46.0 (works on 1.45.0) #4214

Description

@lfvJonas

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

  1. Clone the two minimal reproduction repositories:

  2. Install the tile locally:

    mvn clean install
  3. 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.1

    The 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:...
    
  4. Set the MAVEN_OPTS environment variable using that output:

    export MAVEN_OPTS="-Dnisse.source.jgit.dynamicVersion=true -Dmaven.ext.class.path=${output form previous command}"
  5. Verify that the project builds successfully on the command line:

    mvn clean install
  6. Open vscode-issue-example-project in 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

vscode-1-46-0.log
vscode-1-45-0.log

Activity

  1. lfvJonas commented on Nov 3, 2025

    @lfvJonas
    Author

    Any news on this?

  2. fbricon commented on Nov 3, 2025

    @fbricon
    Collaborator

    @snjeza could you please investigate?

  3. self-assigned this
    on Nov 3, 2025
  4. snjeza commented on Nov 10, 2025

    @snjeza
    Collaborator

    This is an upstream m2e issue.
    Could you try the following patch against vscode-issue-example-project:

    diff --git a/pom.xml b/pom.xml
    index 94bee26..4a55342 100644
    --- a/pom.xml
    +++ b/pom.xml
    @@ -15,11 +15,16 @@
     
            <build>
                    <plugins>
    +                       <plugin>
    +                               <groupId>eu.maveniverse.maven.nisse</groupId>
    +                               <artifactId>extension3</artifactId>
    +                               <version>0.6.2</version>
    +                               <extensions>true</extensions>
    +                       </plugin>
                            <plugin>
                                    <groupId>io.repaint.maven</groupId>
                                    <artifactId>tiles-maven-plugin</artifactId>
                                    <version>2.41</version>
    -                               <extensions>true</extensions>
                                    <configuration>
                                            <filtering>false</filtering>
                                            <tiles>
    
    
  5. fbricon commented on Nov 10, 2025

    @fbricon
    Collaborator

    @snjeza do you have a link to the corresponding m2e issue?

  6. snjeza commented on Nov 10, 2025

    @snjeza
    Collaborator

    @fbricon No, I don't have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions