Hello Alexander
I would said that this is a bug. I don't know if the Maven 3 compiler
would be modified, maybe for compatibility reasons. But we can try to
make the Maven 4 compiler stricter.
Martin
Le 2025-04-28 à 14 h 00, Alexander Bubenchikov a écrit :
Hi. The documentation for compiler plugin states that compilerArgs
can accept a list of strings. The example suggests variant like
-----
<compilerArgs>
<arg>-Xmaxerrs</arg>
<arg>1000</arg>
<arg>-Xlint</arg>
<arg>-J-Duser.language=en_us</arg>
</compilerArgs>
----
see
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerArgs
TIL that any inner tag is accepted (because compilerArgs property in
AbstractCompilerMojo annotated with @Parameter) and configuration like
-----
<compilerArgs>
<myArgument>-Xmaxerrs</myArgument >
<anotherName>1000</anotherName >
<oneMoreName>-Xlint</oneMoreName>
<andMore>-J-Duser.language=en_us</andMore>
</compilerArgs>
-----
have exactly the same effect as above. One can check it running
compilation with -X flag
Could anyone tell me, is it an expected behaviour, and is it an issue
in Javadoc (I think it worth documenting), or the second configuration
should be treated as invalid?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org