maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Porter (JIRA)" <j...@codehaus.org>
Subject [jira] Reopened: (MNG-3146) POM properties overriden by POM of dependend artifact
Date Mon, 29 Jun 2009 07:23:06 GMT

     [ http://jira.codehaus.org/browse/MNG-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brett Porter reopened MNG-3146:
-------------------------------


> POM properties overriden by POM of dependend artifact
> -----------------------------------------------------
>
>                 Key: MNG-3146
>                 URL: http://jira.codehaus.org/browse/MNG-3146
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6
>            Reporter: Jörg Hohwiller
>
> In my project I use properties (in pom.xml: properties tag, profiles, filters) to avoid
redundancies (e.g. versions of artifacts used in various modules) or to make decisions that
depended on the environment (e.g. platform specific artifacts). This worked fine for me and
I was happy until now, because I found a bug in maven:
> If an artifact is referenced as dependency that defines the same property, it overwrites
the property. This behavior is IMHO inacceptable.
> To avoid missunderstandings I try to say the same again with other words as example:
> I have my root pom.xml that says:
>   <properties>
>     <org.apache.commons.dbcp.version>1.2.1</org.apache.commons.dbcp.version>
>   </properties>
> Now one of my modules that inherits from this pom says:
>   <dependency>
>       <groupId>commons-dbcp</groupId>
>       <artifactId>commons-dbcp</artifactId>
>       <version>${org.apache.commons.dbcp.version}</version>
>   </dependency>
> So far it works fine. But If I also have a dependency on "foo" in the same module
> and the POM of foo says
>   <properties>
>     <org.apache.commons.dbcp.version>1.1</org.apache.commons.dbcp.version>
>   </properties>
> Then my project ends up with commons-dbcp version 1.1.
> I can even add an exclusions tag to the foo dependency that excludes commons-dbcp without
help
> because I do not inherit the dependency on commons-dbcp from foo but foo overrides my
property.
> I hope my information is good enough to understand my problem.
> I would expect that the pom of a dependency does NOT influence the environment of my
pom at all!

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message