HELP ! need to go from java 11 to 21.

21 views
Skip to first unread message

Régis Millet

unread,
10:06 AM (9 hours ago) 10:06 AM
to GWT Users
Hello.
I don't see my previous message so I think it was not sent.
Sorry if it comes twice.

I inherited an old GWT 2.11 projet in java 11 (on intellij)
all GWT (client and server) are in the same module, only BD access is in another one

I never got a formation for GWT and am learning "on the fly" when needed.

I need to migrate to java 17 then 21.
So I need to go to GWT 2.12+
the project uses mojo 2.10, so I am stuck.

I tried to understand of ltgt maven module works, but my english is not good enough, since no code is generated, so maven compile fails on Messages class imports (I18n)

can someone help ?

my pom configuration : 



<!-- GWT Maven Plugin -->
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.2.0</version>
<extensions>true</extensions>
<configuration>
<moduleName>${path.to.entry.point}</moduleName>
<moduleShortName>BB</moduleShortName>
<classpathScope>compile+runtime</classpathScope>
<webappDirectory>${webappDirectory}</webappDirectory>

<startupUrls>
<startupUrl>XXX.html</startupUrl>
</startupUrls>


</configuration>

<executions>
<execution>
<goals>
<goal>generate-module</goal>
<goal>codeserver</goal>
</goals>
</execution>
</executions>
</plugin>


and maven log are:


[INFO] --- gwt-maven-plugin:1.2.0:generate-module (default) @ sievClient ---
[INFO] Overriding module short name **** with *****
[INFO] FF.gwt.xml up to date - skipping
[INFO]
[INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ sievClient ---
[INFO] Copying 0 resource from src\main\resources to target\ff\WEB-INF\classes
[INFO] Copying 50 resources from src\main\resources to target\ff\WEB-INF\classes
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ ff---
[INFO] Changes detected - recompiling the module!

and then all the compilation errors


can someone help me (if possible french help, my technical english is bad)


Colin Alworth

unread,
10:10 AM (9 hours ago) 10:10 AM
to GWT Users
(I approved this one, as I wasn't in time to approve the first before you sent it, and this has a little more detail than the first. Both were caught as spam.)

Can you share the full log you get when the compile fails? It is hard to guess what could be wrong without it.

There was a regression as part of GWT 2.13 development for the i18n creator, but it was reverted. It also appears that you're using 2.12, so shouldn't be impacted by that anyway.

Régis Millet

unread,
10:27 AM (9 hours ago) 10:27 AM
to GWT Users
I did not try to go to 2.13 indeed. but will probably.


here is the trace with some renaming to hide real names of company


                                                                            [pom]
[INFO]
[INFO] -------------------------< fr.b:fffClient >-------------------------
[INFO] Building fffClient (GWT) 3.4.0                                    [1/2]
[INFO]   from fffClient\pom.xml
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- gwt-maven-plugin:1.2.0:generate-module (default) @ fffClient ---
[INFO] Overriding module short name FFF with fffClient
[INFO] C:\GIT\fff\fffClient\target\fffClient-3.4.0\WEB-INF\classes\fr\a\b\c\client\FFF.gwt.xml up to date - skipping
[INFO]
[INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ fffClient ---
[INFO] Copying 0 resource from src\main\resources to target\fffClient-3.4.0\WEB-INF\classes
[INFO] Copying 50 resources from src\main\resources to target\fffClient-3.4.0\WEB-INF\classes
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ fffClient ---

[INFO] Changes detected - recompiling the module!
[INFO] Compiling 363 source files to C:\GIT\fff\fffClient\target\fffClient-3.4.0\WEB-INF\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/GIT/fff/fffClient/src/main/java/fr/a/b/c/client/home/XXXHome.java:[18,33] cannot find symbol
  symbol:   class Messages
  location: package fr.a.b.c.client

my packaging is war  (I tried gwt-app but it is the wame and if I understood well, it is only if I separate the server side and the client (ihm) size ?)

all classes that were generated (like the XXXServiceAsync classes are missing too)

my "Messages.properties" file is in a subpackage of the resources folder

I see that the generated gwt.xml file is in the "client" subpackage (in previous version it was on folder upper) maybe it is a sign ?

Colin Alworth

unread,
10:30 AM (9 hours ago) 10:30 AM
to GWT Users
It looks like you need to run the I18nCreator to create your messages .java file from the .properties file. The new plugin doesn't do this for you or have a goal to support it, instead you need to invoke it directly via the exec-maven-plugin. See https://github.com/tbroyer/gwt-maven-plugin/issues/18 and https://github.com/tbroyer/gwt-maven-plugin/issues/119 for more discussion.

Thomas Broyer

unread,
10:38 AM (9 hours ago) 10:38 AM
to GWT Users
On Wednesday, March 25, 2026 at 3:30:45 PM UTC+1 Colin Alworth wrote:
It looks like you need to run the I18nCreator to create your messages .java file from the .properties file. The new plugin doesn't do this for you or have a goal to support it, instead you need to invoke it directly via the exec-maven-plugin.

As I said in those issues, I highly suggest "owning" the code rather than having it generated at build time. So rather than hacking around in the POMs to call those tools on each build, I suggest "just" copying what the org.codehaus.mojo:gwt-maven-plugin generates into your own codebase and call it a day.

Thomas Broyer

unread,
10:58 AM (9 hours ago) 10:58 AM
to GWT Users
On Wednesday, March 25, 2026 at 3:27:47 PM UTC+1 mille...@gmail.com wrote:

I see that the generated gwt.xml file is in the "client" subpackage (in previous version it was on folder upper) maybe it is a sign ?


Is "${path.to.entry.point}" in your pom.xml snippet in previous message the name of your entry-point class? It should be the name of the module as you would <inherits> it from (or in other words, the name of the file you want generated, with directory separators replaced with " dot, and with the ".gwt.xml" filename extension stripped)

Régis Millet

unread,
12:32 PM (7 hours ago) 12:32 PM
to GWT Users
yes, it is the path to the main class which implements EntryPoint
the name is the same, but it explains why it is in another package. just changed it.
I put back mojo plugin for i18n and ASync. Not fluent enough to write them everytime something changes and it helps going faster.

thanks a lot.
Reply all
Reply to author
Forward
0 new messages