Migrating maven gwt plugin

88 views
Skip to first unread message

Simon Callan

unread,
Apr 23, 2025, 9:20:39 AMApr 23
to GWT Users
With the release of GWT 2.12, the old (legacy) GWT maven plugin has stopped working, and I need to migrate to the new (tbroyer?) plugin.

As a result of this change, I am getting a lot of "cannot find symbol" errors:

cannot find symbol
  symbol:   class CCServiceAsync
  location: package com.infoshare.clearcore.client.services

These appear to be the asynchronous services that the client uses to contact the backend, and that I think were previously generated by the "generateAsync" goal.

How do I get rid of these errors?

Simon

Colin Alworth

unread,
Apr 23, 2025, 11:31:06 AMApr 23
to GWT Users
Can you confirm what version of GWT last successfully worked for you? Did you change anything else at the same time?

The GWT 2.12.2 release changed very little over 2.12.1, so it seems likely that you made bigger changes than just this version bump. From the issue tracker, the old gwt-maven-plugin didnt work with GWT 2.11 either, so likely you changed from GWT 2.10 (or older), and possibly made other changes too?

What happens if you directly run the generateAsync goal, are there log messages that might give hints here?

Simon Callan

unread,
Apr 24, 2025, 6:55:05 AMApr 24
to GWT Users
The previous GWT version I was using was 2.11, and the only changes I made was adding javax.servlet-api, gwt-dev, and the new maven plugin,

<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<moduleName>com.infoshare.clearcore.ClearCore</moduleName>
</configuration>
</plugin>

Having had a quick look through the source code of both the old and new plugins, it seem the new plugin does not support the "generateAsync" option that the old one did, and which generated the required Async code.

Was this a deliberate choice, and is there some way I can actually generate this code?

Simon

Colin Alworth

unread,
Apr 24, 2025, 7:27:15 AMApr 24
to GWT Users
I'd suggest one change at a time, so you can understand the differences - from the way you phrased the problem, it sounded like "the old GWT maven plugin stopped working" and the symptom of that was that you were missing your async RemoteService.

The reality is almost certainly that the ltgt gwt-maven-plugin does not have a goal to do your async RemoteService generation, so you "broke" it when you changed the plugin.

Instead, I suggest one of two things, either:
 * First update GWT, work out the new failure you're encountering there, and then consider the gwt-maven-plugin change, or
 * First change plugins (which will also require adding gwt-dev if you don't have it already), then update GWT.

https://github.com/gwt-maven-plugin/gwt-maven-plugin/issues/174 was the issue I was referencing that suggests that the old plugin doesn't work even with GWT 2.11 - it might make sense to double check that you're actually compiling with 2.11.0 (and thus the new groupId, org.gwtproject rather than com.google.gwt), or if you have a mixture of versions already on your classpath...

Thomas Broyer

unread,
Apr 24, 2025, 9:58:17 AMApr 24
to GWT Users
On Thursday, April 24, 2025 at 12:55:05 PM UTC+2 simon....@infoshare-is.com wrote:
Having had a quick look through the source code of both the old and new plugins, it seem the new plugin does not support the "generateAsync" option that the old one did, and which generated the required Async code.

Was this a deliberate choice, and is there some way I can actually generate this code?

TL;DR: retrieve the code generated by gwt:generateAsync from before changing the plugin and commit it into your codebase.
Reply all
Reply to author
Forward
0 new messages