You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michal Ropka (JIRA)" <ji...@codehaus.org> on 2009/03/09 18:09:12 UTC

[jira] Created: (MDEP-202) Transitive dependency lost when included another dependency

Transitive dependency lost when included another dependency
-----------------------------------------------------------

                 Key: MDEP-202
                 URL: http://jira.codehaus.org/browse/MDEP-202
             Project: Maven 2.x Dependency Plugin
          Issue Type: Bug
          Components: resolve
    Affects Versions: 2.1
         Environment: maven 2.0.10 (tried with dependency plugin 2.0 and 2.1)
            Reporter: Michal Ropka
            Assignee: Brian Fox
         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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ 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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann reopened MNG-4690:
------------------------------------

      Assignee:     (was: Benjamin Bentmann)

> 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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

       Resolution: Fixed
    Fix Version/s: 3.0-beta-3
         Assignee: Benjamin Bentmann

Fixed by [r988749|http://svn.apache.org/viewvc?view=revision&revision=988749].

> 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
>             Fix For: 3.0-beta-3
>
>         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

        

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

Posted by "Michal Ropka (JIRA)" <ji...@codehaus.org>.
    [ 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

        

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

Posted by "Michal Ropka (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michal Ropka updated MNG-4690:
------------------------------

    Attachment: test2.zip

Fixed test case

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

        

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

Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Fox moved MDEP-202 to MNG-4690:
-------------------------------------

           Complexity: Intermediate
          Component/s:     (was: resolve)
                       Dependencies
    Affects Version/s:     (was: 2.1)
                  Key: MNG-4690  (was: MDEP-202)
              Project: Maven 2 & 3  (was: Maven 2.x Dependency Plugin)

> 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: Brian Fox
>         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

        

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

Posted by "Michal Ropka (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=230581#action_230581 ] 

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

Hi,

I've realized that the test case is not complete as my struts-1.2.7 library is different than deployed in the central repository and it contains no dependencies (was deployed manually before an official release was there) so you couldn't reproduce the problem.

However the problem is still there. I've prepared quickly another example (test2.zip). After installing lib1 (version 1 and 2), lib2 and lib3 and running install in the top project you can see that there is no antlr library in ui/target WAR which is required for lib2 which is there.


Cheers,
Michal

> 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

        

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

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232974#action_232974 ] 

Benjamin Bentmann commented on MNG-4690:
----------------------------------------

The dirty tree for the ui modules looks like this:
{noformat}
test:ui:1
+- test:model:1
|  \- test:common:1
|     \- test.lib:lib2:1
|        \- antlr:antlr:2.7.6          <--\
+- test.lib:lib3:1                        |
|  \- test.lib:lib1:2        <--\         |(a)
|     \- antlr:antlr:2.7.2      |(b)   ---/
\- test.lib:lib1:1           ---/
{noformat}
For conflict resolution, Maven basically performs a DFS on this tree. When visiting antlr:2.7.2 it eliminates antlr:2.7.6 (a) and when visiting lib1:1 it eliminates lib1:2 (b). Unfortunately, this last step also eliminates the last path to antlr, i.e. antlr:2.7.6 is not reenabled.

Moving lib1:1 before lib3:1 is a possible workaround for the missing back-tracking in the conflict resolution.

> 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