gwt-maven-plugin for GWT 2.1.0

Since the second milestone of GWT has been released (Google Web Toolkit 2.1.0 M2 Downloads) I wanted to give it a try and check some of the new features, especially the new MVP framework. In the past I used gwt-presenter and gwt-dispatch and wanted to use GWTP (gwt-platform) for one of my next projects. But now I will try the new MVP framework included in GWT 2.1 first (see Large scale application development and MVP).

I had some trouble with the current version 1.2 of the Google Web Toolkit Maven Plugin since it apparently does not support some of the 2.1.0 features. After google-ing for some minutes I found a repository for both the GWT 2.1.0.M2 SDK and a special (ahem) 1.3.1.google version for the Maven plugin:

<dependency>
  <groupId>com.google.gwt</groupId>
  <artifactId>gwt-servlet</artifactId>
  <version>2.1.0.M2</version>
  <scope>runtime</scope>
</dependency>
<dependency>
  <groupId>com.google.gwt</groupId>
  <artifactId>gwt-user</artifactId>
  <version>2.1.0.M2</version>
  <scope>provided</scope>
</dependency>
 
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>gwt-maven-plugin</artifactId>
  <version>1.3.1.google</version>
</plugin>
 
<repository>
  <releases>
    <enabled>true</enabled>
  </releases>
  <snapshots>
    <enabled>false</enabled>
  </snapshots>
  <id>gwt-dev-release</id>
  <url>http://google-web-toolkit.googlecode.com/svn/2.1.0.M2/gwt/maven/</url>
</repository>
 
<pluginRepository>
  <releases>
    <enabled>true</enabled>
  </releases>
  <snapshots>
    <enabled>false</enabled>
  </snapshots>
  <id>gwt-dev-release</id>
  <url>http://google-web-toolkit.googlecode.com/svn/2.1.0.M2/gwt/maven/</url>
</pluginRepository>
This entry was posted in Uncategorized. Bookmark the permalink.

12 Responses to gwt-maven-plugin for GWT 2.1.0

  1. Jason says:

    What a life saver…. I wanted to use some features in 2.1M3+ and this drove me insane trying to resolve this stuff. GWT 2.0.4 worked fine, but didn’t have the new classes in GWT 2.1.0 – Most other newgroups and forums will filled with rude comments of “you should read the notes” (which didn’t mention this above!)

  2. Erik Kerkhoven says:

    Saved me too! Thanks to these repositories I have GWT 2.1 and corresponding gwt-maven-plugin 1.3.2 running. All other repositories I tried failed in some way or another. Many thanks!!

  3. Scott Morgan says:

    I am trying to use maven at a client site and keep running into these errors. I can’t post the full pom due to code ownership issues. Does anyone have any idea why this is happening?

    [INFO] Validating newly compiled units
    [INFO] [ERROR] Errors in ‘jar:file:/D:/Documents%20and%20Settings/scott/.m2/repository/com/google/gwt/gwt-user/2.1.0.M3/gwt-user-2.1.0.M3.jar!/com/google/gwt/emul/java/lang/Long.java’
    [INFO] [ERROR] Line 108: The method __parseAndValidateLong(String, int) is undefined for the type Long
    [INFO] [ERROR] Errors in ‘jar:file:/D:/Documents%20and%20Settings/scott/.m2/repository/com/google/gwt/gwt-user/2.1.0.M3/gwt-user-2.1.0.M3.jar!/com/google/gwt/emul/java/math/BigDecimal.java’
    [INFO] [ERROR] Line 47: The type BigDecimal must implement the inherited abstract method Number.byteValue()
    [INFO] [ERROR] Line 47: The type BigDecimal must implement the inherited abstract method Number.shortValue()
    [INFO] [ERROR] Errors in ‘jar:file:/D:/Documents%20and%20Settings/scott/.m2/repository/com/google/gwt/gwt-user/2.1.0.M3/gwt-user-2.1.0.M3.jar!/com/google/gwt/emul/java/math/BigInteger.java’
    [INFO] [ERROR] Line 54: The type BigInteger must implement the inherited abstract method Number.byteValue()
    [INFO] [ERROR] Line 54: The type BigInteger must implement the inherited abstract method Number.shortValue()

  4. There seems to be a version 2.1.0 gwt-maven-plugin on the codehaus site

    http://mojo.codehaus.org/gwt-maven-plugin/

    but I don’t see where it is deployed.

  5. Olaf says:

    It’s currently available as a 2.1-SNAPSHOT from

    <pluginRepositories>
      <pluginRepository>
        <id>codehaus.snapshots</id>
        <url>http://nexus.codehaus.org/snapshots</url>
        <snapshots><enabled>true</enabled></snapshots>
        <releases><enabled>false</enabled></releases>
      </pluginRepository>
    </pluginRepositories>
  6. Chuck C says:

    codehaus.snapshots
    http://nexus.codehaus.org/releases
    false
    true

  7. Chuck C says:

    Or use this for the release version and hopefully I have the correct metadata tags this time.

    codehaus.snapshots
    http://nexus.codehaus.org/releases
    false
    true

  8. Chuck C says:

    Okay, using the wrong metadata, just replace /snapshots with /releases and flip the enabled flags.

  9. Olaf says:

    Ah, ok, the release of gwt-maven-plugin-2.1.0.jar is finally available from the release repository. Chuck, thank you for the info.

    <pluginRepositories>
      <pluginRepository>
        <id>codehaus.releases</id>
        <url>http://nexus.codehaus.org/releases</url>
        <snapshots><enabled>false</enabled></snapshots>
        <releases><enabled>true</enabled></releases>
      </pluginRepository>
    </pluginRepositories>
  10. Olaf says:

    By the way, the correct tag would have been

    <pre lang="xml">

    ;-)

  11. Chuck C says:

    I was having problems with maven 3 and getting the checksum to validate, so I directly downloaded from the nexus repo and pushed it to my local repo. Thanks for letting me know what the tag is, I am used to [code][/code] – so I tried the equavalent.

  12. Gian Marco Gherardi says:

    According to

    https://nexus.codehaus.org/index.html#view-repositories

    the correct repository address should be

     
    			codehaus
    			https://nexus.codehaus.org/content/groups/public/
     
    				false

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">