我正在使用 m2eclipse 0.10.2 和 eclipse helios/ajdt。我记得m2eclipse正在管理eclipse配置的inpath(至少在eclipse galileo中)
现在,它不再为我管理它,我不知道为什么。这是我的插件配置:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<complianceLevel>1.6</complianceLevel>
<source>1.6</source>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>1.6.2</version>
</dependency>
</dependencies>
</plugin>
我可以手动将 aspectLibrary 添加到 inpath 中,然后 eclipse 将它添加到 .classpath 文件中,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="org.eclipse.ajdt.inpath.restriction" value="spring-aspects-3.0.4.RELEASE.jar"/>
<attribute name="org.eclipse.ajdt.inpath" value="org.eclipse.ajdt.inpath"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
当我配置我的项目(右键单击> maven)并选择“更新项目配置”时,它看起来像这样:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
所以我的路径消失了,我再也看不到任何方面标记了。
有人可以给我一些建议吗?它在您的网站上运行吗?你能把步骤和 pom 配置发给我,让 m2eclipse 管理我的 ajdt 路径吗?
顺便说一句:我有一个多模块。
问候J