我在maven构建期间收到警告,我想修复。
maven构建期间生成的警告:
[INFO] --- aspectj-maven-plugin:1.4:编译(默认)@core --- [警告]在C:\ Users \ DR25687.m2 \ repository \ org \ aspectj \ aspectjrt \ 1.7.1 \ aspectjrt-1.7.1.jar中找到错误的版本号预计1.6.11发现1.7.1
pom文件
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<showWeaveInfo>true</showWeaveInfo>
<source>1.7</source>
<target>1.7</target>
<verbose>true</verbose>
<Xlint>ignore</Xlint>
<complianceLevel>1.7</complianceLevel>
父POM
<org.aspectj.version>1.7.1</org.aspectj.version>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${org.aspectj.version}</version>
<scope>runtime</scope>
</dependency>
答案 0 :(得分:3)
在插件配置中设置aspectjrt版本
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>${version-plugin-aspectj}</version>
<configuration>
<source>${targetJdk}</source>
<target>${targetJdk}</target>
<verbose>true</verbose>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<!-- Ensure aspectj tools version used by compiler is the same version used as dependency. Avoids warning
-->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.6.12</version>
</dependency>
</dependencies>
</plugin>
答案 1 :(得分:0)
SelectionMode
。 它将下载1.7.1版本的jar。