facewindu opened a new issue, #1901: URL: https://github.com/apache/maven-mvnd/issues/1901
With the current mvnd-1.x snapshot (1.0.7-SNAPSHOT, built 2026-11-02), any build that uses maven-surefire-plugin 3.0.0-M5 fails before running its tests: ``` [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project repro-m5: Unable to parse configuration of mojo org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test for parameter forkNode: Cannot set 'forkNode' in class org.apache.maven.plugin.surefire.SurefirePlugin: org/apache/maven/surefire/api/fork/ForkNodeArguments: org.apache.maven.surefire.api.fork.ForkNodeArguments ``` The same build passes with `-Dmvnd.testProgress=false`, and it passes with Surefire 3.0.0-M6. It started with #1670. ### Cause `MvndTestProgressLifecycleParticipant` adds `<forkNode implementation="org.mvndaemon.mvnd.forknode.MvndForkNodeFactory">` to the Surefire and Failsafe configuration whenever `supportsForkNode` returns true, which it does from 3.0.0-M5 on. `MvndForkNodeFactory` is compiled against Surefire 3.5.2 and uses `org.apache.maven.surefire.api.fork.ForkNodeArguments` and `org.apache.maven.surefire.api.event.*`. Those packages first ship in 3.0.0-M6. In 3.0.0-M5 the class is `org.apache.maven.surefire.extensions.ForkNodeArguments`, in `surefire-extensions-api`. Raising the minimum in `supportsForkNode` to 3.0.0-M6 should fix it. The 2.x port in #1713 has the same check. ### Reproducer `pom.xml`: ```xml <project xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <groupId>demo</groupId> <artifactId>repro-m5</artifactId> <version>1.0</version> <properties> <maven.compiler.release>8</maven.compiler.release> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.2</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.13.0</version> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>${surefire.version}</version> </plugin> </plugins> </build> </project> ``` `src/test/java/demo/DemoTest.java`: ```java package demo; import org.junit.Test; public class DemoTest { @Test public void passes() { } } ``` | Command | Result | |---|---| | `mvnd clean test -Dsurefire.version=3.0.0-M5` | fails with the error above | | `mvnd clean test -Dsurefire.version=3.0.0-M5 -Dmvnd.testProgress=false` | passes | | `mvnd clean test -Dsurefire.version=3.0.0-M6` | passes | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
