Updated maven strategy for GWT

Posted by Unknown - Wednesday, August 25, 2010 at 8:20:00 AM

As part of the GWT team's ongoing work to provide better maven support, we are now publishing GWT milestones and release candidates to the Google snapshot repository. GWT 2.1M3 is now available as version 2.1-SNAPSHOT. If you're using Spring Roo with GWT, you'll notice that the Roo-generated POMs for M3 still point to the SVN repo. For this milestone release, the GWT jars are available from both the SVN repo and the Google snapshot repo. Beginning with M4, we plan to use only the Google snapshot repo. The GWT 2.1 release and minor point releases thereafter will be published to the maven central repository. To use the Google snapshot repository, put this in your pom.xml:

<repository>
  <id>google-maven-snapshot-repository</id>
  <name>Google Maven Snapshot Repository</name>
  <url>https://oss.sonatype.org/content/repositories/google-snapshots/</url>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
</repository>

23 comments:

Thomas Broyer said...

How about the gwt-maven-plugin?

AFAIK the modified version is only available from the SVN repo. And nobody knows which modifications have been mae by Google and whether we must/should use it rather than the "official" one.

Curious Attempt Bunny said...
This comment has been removed by the author.
Curious Attempt Bunny said...

I'm trying to use this. Maven is failing for me because it's expecting:

https://oss.sonatype.org/content/repositories/google-snapshots/com/google/gwt/gwt/2.1-SNAPSHOT/gwt-2.1-SNAPSHOT.pom

and instead the generated pom file is:

https://oss.sonatype.org/content/repositories/google-snapshots/com/google/gwt/gwt/2.1-SNAPSHOT/gwt-2.1-SNAPSHOT-pom.pom

(note the additional -pom suffix)

David Chandler said...

Good point, Thomas. Let me get the story on the 2.1-compatible gwt-maven-plugin and post back.

David Chandler said...

Nice catch, Curious Attempt Bunny. The push script had an extraneous pom classifier in it. I've corrected it. Please post back if you have any further issues.

Jason said...

After the hours of sweat and blood put into maintaining it in our private repo... thank you!

gwt-maven-plugin support would also be very welcome. We're using the Google-centric version from Roo to great affect, but a little collaboration with the existing project would really help.

thanks, and congrats!
Jason

James said...

Most awesome, most awesome indeed.

Sonic said...

Hi,
is there an "Updated" tutorial on how to use GWT with Maven?

(I would like to see it in the GWT documentations pages, so I'm sure every time GWT has a new release, the tutorial is up-to-date)

Sam Brodkin said...
This comment has been removed by the author.
Sam Brodkin said...

What are you guys all on windoze or linux? Where is https://oss.sonatype.org/content/repositories/google-snapshots/com/google/gwt/gwt-dev/2.1-SNAPSHOT/gwt-dev-2.1-SNAPSHOT-mac.jar

Thanks your mavenization efforts!

David Chandler said...

@Sam, GWT is OS-independent. Are you having an issue on the Mac?

Sam Brodkin said...

@David I thought so too (since 2.0) but my maven build is looking for
it when I put in GWT version 2.1-SNAPSHOT.

Bálint said...

@Sam, you should use gwt-maven-plugin 1.3-SNAPSHOT

Sam Brodkin said...

@Bálint Thanks. That got me farther, but now I'm getting:

[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Unsupported GWT version 2.1-SNAPSHOT

juangar code said...

For work, add this repository too:


sonatype-central-repository
Sonatype Repository
https://oss.sonatype.org/content/repositories/central/

PMMonkey said...

I get the following error, anyone seen it before?

Downloading: https://oss.sonatype.org/content/repositories/google-snapshots//com/google/gwt/gwt-dev/2.1-SNAPSHOT/gwt-dev-2.1-SNAPSHOT-windows.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] artifact not found - Unable to locate resource in repository

Try downloading the file manually from the project website.

Sam Brodkin said...

@PMMonkey I had the same problem, see the earlier comments.

David Chandler said...

@PMMonkey, which version of gwt-maven-plugin are you using?

PMMonkey said...

@David Chandler: Tried both 1.3-SNAPSHOT and 1.2.

@Sam Brodkin: Seems to be that I try to fetch a windows version of a file and you the mac version, while the correct is https://oss.sonatype.org/content/repositories/google-snapshots//com/google/gwt/gwt-dev/2.1-SNAPSHOT/gwt-dev-2.1-SNAPSHOT.jar (without the "-" suffix).

David Chandler said...

@PMMonkey, this is very odd, as platform-specific jars have not been used since before GWT 2.0. You might try posting on the gwt-maven-plugin list at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users.

Marius A said...

Do you plan to enable Google Eclipse Plugin generate (by default?) a maven project when going to File > New > Web app project?

David Chandler said...

@Marius: no, GPE will continue to generate a non-Maven project as default because lots of folks use it without Maven, but it will be able to read Maven pom.xml files in the future.

PMMonkey said...

@David Chandler: I looked into the details of this myself now and found out that it was actually two completely different errors in gwt-maven-plugin 1.2 and 1.3-SNAPSHOT. When adding http://nexus.codehaus.org/snapshots as a pluginrepository it actually works for me with 1.3-SNAPSHOT.

The pom.xml addition (for anyone experiencing the same) was:

<pluginRepositories>
<pluginRepository>
<id>gwt-maven.snapshots</id>
<url>http://nexus.codehaus.org/snapshots</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>false</enabled></releases>
</pluginRepository>
</pluginRepositories>