2010-09-23 49 views
2

我正在使用m2eclipse 0.10.2和eclipse helios/ajdt。 我记得m2eclipse管理日食配置的入口(至少在日食galileo)m2eclipse。使用AJDT生成类路径

现在,它不再为我管理它,我不知道为什么。这是我的插件配置:

<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> 

如果我在配置项目(右键点击>行家),然后选择“更新项目配置”,它看起来像这样:

<?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> 

所以我INPATH不见了,我看不出有任何方面的标记了。

有人可以给我一些建议吗? 它在您的网站上运行? 你可以给我的步骤和POM配置让m2eclipse mange我的ajdt inpath?

顺便说一句:我有一个多模块。

认为Ĵ

+0

我与m2eclipse有同样的问题。太糟糕了,这个没有答案... – Jens 2012-08-24 13:01:45

回答

0

我看到这个为好,但找不到分配给项目的任何JIRA问题。你打算打开一个吗?

+0

我已经切换到maven eclipse插件(http://maven.apache.org/plugins/maven-eclipse-plugin/)。我正在尝试使用m2eclipse两年,而且我总是遇到问题。就像你可以调试到你的jar源代码一样。你必须手动添加每一个罐子。其他一些事情突然不起作用。 Soemtimes我不得不重建/清理一遍又一遍。突然间,我的编译错误消失了,我不知道为什么。使用常规的Maven插件,你不会遇到这样的问题,你总是知道插件正在做什么。 – Janning 2010-10-15 12:52:01