1

I'm trying configure my Eclipse (Kepler), when I execute Run as -> Maven Clean, that works. After I execute Run as -> Maven Install, this error below is showed in console.

There's a solution? Thanks for attention.

[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.0:compile (default) on project ProjectSetup: Command [[
[ERROR] C:\Program Files\Java\jdk1.7.0_51\jre\bin\java -Xmx512m -classpath C:\Dev\ProjectSetup\target\ProjectSetup-0.0.1-SNAPSHOT\WEB-INF\classes;C:\Dev\ProjectSetup\src\main\java;C:\Dev\ProjectSetup\target\generated-sources\gwt;C:\Users\Paulo\.m2\repository\com\google\gwt\gwt-user\2.6.0\gwt-user-2.6.0.jar;C:\Users\Paulo\.m2\repository\org\json\json\20090211\json-20090211.jar;C:\Users\Paulo\.m2\repository\com\github\gwtbootstrap\gwt-bootstrap\2.3.2.0\gwt-bootstrap-2.3.2.0.jar;C:\Users\Paulo\.m2\repository\com\google\gwt\gwt-user\2.6.0\gwt-user-2.6.0.jar;C:\Users\Paulo\.m2\repository\com\google\gwt\gwt-dev\2.6.0\gwt-dev-2.6.0.jar com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war C:\Dev\ProjectSetup\target\ProjectSetup-0.0.1-SNAPSHOT -localWorkers 4 -XfragmentCount -1 -sourceLevel auto -gen C:\Dev\ProjectSetup\target\.generated com.gft.start.projectsetup.ProjectSetup
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

[EDIT] Here my pom.xml, I'm need configure Maven-Eclipse with GWT and GWTBootstrap. Thanks for attention and help again.

    <?xml version="1.0" encoding="UTF-8"?>
<project
  xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <!-- POM file generated with GWT webAppCreator -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.gft.start</groupId>
  <artifactId>ProjectSetup</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>GWT Maven Archetype</name>

  <properties>
    <!-- Convenience property to set the GWT version -->
    <gwtVersion>2.6.0</gwtVersion>
    <!-- GWT needs at least java 1.5 -->
    <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-servlet</artifactId>
      <version>${gwtVersion}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>${gwtVersion}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
      <version>1.0.0.GA</version>
      <classifier>sources</classifier>
      <scope>test</scope>
    </dependency>
    <!-- Source: http://maven-repository.com/artifact/com.github.gwtbootstrap/gwt-bootstrap/2.3.2.0 -->
    <dependency>
      <groupId>com.github.gwtbootstrap</groupId>
      <artifactId>gwt-bootstrap</artifactId>
      <version>2.3.2.0</version>
    </dependency>
  </dependencies>

  <build>
    <!-- Generate compiled stuff in the folder used for developing mode -->
    <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

    <plugins>

      <!-- GWT Maven Plugin -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>2.6.0</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>test</goal>
              <goal>i18n</goal>
            <!-- <goal>generateAsync</goal> -->  
            </goals>
          </execution>
        </executions>
        <!-- Plugin configuration. There are many available options, see 
          gwt-maven-plugin documentation at codehaus.org -->
        <configuration>
          <runTarget>ProjectSetup.html</runTarget>
          <hostedWebapp>${webappDirectory}</hostedWebapp>
          <i18nMessagesBundle>com.gft.start.projectsetup.client.Messages</i18nMessagesBundle>
        </configuration>
      </plugin>

      <!-- Copy static web files before executing gwt:run -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>exploded</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <webappDirectory>${webappDirectory}</webappDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
    </plugins>

    <!-- As per: http://stackoverflow.com/a/16275036 -->
    <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.codehaus.mojo</groupId>
                                    <artifactId>gwt-maven-plugin</artifactId>
                                    <versionRange>[2.6.0,)</versionRange>
                                    <goals><goal>i18n</goal></goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-war-plugin</artifactId>
                                    <versionRange>[2.1.1,)</versionRange>
                                    <goals><goal>exploded</goal></goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
             </plugin>
            </plugins>
        </pluginManagement>
    </build>
  </project>
Paulo Eduardo
  • 43
  • 2
  • 9
  • There should be a more specific message up above in your log. – Thomas Broyer Mar 29 '14 at 15:34
  • Share some segment of your pom.xml specially for `compile mojo` – Braj Mar 29 '14 at 15:36
  • Maven clean is working fine. Now next move to Maven compile rather than directly calling Maven install. If maven compile works fine then try maven package and finally maven install. It will be helpful to analyze the problem. – Braj Mar 29 '14 at 15:38
  • @ThomasBroyer This are lasts messages errors in my console, but if necessary, I post my complete log. Thanks for helping. – Paulo Eduardo Mar 30 '14 at 01:38
  • @Braj I post my pom.xml complete. I did your suggestion, changed my pom.xml with java version (1.7) and my EntryPointClass, did work. Thanks for helping again. – Paulo Eduardo Mar 30 '14 at 01:39

1 Answers1

1

Try to match your pom.xml with below one that is used for GWT compile.

There may be some issue in source or class path or war directory location.

Note: Replace versions and EntryPointClassName in below configuration and change the JAVA version to 1.7 also

<build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <testSourceDirectory>src/main/test</testSourceDirectory>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </resource>
    </resources>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <!-- http://mojo.codehaus.org/gwt-maven-plugin/compile-mojo.html -->
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>2.5.0</version>
            <executions>
                <execution>
                    <configuration>
                        <extraJvmArgs>-Xmx640M -Xss1024k</extraJvmArgs>
                    </configuration>
                    <goals>
                        <goal>compile</goal>
                        <goal>eclipse</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <optimizationLevel>9</optimizationLevel>
                <style>DETAILED</style>
                <warSourceDirectory>src/main/webapp</warSourceDirectory>
                <modules>
                    <module>com.x.y.z.EntryPointClassName</module>
                </modules>
            </configuration>
        </plugin>
              ....
Braj
  • 46,415
  • 5
  • 60
  • 76