[
https://issues.apache.org/jira/browse/MNG-6748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16918081#comment-16918081
]
Robert Scholte commented on MNG-6748:
-------------------------------------
The challenge you'll face is the following: somebody wants to add module1 as a
dependency to his project. The "common" dependency is a transitive dependency,
but what is its version? It cannot be solved via inheritence.
One way to solve this is by using a [bom
file|https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies]
but in case of just 1 dependency it is acutally overhead.
> Aggregate pom to set properties for all modules
> -----------------------------------------------
>
> Key: MNG-6748
> URL: https://issues.apache.org/jira/browse/MNG-6748
> Project: Maven
> Issue Type: New Feature
> Reporter: Allyn Tobey
> Priority: Major
>
> It would be nice to be able to pass properties from an aggregate pom to
> module poms during a build.
> Example: A project with 2 modules with different parent poms from the
> aggregate and want to share a version of a common dependency. The dependency
> is not available from the parent perspective. Each module would have to have
> a full GAV for a dependency, but could share the version so they will match.
>
> Proposed Solution: Any property given in the aggregate pom would be available
> (and overwrite matching child module properties) to the child modules during
> build process.
>
> Another
> [example|[https://stackoverflow.com/questions/52379013/how-to-set-environment-variable-in-maven-aggregator-without-inheritance-to-be-re]]
> with similar expectations.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)