【发布时间】:2015-12-06 15:04:51
【问题描述】:
我在 IntelliJ 中使用 ajc 编译器以及 aspectj-maven-plugin,我在其中声明了以下排除项:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>**/EmployeeAccessAspect.java</exclude>
</excludes>
<complianceLevel>1.8</complianceLevel>
<showWeaveInfo>true</showWeaveInfo>
<verbose>true</verbose>
</configuration>
</plugin>
当我使用mvn compile 编译时,一切正常,EmployeeAccessAspect 方面被正确忽略。
但是,如果我在 IntelliJ 中 Make 项目,它只会编织它找到的所有方面(并完全忽略 maven 排除项)。
我总是可以破解 ajc 编译器选项或方面路径来实现我想要的,但如果我出于某种原因必须排除一个方面,它会让我更改两个地方。
有什么方法可以让maven插件和ajc编译同步?我正在使用 IntelliJ 15。
【问题讨论】:
标签: java maven intellij-idea aspectj aspectj-maven-plugin