GWT + Maven +执行错误(org.bsc.maven:maven-processor-plugin:2.0.5:process:process:generate-sources) [英] GWT + Maven + Error executing (org.bsc.maven:maven-processor-plugin:2.0.5:process:process:generate-sources)

查看:165
本文介绍了GWT + Maven +执行错误(org.bsc.maven:maven-processor-plugin:2.0.5:process:process:generate-sources)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用一个干净的eclipse 3.7,然后从Eclipse Marketplace中添加 Maven Integration for Eclipse 。我还在Windows中添加了 WTP集成 m2e connector for build-helper-maven-plugin - >首选项 - > Maven - >发现 - >打开目录。我还添加了Google Plugin for Eclipse。



我导入一个可以在命令行下正常工作的exive maven项目,例如: mvn compile gwt:compile mvn gwt:run 但在Eclipse中出现此错误:

<$执行错误(org.bsc.maven:maven-processor-plugin:2.0.5:process:process:generate-sources)pom.xml / base line 289 Maven Build Problem

以下是pom文件的相关部分:

 <插件> 
< groupId> org.bsc.maven< / groupId>
< artifactId> maven-processor-plugin< / artifactId>
< version> 2.0.5< / version>
<执行次数>
<执行>
< id>程序< / id>
<阶段> generate-sources< / phase>
<目标>
< goal>程序< / goal>
< /目标>
< /执行>
< /执行次数>
<依赖关系>
< dependency>
< groupId> com.google.web.bindery< / groupId>
< artifactId> requestfactory-apt< / artifactId>
<版本> $ {gwt.version}< / version>
< /依赖关系>
< /依赖关系>
< / plugin>

 < pluginManagement> 
< plugins>
<! - 此插件的配置仅用于存储Eclipse m2e设置
。它对Maven构建本身没有影响。 - >
< plugin>
< groupId> org.eclipse.m2e< / groupId>
< artifactId>生命周期映射< / artifactId>
< version> 1.0.0< / version>
<配置>
< lifecycleMappingMetadata>
< pluginExecutions>
< pluginExecution>
< pluginExecutionFilter>
< groupId> org.bsc.maven< / groupId>
< artifactId> maven-processor-plugin< / artifactId>
< versionRange> [2.0.5,)< / versionRange>
<目标>
< goal>程序< / goal>
< /目标>
< / pluginExecutionFilter>
< action>
< execute />
< / action>
< / pluginExecution>
< / pluginExecutions>
< / lifecycleMappingMetadata>
< / configuration>
< / plugin>
< / plugins>
< / pluginManagement>


解决方案

我设法通过添加

  -vm 
C:\程序文件\Java\jdk1.6.0_26\jre\bin\ server \jvm.dll

-vmargs in eclipse.ini


I use a clean eclipse 3.7, then added the Maven Integration for Eclipse from the Eclipse Marketplace. I also added WTP Integration and m2e connector for build-helper-maven-plugin from Windows -> Preferences -> Maven -> Discovery -> Open Catalog. I also added the Google Plugin for Eclipse.

I import an exising maven project that works fine with the command line when running command like: mvn compile gwt:compile or mvn gwt:run but in Eclipse I got this error:

Error executing (org.bsc.maven:maven-processor-plugin:2.0.5:process:process:generate-sources)   pom.xml /base   line 289    Maven Build Problem

Here is the related part of the pom file:

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

and

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

解决方案

I managed to make it work by adding

-vm
C:\Program Files\Java\jdk1.6.0_26\jre\bin\server\jvm.dll

before -vmargs in eclipse.ini

这篇关于GWT + Maven +执行错误(org.bsc.maven:maven-processor-plugin:2.0.5:process:process:generate-sources)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆