Java – spring-aspects-4 dependency not found
I want to upgrade my project to spring 4, but for aspectweaver-1.8 0.M1. Jar, I lack dependencies When I looked at the dependency hierarchy, I found spring-aspects-4.0 0 needs this file in its own POM XML contains the following
<dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.8.0.M1</version> <scope>compile</scope> </dependency>
After checking the Maven repository, I can't find this artifact because the latest version of aspectweaver is 1.7 four
Now I don't understand two things:
>Because the scope of this dependency is compilation, why does my application need it? I don't want to edit spring aspects jar! > Why spring-aspects-4.0 0.jar (which is stable) uses unstable versions of components? This will not make the spring side 4.0 Is 0 unstable?
thank you
Solution
According to a reported issue at springsource, aspectjweaver is "basically the same as AspectJ 1.7", except that it early supported Java 8.0
Since I don't need Java 8 support, I basically added a compilation dependency to the latest version of aspectweaver:
<dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.7.4</version> </dependency>
This ensures the use of 1.7 4 instead of milestone version is an acceptable solution for me