Bug 372429 - You can not build a GWT Maven project that works out of the box for Eclipse.
Summary: You can not build a GWT Maven project that works out of the box for Eclipse.
Status: CLOSED DUPLICATE of bug 372330
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL: http://mojo.codehaus.org/gwt-maven-pl...
Whiteboard:
Keywords: core
Depends on:
Blocks:
 
Reported: 2012-02-23 17:27 EST by Richard Katz CLA
Modified: 2021-04-19 13:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Katz CLA 2012-02-23 17:27:40 EST
Currently, there apparently is no maven-google-archetype, or I can't find one.  Instead CodeHaus has this message page instead.

http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html

Fine so I ran the posted command:

 mvn archetype:generate \
   -DarchetypeRepository=repo1.maven.org \
   -DarchetypeGroupId=org.codehaus.mojo \
   -DarchetypeArtifactId=gwt-maven-plugin \
   -DarchetypeVersion=2.4.0

And I get a project in Eclipse, there are several problems.
1.  Eclipse does not know about the "generated-code" as a source directory.  Upon running Run as | mvn install it generates classes.  But I can not see the classes directory no matter how many times I do a refresh in package explorer, and apparently Eclipse can't see it either.  It gets:
 
GreetingServiceAsync cannot be resolved to a type
Messages cannot be resolved to a type
Missing asynchronous interface GreetingServiceAsync
The method create(Class<?>) from the type GWT refers to the missing type GreetingServiceAsync
The method create(Class<?>) from the type GWT refers to the missing type Messages

2. Eclipse lists some errors on the generated pom itself (but they don't stop it from running an install):


Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-war-plugin:2.1.1:exploded (execution: default, phase: compile)
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:gwt-maven-plugin:2.4.0:generateAsync (execution: default, phase: generate-sources)
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:gwt-maven-plugin:2.4.0:i18n (execution: default, phase: generate-sources)


3.  Execution during the maven install comes up with a blank page: HTML page is loaded, but the display is empty, instead of the Greeting service. 

http://192.168.202.1:52462/mvngwtbase.mvngwtprojJUnit.JUnit/junit-standards.html?gwt.codesvr=192.168.202.1:52458

The maven install appears to proceed normally, however.

The pom errors flag the "execution" line in:

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

And:
     <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>
Comment 1 Richard Katz CLA 2012-02-23 17:37:57 EST
1. GWT (Google Web Toolkit) - no keyword in Bugzilla.

2. Additional problems encountered:
 m2e 1.0.1 possibly not able to handle buildhelper 0.14?
http://stackoverflow.com/questions/8212846/cant-install-eclipse-plugin-m2e-connector-for-build-helper-maven-plugin-0-15-0

and
http://stackoverflow.com/questions/9286116/eclipse-indigo-unable-to-upgrade-m2e

3. Pom errors are also reported here:
http://stackoverflow.com/questions/7916308/error-when-importing-maven-gwt-project-no-marketplace-entries-found-to-handle#comment11887284_7916368

4. Original problem also reported here:
http://stackoverflow.com/questions/6069358/problems-integrating-maven-with-gwt-in-eclipse

I followed all instructions on the page, installing the giant pom code section from here:

http://code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven#POM_changes_needed_for_Eclipse_Indigo

And I followed all the instructions on this page as well, But these did not fix the problem.
Comment 2 Richard Katz CLA 2012-02-23 18:34:15 EST
Continuing on, you can try to run or debug this under Eclipse with a run configuration, but eventually it fails because it can not see GreetServiceAsync; even though maven can see these files Eclipse can not.
Comment 3 Igor Fedorenko CLA 2012-02-23 19:35:15 EST
m2e core does not provide direct support for GWT projects but there is apparently a thirdparty extensions (see bug 372330).

*** This bug has been marked as a duplicate of bug 372330 ***
Comment 4 Denis Roy CLA 2021-04-19 13:25:44 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/