2

I have created a GWT Maven project in Eclipse using New->Project->Maven project->GWT Eclipse plugin. It was created, but it gives some errors like

The output directory for the project should be set to /gwtproject/src/main/webapp/WEB-INF/classes

Is anything missing while configuring my project?

My pom.xml includes:

<build>
        <!-- Generate compiled stuff in the folder used for developing mode -->
        <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
        <plugins>
            <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.4.0,)</versionRange>
                                    <goals>
                                        <goal>resources</goal>
                                        <goal>compile</goal>
                                        <goal>i18n</goal>
                                        <goal>generateAsync</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute />
                                </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>
                                    <execute />
                                </action>
                            </pluginExecution>

                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </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>
    </build>
Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58
pbhle
  • 2,856
  • 13
  • 33
  • 40
  • In the project classpath settings (project/Properties/Java Build Path/Sources tab) what is set for output path? Can you send a screenshot? – András Kerekes Dec 26 '12 at 06:47
  • I answered a similar question and I believe the answer works in your case too: http://stackoverflow.com/a/26359380/897041 – Muhammad Gelbana Oct 14 '14 at 11:11

3 Answers3

7

An eclipsy solution to this problem is:

  1. Select the project in the Package Explorer.
  2. Open the properties of the project.
  3. Select Java Build Path
  4. Change the default output folderenter image description here

  5. Question the life decisions you made that landed you in Eclipse.

Timeless
  • 7,338
  • 9
  • 60
  • 94
Skylar Saveland
  • 11,116
  • 9
  • 75
  • 91
1

You should do a pre-check with GWT Article WorkingWithMaven - http://code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven

Also refer GWT Sample project Validation, DynaTableRf and MobileWebApp.

appbootup
  • 9,537
  • 3
  • 33
  • 65
0

You need to configure the missing part in <webappDirectory> tag in the pom. I think this should solve your problem: Click Here

Community
  • 1
  • 1
Abhijith Nagaraja
  • 3,370
  • 6
  • 27
  • 55