【发布时间】:2014-03-07 22:04:28
【问题描述】:
如何配置 AspectJ 以获得编译后编织?我只是在下面的插件中将“编译”替换为“后编译”:(不用说这是不安全的)
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<complianceLevel>1.6</complianceLevel>
<source>1.6</source>
<target>1.6</target>
</configuration>
<executions>
<execution>
<goals>
<goal>post-compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
但我错过了一些东西,因为它给出了以下错误:
'post-compile' was specified in an execution, but not found in the plugin
【问题讨论】:
-
您的帖子提到了编译后编织,但被标记为“加载时间编织”。这是两个不同的东西 - 来自文档,"the weaving process itself can take place at one of three different times: compile-time, post-compile time, and load-time."。你追求的是哪一个?
标签: maven configuration pom.xml aspectj compile-time-weaving