desruisseaux commented on PR #11639: URL: https://github.com/apache/maven/pull/11639#issuecomment-3864616921
The generation of a consumer POM derived from the project POM is fully in Maven core, which is the reason for this pull request. The POM files generated by pull request 508 are different: they are not derived from a project's POM. Instead, they are derived from `module-info.class` files, together with the project POM which is used as the parent (which is the reason why we need to remove its dependencies). The generation of POM files derived from `module-info.class` files is done by the Maven JAR Plugin because this plugin is in a particular situation. Most Java tools accept module hierarchy in their `--module-path` option. Therefore, the `javac` output produced by the Maven Compiler Plugin can be seen as a single output by `java` and `javadoc` among others, even if that output contains many modules. But the `jar` tool is an exception, because each JAR file contains a single module. This constraint is desirable anyway for smaller downloads. Therefore, the Maven JAR Plugin is particular in that it needs to separate modules, contrarily to plugins based on `java`, `javac` or `javadoc` (among others). Since the Maven JAR Plugin needs to analyse the Maven Compiler Plugin output for dispatching it in different modules, it has information that Maven core does not have easily. Therefore, Maven JAR Plugin is a good place for generating POM *derived from module-info*, while Maven core is fully in charge of generating POM *derived from project POM*. -- 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]
