desruisseaux commented on PR #273:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/273#issuecomment-2657332053

   I think that we should not provide `--module-version` parameter for the test 
classes. We are restricted to only one module version per `module-info.class` 
file, and that file is in the main code. I realize that we have documentation 
in the Maven web site suggesting to provide a `module-info` in the tests also, 
but I think that we should deprecate this practice because of its drawback. For 
example, this approach (overwriting the `main/module-info.java` with 
`test/module-info.java`) requires that Maven plugins put the project 
upside-down, with the test classes declared as the main project and the real 
main classes declared as patches applied on the tests. There is better 
alternatives, such as generating the `--patch-module` parameters automatically.
   
   Therefore, if you agree to move `moduleVersion` into `CompilerMojo`, I 
suggest that you do it in this pull request.


-- 
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]

Reply via email to