我使用了一个干净的Eclipse 3.7,然后Maven Integration for Eclipse从Eclipse Marketplace中添加了它.我还添加WTP Integration和m2e connector for build-helper-maven-plugin从Windows - >首选项- >的Maven - >搜索- >打开目录.我还添加了Google Plugin for Eclipse.
我在运行命令时导入一个可以在命令行运行良好的maven项目:mvn compile gwt:compile或者mvn gwt:run在Eclipse中我收到了这个错误:
Error executing (org.bsc.maven:maven-processor-plugin:2.0.5:process:process:generate-sources) pom.xml /base line 289 Maven Build Problem
Run Code Online (Sandbox Code Playgroud)
这是pom文件的相关部分:
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.5</version>
<executions>
<execution>
<id>process</id>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.google.web.bindery</groupId>
<artifactId>requestfactory-apt</artifactId>
<version>${gwt.version}</version>
</dependency>
</dependencies>
</plugin>
Run Code Online (Sandbox Code Playgroud)
和
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<versionRange>[2.0.5,)</versionRange>
<goals>
<goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Run Code Online (Sandbox Code Playgroud)
我设法通过添加来使其工作
-vm
C:\Program Files\Java\jdk1.6.0_26\jre\bin\server\jvm.dll
Run Code Online (Sandbox Code Playgroud)
在-vmargs进入之前eclipse.ini