Hello Guillaume
Thanks for the fix, it worked. But I found another issue with RC-5:
https://github.com/apache/maven/pull/11428
For the two JUnit tests that failed, this is an issue caused by #2505
but not necessarily a Maven Core problem. I made a workaround in the plugin:
https://github.com/apache/maven-compiler-plugin/pull/991
With those two fixes, JUnit tests and integration tests seem to pass.
Martin
Le 10/11/2025 à 12:31, Guillaume Nodet a écrit :
Here's a fix https://github.com/apache/maven/pull/11425
However, when running the m-compiler-p unit tests with this fix in
master, I still have two failing unit tests. Martin, can you have a
quick look in case you see something ?
[ERROR] Errors:
[ERROR] CompilerMojoTestCase.testCompilerFork:230 »
CompilationFailure Cannot compile
myGroupId:myArtifactId:jar:1.0-SNAPSHOT test classes.
[ERROR] CompilerMojoTestCase.testModularProject:331 »
CompilationFailure Cannot compile
myGroupId:myArtifactId:jar:1.0-SNAPSHOT test classes.
The first error is: module not found: foo.bar
Le lun. 10 nov. 2025 à 11:14, Guillaume Nodet <[email protected]> a
écrit :
So the problem is coming from the fact that the MojoExtension is
creating a config for the plugin with the following snippet:
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>${project.basedir}/src/test/java
</compileSourceRoots>
merging the value from the xml, and from the @MojoParameter
annotation.
At injection, with rc-4, the xml was converted to an
XmlPlexusConfiguration and injected correctly.
In rc-5, the injection of this config snippet does not work anymore.
This is a regression caused by
https://github.com/apache/maven/commit/d3bd71bbdf2e88f1674b4e977a7c8c5547df9e1b,
and in particular, the
EnhancedCompositeBeanHelper#setFieldValue which wrongly caches
field accessibility.
However, the input still looks very wrong, but the MojoExtension
does not provide a way to inject complex values at the moment.