jafarre-bi commented on PR #698:
URL: https://github.com/apache/commons-vfs/pull/698#issuecomment-3042908620

   > The link in the description is not to the Jira issue.
   
   Fixed
   
   > 
   > So far this doesn't seem to be what Maven recommends, or am I missing 
something?
   
   This is from [Maven 
documentation](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Bill_of_Materials_.28BOM.29_POMs):
   _The root of the project is the BOM POM. It defines the versions of all the 
artifacts that will be created in the library. Other projects that wish to use 
the library should import this POM into the dependencyManagement section of 
their POM._
   and
   _The parent subproject has the BOM POM as its parent. It is a normal 
multiproject pom._
   
   This can't be done in Apache Commons projects because they need to inherit 
from org.apache.commons:commons-parent.
   We also can't make the BOM inherit from commons-parent because it would also 
inherit unwanted dependency management, namely, junit and mockito. Avoiding 
this implies removing the dependency management section from commons-parent, 
which implies adding it to the parent of every single project under it.
   
   The solutions I can think of are:
   
   1. Leave things the way they are. Then, the only way to fix the problem 
would be to remove the dependency management section from commons-vfs2-parent. 
You would still be inheriting unwanted dependency management from 
commons-parent.
   2. Follow the Maven documentation recommendations. Then the BOM will inherit 
from commons-parent, and commons-vfs2-parent will inherit from the BOM. You 
would still be inheriting unwanted dependency management from commons-parent.
   3. Modify the BOM so that it does not have a parent, and keep it within the 
reactor. This way, you don't have the option to import the BOM into the 
parent's dependency management section.
   4. Modify the BOM so that it does not have a parent, remove it from the 
reactor, and import it into the parent. But then you need to build the BOM 
independently of (and before) the other modules.
   
   This draft PR implements option 3, but any option is acceptable for me.


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