Here is my common problem:
My project P depends on A, which depends on B, which depends on C, which depends on version 1.0.1 D.
The problem is with version 1.0.1 of D and I want to force another module to be used. I do not know how to declare this in my POM projects, since I did not add the dependency on D directly. He is C, who declared a dependency on D.
Important: in this case, not only the version is changed, but also the group and artifact. Thus, it is not just a matter of overriding the dependency version, but rather excluding the module and including another.
In the specific case, D is StAX, 1.0.1 has a bug . According to the notes in this error, "the problems were resolved by replacing stax-api-1.0.1 (maven GroupId = stax) with stax-api-1.0-2 (maven GroupId = javax.xml.stream)", so I am trying this to do.
So D = stax: stax-api: jar: 1.0.1 and C = org.apache.xmlbeans: xmlbeans: jar: 2.3.0
I am using maven 2.0.9 in case that matters.
Dependency output mvn: tree "
mvn dependency:tree [..snip..] [INFO] +- org.apache.poi:poi-ooxml:jar:3.6:compile [INFO] | +- org.apache.poi:poi-ooxml-schemas:jar:3.6:compile [INFO] | | +- org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile [INFO] | | | \- stax:stax-api:jar:1.0.1:compile
In my POM project, I have the following dependency on "A":
<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>3.6</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.6</version> </dependency>
Thanks in advance.
maven-2 dependencies
wishihadabettername Oct 14 '10 at 20:18 2010-10-14 20:18
source share