Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.0-beta-3
-
Component/s: Dependencies
-
Labels:None
-
Environment:maven 2.0.10 (tried with dependency plugin 2.0 and 2.1)
-
Complexity:Intermediate
-
Testcase included:yes
-
Number of attachments :
Description
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
Issue Links
Activity
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Brian Fox [ brianfox ] | Benjamin Bentmann [ bentmann ] |
| Resolution | Cannot Reproduce [ 5 ] |
| Attachment | test2.zip [ 50436 ] |
| Resolution | Cannot Reproduce [ 5 ] | |
| Status | Closed [ 6 ] | Reopened [ 4 ] |
| Assignee | Benjamin Bentmann [ bentmann ] |
| Status | Reopened [ 4 ] | Closed [ 6 ] |
| Assignee | Benjamin Bentmann [ bentmann ] | |
| Fix Version/s | 3.0-beta-3 [ 16681 ] | |
| Resolution | Fixed [ 1 ] |
Running "mvn package" on the ui module yields a WAR with the folling contents for me:
i.e. despite the dependency on velocity-tools, antlr is still included. This matches the dependency tree output:
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.