我需要在maven项目中使用aspectj。我安装了用于Eclipse的maven plugin (m2e)、maven aspectj插件和用于eclipse的AJDT。所以现在,当我打开一个新项目时,我会看到"Maven Project“和"AspectJ Project”。如何创建一个新项目,即Maven AspectJ项目?我没有找到任何参考资料,所以你是我唯一的希望。谢谢
发布于 2011-11-13 01:42:01
转到帮助>安装新的软件存储库:http://dist.springsource.org/release/AJDT/configurator/
来源:http://blog.springsource.com/2011/10/18/upgrading-maven-integration-for-springsource-tool-suite-2-8-0/#comment-207264 (安德鲁·艾森伯格)
发布于 2011-06-30 00:03:05
您应该将maven-aspectj-plugin添加到pom.xml中的构建插件部分,如下所示:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<!-- use this goal to weave all your main classes -->
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<complianceLevel>1.6</complianceLevel>
</configuration>
</plugin>发布于 2011-07-01 01:45:58
检查用于m2eclipse的AJDT项目配置器
m2eclipse-AJDT插件检测到pom.xml包含aspectj-maven-plugin,并在eclipse中导入时自动将相关的AJDT属性和配置添加到项目中。
我认为已经为这个插件在0.12版本的m2eclipse上工作做了一些努力,不知道它是否工作。
我已经在m2eclipse 0.10上试用了这个插件,它工作得很好。
https://stackoverflow.com/questions/6522540
复制相似问题