I want to upgrade my project to spring 4, however, I get a missing dependency for aspectweaver-1.8.0.M1.jar. When I take a look at the dependency hierarchy, I see that this file is needed by spring-aspects-4.0.0, which has the following in its own pom.xml
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.0.M1</version>
<scope>compile</scope>
</dependency>
After checking maven repository, I wasn't able to find this artifact since the latest stable version of aspectweaver is 1.7.4.
Now I can't understand two things:
Since the scope of this dependency is compile why does my application need it ? I don't want to compile the spring-aspects.jar !!
Why is spring-aspects-4.0.0.jar (which is stable) using a non-stable version of a component ? Wouldn't that make spring-aspects-4.0.0 also non-stable ?
Thanks
According to a reported issue at springsource, aspectjweaver is "basically identical to AspectJ 1.7" except that it has early support for Java 8.
As I don't need Java 8 support, I basically added a compile dependency to the latest release version of aspectweaver:
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.7.4</version>
</dependency>
This ensures that the 1.7.4 is used instead of the milestone release, and is an acceptable workaround for me, for the time being.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With