【发布时间】:2012-02-04 02:23:26
【问题描述】:
我使用干净的 Eclipse 3.7,然后从 Eclipse Marketplace 添加了Maven Integration for Eclipse。我还从 Windows -> Preferences -> Maven -> Discovery -> Open Catalog 添加了 WTP Integration 和 m2e connector for build-helper-maven-plugin。我还为 Eclipse 添加了 Google 插件。
我导入了一个现有的 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
这里是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>
和
<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>
【问题讨论】: