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>
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!)
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!!
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()
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.
It’s currently available as a 2.1-SNAPSHOT from
codehaus.snapshots
http://nexus.codehaus.org/releases
false
true
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
Okay, using the wrong metadata, just replace /snapshots with /releases and flip the enabled flags.
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.
By the way, the correct tag would have been
<pre lang="xml">;-)
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.
According to
https://nexus.codehaus.org/index.html#view-repositories
the correct repository address should be