[ 
http://jira.codehaus.org/browse/MNG-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230583#action_230583
 ] 

Michal Ropka commented on MNG-4690:
-----------------------------------

More details:

Dependencies in the files look like:
{noformat}
parent/pom.xml
        lib1:1
common/pom.xml
        lib2:1
                antlr:antlr:2.7.6
model/pom.xml
        common
ui/pom.xml (parent/pom.xml as parent)
        model
        lib3:1
                lib1:2
                        antlr:antlr:2.7.2
top/pom.xml
        common
        model
        ui
{noformat}

While dependency tree in _ui_
{noformat}
[INFO] ------------------------------------
[INFO] [dependency:tree]
[INFO] test:ui:war:1
[INFO] +- test:model:jar:1:compile
[INFO] |  \- test:common:jar:1:compile
[INFO] |     \- test.lib:lib2:jar:1:compile
[INFO] +- test.lib:lib3:jar:1:compile
[INFO] \- test.lib:lib1:jar:1:compile
[INFO] ------------------------------------
{noformat}

so _lib2_ even when requires _anrlr_ does not have it. I believe it is due to 
some problem when resolving dependencies for _lib1_.


> 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
>         Attachments: test.zip, test2.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

        

Reply via email to