You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2010/08/01 00:08:33 UTC

[jira] Closed: (MNG-4690) Transitive dependency lost when included another dependency

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

Benjamin Bentmann closed MNG-4690.
----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Benjamin Bentmann  (was: Brian Fox)

Running "mvn package" on the {{ui}} module yields a WAR with the folling contents for me:
{noformat}
WEB-INF/lib/antlr-2.7.2.jar
WEB-INF/lib/asm-1.5.3.jar
WEB-INF/lib/asm-attrs-1.5.3.jar
WEB-INF/lib/avalon-framework-4.1.3.jar
WEB-INF/lib/cglib-2.1_3.jar
WEB-INF/lib/common-1.jar
WEB-INF/lib/commons-beanutils-1.7.0.jar
WEB-INF/lib/commons-chain-1.0.jar
WEB-INF/lib/commons-collections-3.2.jar
WEB-INF/lib/commons-digester-1.8.jar
WEB-INF/lib/commons-fileupload-1.0.jar
WEB-INF/lib/commons-logging-1.1.jar
WEB-INF/lib/commons-validator-1.3.1.jar
WEB-INF/lib/dom4j-1.6.1.jar
WEB-INF/lib/ehcache-1.2.3.jar
WEB-INF/lib/hibernate-3.2.3.ga.jar
WEB-INF/lib/jta-1.0.1B.jar
WEB-INF/lib/log4j-1.2.12.jar
WEB-INF/lib/logkit-1.0.1.jar
WEB-INF/lib/model-1.jar
WEB-INF/lib/oro-2.0.8.jar
WEB-INF/lib/servlet-api-2.3.jar
WEB-INF/lib/sslext-1.2-0.jar
WEB-INF/lib/struts-1.2.7.jar
WEB-INF/lib/velocity-1.4.jar
WEB-INF/lib/velocity-dep-1.4.jar
WEB-INF/lib/velocity-tools-1.3.jar
{noformat}
i.e. despite the dependency on {{velocity-tools}}, {{antlr}} is still included. This matches the dependency tree output:
{noformat}
[INFO] [dependency:tree]
[INFO] cern.ppt.test:ui:war:1
[INFO] +- cern.ppt.test:model:jar:1:compile
[INFO] |  \- cern.ppt.test:common:jar:1:compile
[INFO] |     \- org.hibernate:hibernate:jar:3.2.3.ga:compile
[INFO] |        +- net.sf.ehcache:ehcache:jar:1.2.3:compile
[INFO] |        +- javax.transaction:jta:jar:1.0.1B:compile
[INFO] |        +- asm:asm-attrs:jar:1.5.3:compile
[INFO] |        +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |        +- cglib:cglib:jar:2.1_3:compile
[INFO] |        \- asm:asm:jar:1.5.3:compile
[INFO] +- org.apache.velocity:velocity-tools:jar:1.3:compile
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] |  +- commons-digester:commons-digester:jar:1.8:compile
[INFO] |  +- commons-collections:commons-collections:jar:3.2:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.1:compile
[INFO] |  |  +- log4j:log4j:jar:1.2.12:compile
[INFO] |  |  +- logkit:logkit:jar:1.0.1:compile
[INFO] |  |  \- avalon-framework:avalon-framework:jar:4.1.3:compile
[INFO] |  +- commons-validator:commons-validator:jar:1.3.1:compile
[INFO] |  +- javax.servlet:servlet-api:jar:2.3:compile
[INFO] |  +- oro:oro:jar:2.0.8:compile
[INFO] |  +- sslext:sslext:jar:1.2-0:compile
[INFO] |  \- velocity:velocity:jar:1.4:compile
[INFO] |     \- velocity:velocity-dep:jar:1.4:runtime
[INFO] \- struts:struts:jar:1.2.7:compile
[INFO]    +- commons-chain:commons-chain:jar:1.0:compile
[INFO]    +- commons-fileupload:commons-fileupload:jar:1.0:compile
[INFO]    \- antlr:antlr:jar:2.7.2:compile
{noformat}

Further things that don't match up with the issue description: The example project does not refer to {{struts:1.2.9}} anywhere. And both {{struts:1.2.7}} and {{struts:1.2.9}} depend on {{antlr:2.7.2}}.


> Transitive dependency lost when included another dependency
> -----------------------------------------------------------
>
>                 Key: MNG-4690
>                 URL: http://jira.codehaus.org/browse/MNG-4690
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Dependencies
>         Environment: maven 2.0.10 (tried with dependency plugin 2.0 and 2.1)
>            Reporter: Michal Ropka
>            Assignee: Benjamin Bentmann
>         Attachments: test.zip
>
>
> *We added a new dependency (_velocity-tools_) and the project didn't work any more. We've found that one transitive library (_antlr_ used by _struts_ and _hibernate_) is missing in the installed WAR file.*
> It looks like the _antlr_ transitive dependency is ignored from _hibernate_ dependencies by plugin choosing _struts-1.2.9_ one while eventually _struts_ is replaced by _1.2.7_ version which does not have _antlr_ dependency.
> There is a workaround to the problem - dependencies might be rearranged to include the missing library back (e.g. by moving _struts-1.2.7_ from _parent_ to _ui_ but only before _velocity-tools_ - see the test case) however the problem is that the plugin behavior is unpredictable.
> *Test case:*
> There are root, parent, common, model, ui POM files. The purpose is to create dependency tree deep enough (_ui_ depends on _model_ and inherits from _parent_, _model_ depends on _common_). They include external dependencies (_velocity-tools_, _struts_, _hibernate_).
> * WAR artifact created from the root or _ui_ POM does not contain _antlr_ in WEB-INF/lib which is required by _hibernate_
> * after removing _velocity-tools_ from ui/pom.xml _antlr_ library is included properly

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