Juraj Homola
Juraj Homola

Reputation: 41

Compilation GWT with jdk17

I'm trying to migrate gwt application from java 1.8 to 17 (java source remains in 1.8).

I'm using gwt-maven-plugin version 2.9.0. Compilation with open JDK 17 based on logs looks ok, there are no errors, comparing to compilation with JDK1.8 debug logs look the same. All files (such css, images, js, rpc.log, gwt.log and so on) are based on log created.

But when compilaiton is finished, module directory in war remains empty, there is just directory structure but no files (e.g. gwt.rpc, resources, cache.js,nocache.js... are missing).

In log is mentioned "Compile of permutations succeeded .... Linking succeeded". Content of directory gwt-unitCache looks also ok.

Do you have some idea why that happens?

Thanks a lot!

Part of log:

Compiling 2 permutations
16:19:20 [Thread-95] [INFO]       Creating worker permutation 0 of 2
16:19:20 [Thread-95] [INFO]       Creating worker permutation 1 of 2
16:19:20 [Thread-95] [INFO]       Creating PermutationWorkerFactory instances
16:19:20 [Thread-95] [INFO]       Compiling permutation 0...
16:19:29 [Thread-95] [INFO]       Compiling permutation 1...
16:23:17 [Thread-95] [INFO]       Splitting JavaScript for incremental download
16:23:18 [Thread-95] [INFO]       Splitting JavaScript for incremental download
16:23:21 [Thread-95] [INFO]          Fixed up load-order dependencies for instance methods by moving 0 types to fragment 0, out of 31425
....
16:25:26 [Thread-95] [INFO]          Done
16:25:26 [Thread-95] [INFO]       Permutation took 365658 ms
16:25:27 [Thread-95] [INFO]          Done
16:25:27 [Thread-95] [INFO]       Permutation took 366193 ms
16:25:27 [Thread-95] [INFO]       Successfully compiled permutation
16:25:27 [Thread-95] [INFO]       Successfully compiled permutation
16:25:27 [Thread-95] [INFO]    Compile of permutations succeeded
16:25:27 [Thread-95] [INFO]    Compilation succeeded -- 2112.388s
16:25:27 [Thread-95] [INFO] Linking into D:\zzz\applications\xxx\target\xxx-1.0-SNAPSHOT\yyyyy

Upvotes: 3

Views: 3018

Answers (2)

Juraj Homola
Juraj Homola

Reputation: 41

Just one workaround that worked -> set different output directory for plugin gwt-maven-plugin with parameter webappDirectory, e.g. d:\output

Then output if generated correctly. Then copy content back to target war directory.

Upvotes: 1

Robert Newton
Robert Newton

Reputation: 1611

In your compilation output you should see the directory that the GWT compiler is storing the GWT application files.

[INFO] --- gwt-maven-plugin:2.8.2:compile (default) @ Foo ---
[INFO] Compiling module com.me.Foo
[INFO] Linking into /home/.../Foo/target/Foo-1.2.1-SNAPSHOT/Foo
[INFO]    Link succeeded

If that directory is empty, something very odd is happening; try deleting the target directory and try compiling again.

Upvotes: 0

Related Questions