Vertispan / j2clmavenplugin

Maven plugin to launch new J2CL compilation
https://vertispan.github.io/j2clmavenplugin/
Apache License 2.0
53 stars 26 forks source link

Update integration tests to support Java 17 #159

Closed niloc132 closed 9 months ago

niloc132 commented 2 years ago
java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties
    at com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit> (PropertiesConverter.java:46)
    at com.thoughtworks.xstream.XStream.setupConverters (XStream.java:647)
    at com.thoughtworks.xstream.XStream.<init> (XStream.java:445)
    at com.thoughtworks.xstream.XStream.<init> (XStream.java:385)
    at com.thoughtworks.xstream.XStream.<init> (XStream.java:342)
    at org.apache.maven.plugin.war.util.WebappStructureSerializer.<clinit> (WebappStructureSerializer.java:47)
    at org.apache.maven.plugin.war.AbstractWarMojo.<init> (AbstractWarMojo.java:316)
    at org.apache.maven.plugin.war.WarMojo.<init> (WarMojo.java:49)

This is a new failure that started happening in several tests when using Java 17.

To reproduce this, check out the repo and perform mvn verify -Dinvoker.test=hello-world-single, then check the log at j2cl-maven-plugin/target/it-tests/hello-world-single/build.log. The pom file to update is at j2cl-maven-plugin/src/it/hello-world-single/pom.xml. Note that other integration tests are also failing in this way, but this is just a simple example to verify the issue.

Very likely we just need to update the version of the war plugin in the various failing poms, but need to take care to keep compatibility with older maven/java versions, if possible.

(edit: this applies to java17+, I was confused by the fail-fast behavior in the ci run.)