1

我尝试将与 eclipse luna 一起使用的 maven 多模块项目导入 eclipse mars。这个多模块 maven 项目在 eclipse mars 中没有源文件夹,依赖项也不存在:

eclipse mars中缺少依赖项和源文件夹

我无法将 src/main/java 文件夹添加为源文件夹:

没有可用的构建路径操作

其他 Maven 多模块项目确实有效。这个项目的不同之处在于它使用了 groovy-eclipse-compiler:

<plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-compiler</artifactId>
            <version>2.9.2-01</version>
            <scope>compile</scope>
          </dependency>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-batch</artifactId>
            <version>2.4.3-01</version>
            <scope>compile</scope>
          </dependency>
        </dependencies>
        <configuration>
          <compilerId>groovy-eclipse-compiler</compilerId>
          <fork>true</fork>
          <verbose>false</verbose>
          <source>1.7</source>
          <target>1.7</target>
          <encoding>UTF-8</encoding>
          <showDeprecation>true</showDeprecation>
          <verbose />
        </configuration>
      </plugin>

为了在 Eclipse 中使用正确的 groovy 工具,我从更新站点安装了 groovy-eclipse:

Groovy Eclipse 2.9.2 snapshot builds for Eclipse 4.5 are available, update site http://dist.springsource.org/snapshot/GRECLIPSE/e4.5/

我该怎么做才能让 eclipse mars 正确识别这个 maven 项目?

4

1 回答 1

0

这似乎是一个 groovy-eclipse 错误。我在 github 页面上打开了一个问题:github.com/groovy/groovy-eclipse/issues/130,但我猜该项目已经成为孤儿,这真是太可惜了:(!

于 2015-08-12T13:27:31.387 回答