desruisseaux commented on PR #11639:
URL: https://github.com/apache/maven/pull/11639#issuecomment-3777643070

   Just in case there is an ambiguity, `<dependencyManagement>` is untouched. 
Only `<dependencies>` is removed, and only for module source hierarchy. 
Classical projects (package hierarchy) stay as before, even if the project 
contains a `module-info` file.
   
   In the case of multi-module projects, there is a choice:
   
   1. The POM of each Java module can be a *copy* of the project `pom.xml` with 
dependencies filtered for keeping only the dependency actually used in 
`module-info`.
   2. The POM of each Java module can declare the project `pom.xml` as its 
parent, then declare the dependencies actually used in `module-info`.
   
   In approach 1, the content of the project `pom.xml` does not matter much as 
that POM is totally ignored after the build (but preventing its deployment on a 
repository would be useful, as it would be noise). This pull request could be 
ignored.
   
   However, approach 1 leads to a lot of duplication in the POM of each Java 
module. For that reason, I'm now more inclined to approach 2. It also appears 
to be simpler, because it removes the need to duplicate the work of Maven core 
into the JAR plugin (because we can inherit the effective POM generated by 
Maven core). However, approach 2 can work only if we remove `<dependencies>` 
from the parent  `pom.xml` for making possible to declare smaller set of 
dependencies in the child POM of each Java module.


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