vaadin / multiplatform-runtime

4 stars 1 forks source link

Problem with widgetset compilation in Vaadin 23 + Vaadin 7.7.32 #112

Closed mlopezFC closed 2 years ago

mlopezFC commented 2 years ago

Description of the bug

In a simple Vaadin 23.0.9 + Vaadin 7.7.32 with MPR, when trying to compile the project, the widgetset compilation fails reporting an error with a gwt-user version that is different from the one explicitly used in the pom.xml file. In the pom.xml file I've explicitly defined that the gwt version being used is 2.8.2. If I run mvn dependency:tree I see that version 2.8.2 is being used, but then the errors mention version 2.7.0.vaadin7.

Minimal reproducible example

I'm attaching a simple project that is able to reproduce the issue. Just unzip it somewhere, and run mvn clean install mpr-v7-test.zip

Expected behavior

It should compile the project successfully

Actual behavior

The compilation fails with the following error:

[INFO] --- vaadin-maven-plugin:7.7.32:compile (default) @ mpr-v7-test ---
[INFO] auto discovered modules [AppWidgetset]
[INFO] Compiling module AppWidgetset
[INFO]    Tracing compile failure path for type 'java.util.InternalJsStringMap'
[INFO]       [ERROR] Errors in 'jar:file:/C:/Users/xxxx/.m2/repository/com/vaadin/external/gwt/gwt-user/2.7.0.vaadin7/gwt-user-2.7.0.vaadin7.jar!/com/google/gwt/emul/java/util/InternalJsStringMap.java'

Versions:

mlopezFC commented 2 years ago

I was able to solve this issue inspired in this article, and did the following modifications:

* Avoid calling the goal "compile" in the vaadin-maven-plugin
* Added a new maven plugin configuration:

...

org.codehaus.mojo gwt-maven-plugin ${vaadin.gwt.version} ${basedir}/target/classes/VAADIN/widgetsets compile

...



And that did the trick, so I'm closing the ticket.