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

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>