Le 2024-10-24 à 08 h 20, Guillaume Nodet a écrit :

Is there any technical reason why we could not port those ?

About MCOMPILER-542 (a workaround that modified the module-info.class generated by javac versions before Java 22), there is no technical reason apart a desire to reduce dependencies and to avoid transforming compiler outputs without user's acknowledgement (I was surprised to discover that Maven rewrites some class files generated by javac). Especially since previously, Maven modified the module-info.class files only if reproducible built was enabled. But now that reproducible build is enabled by default, Maven will modify the module-info.class practically always when compiling with a JDK prior to Java 22. I don't know if all users are comfortable with that. If no concern are expressed, I can put MCOMPILER-542 back this weekend.

About not trying anymore to be clever regarding -source versus -release options, there is good chance that this issue is mot since Maven 4 requires Java 17 for execution. Therefore, users should not have reason to use -source anymore. The concern expressed by Jorge is that asking users to add empty <source/> and <target/> elements in the plugin configuration compromise usability. I agree, but adding those empty elements should be needed only if the user inherited those elements (non-empty) from a parent POM, so they need to override them. Whether it happens often or not is something that we could discover with the beta.

Generally, the rewritten plugin has a policy of not overwriting Java defaults with Maven's own opinion of what the default should have been. A goal is to make Maven more easily predictable for peoples who are familiar with javac options. But this is part of the things that can be revisited according user's feedback.

    Martin

Reply via email to