2
votes

I'm using Google Plugin for Eclipse, Google App engine and GWT to develop my apps and I'm thinking of converting the projects (which were created as Web Application projects) to Maven.

My first question is where can I find a good tutorial? Most of the references I found were linked to http://mojo.codehaus.org/gwt-maven-plugin/user-guide/appengine-launcher.html which is now terminated as I see.

My second question is what are the advantages / disadvantages of using Maven instead of Google plugin for Eclipse; or in what context is one better than the other?

Thank you.

1

1 Answers

1
votes

For your first question: I have found a tutorial here. Here's another one.

As an example, my plugin configuration looks like this:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>${gwtVersion}</version>
    <executions>
        <execution>
            <configuration>
                <module>org.my.tool.GwtModule</module>
            </configuration>
            <goals>
                <goal>generateAsync</goal>
                <goal>compile</goal>
                <!-- <goal>test</goal> -->
                <goal>i18n</goal>
            </goals>
        </execution>
    </executions>
    <!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
                documentation at codehaus.org -->
    <configuration>
        <runTarget>raptool_gwt.html</runTarget>
        <hostedWebapp>${webappDirectory}</hostedWebapp>
        <i18nMessagesBundle>org.my.tool.client.TextConstants</i18nMessagesBundle>
        <!-- <appEngineVersion>${gaeVersion}</appEngineVersion> -->
        <server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
    </configuration>
</plugin>

Regarding your second question: I use both the Google Plugin and maven. Maven is used for dependency management, generateAsync, i18n and the occasional clean / install. The Google Plugin is used for Dev mode, GWT compilation and deployment to App Engine. Just make sure that the Maven dependencies are at the bottom of the build path (i.e. below the AppEngine libraries from the Google Eclipse Plugin)

I'm also curious where the codehaus.org info has gone, Maven Central does have recent updates of the plugin, so someone must be working on it.