slachiewicz opened a new issue, #215: URL: https://github.com/apache/maven-verifier/issues/215
`Embedded3xLauncher` looks up `doMain(String[], String, PrintStream, PrintStream)` on the main class of the Maven home it is given ([Embedded3xLauncher.java](https://github.com/apache/maven-verifier/blob/master/src/main/java/org/apache/maven/shared/verifier/Embedded3xLauncher.java)). Maven 4's main class is `org.apache.maven.cling.MavenCling`, which has `main(String[], ClassWorld)` and no `doMain`, so the lookup ends in `NoSuchMethodException` and the verifier throws `LauncherException: Failed to initialize Laucher`. Seen in this repository's own tests on Maven 4.0.0-rc-6 (#214, job [ubuntu-latest jdk-21-zulu 4.0.0-rc-6](https://github.com/apache/maven-verifier/actions/runs/35515095018/job/106089796220)): `Embedded3xLauncherTest.testWithMavenHome` and `VerifierTest.useRealLogFile`. It also takes every maven-surefire IT down on Maven 4, because those run the verifier embedded (apache/maven-surefire#3481, 2238 occurrences of the same `NoSuchMethodException` in one job). The forked launcher is unaffected. Options: fall back to `forkJvm` when the main class has no `doMain`, or add a Maven 4 embedded launcher on top of the `org.apache.maven.api.cli.Invoker` API. Until one of these lands, the Maven 4 jobs are excluded from the matrix in #214. -- 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]
