Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT + Maven + Error executing (org.bsc.maven:maven-processor-plugin:2.0.5:process:process:generate-sources)

Tags:

eclipse

maven

gwt

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>
like image 871
Sydney Avatar asked Jan 06 '12 10:01

Sydney


2 Answers

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

like image 150
Sydney Avatar answered Nov 05 '22 23:11

Sydney


As a rule of thumb you always need to change default JRE under Window->Preferences->Java->Installed JREs to JDK folder. In my case it was C:\Program Files\Java\jre6. I had to change it to C:\Program Files\Java\jdk1.6.0_31

like image 25
Zhaidarbek Avatar answered Nov 05 '22 23:11

Zhaidarbek