Reputation: 63
Axiom 1.2.15 distribution states in the release notes:
The implementation JARs (axiom-impl and axiom-dom) are now built with AspectJ (to reduce source code duplication) and contain a small subset of classes from the AspectJ runtime library. There is a small risk that this may cause conflicts with other code that uses AspectJ.
Well, this does cause an issue in my project with AspectJ 1.9.2. Maven complains:
09:35:12,617 [WARNING] Found duplicate and different classes in [org.apache.ws.commons.axiom:axiom-dom:1.2.21, org.apache.ws.commons.axiom:axiom-impl:1.2.21, org.aspectj:aspectjrt:1.9.2, org.aspectj:aspectjweaver:1.9.2]:
09:35:12,619 [WARNING] org.aspectj.lang.annotation.Aspect
I can't exclude Axiom from our project as it is being pulled in by Axis. Is there a distribution of Axiom that does not include AspectJ classes or do I need to build one of my own?
Upvotes: 0
Views: 284
Reputation: 1
To resolve this issue related to duplicate class Aspect.class
in axiom-dom
and axiom-impl
, you need to add below dependency in <dependencyManagement>
section of your pom.xml
file.
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.9.9.1</version>
<scope>runtime</scope>
</dependency>
Upvotes: 0