Maven/Surefire can't execute Spock and JUnit in the same project - java

Env
java
$ java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
maven
$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.3\plugins\maven\lib\maven3
Java version: 1.8.0_231, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_231\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
pom.xml -- Forked from spockframework/spock-example
Problem
I forked spockframework/spock-example add java test directory and HelloJUnitTest.java => sunzy/spock-exmaple
the Spock Tests can execute,but JUnit Tests can't
Snapshots
mvn clean test
only spock tests!
mvn clean test -Dtest=HelloJUnitTest
JUnit Test had generate in target/test-classes*
mvn clean test -Dtest=HelloSpocSpec
mvn -X include test-clasess

Okay, I have taken a look at your project. As you said, it is just the Spock sample project, upgraded to run Spock 2 tests. BTW, it still should be upgraded further, because in the current configuration compilation does not work with current Java versions, but that is off topic here, I am just mentioning it because I ran into a problem and then downgraded to Java 8 in order quickly reproduce your actual problem. The JUnit test's package name is not the problem either, even though the default package is always ugly, just like for the Spock tests.
Spock 1.x is based on JUnit 4, but Spock 2.x is based on JUnit 5 platform. This is also the one automatically found by Surefire when analysing the project dependencies. If you want Surefire to run multiple engines in parallel, you need to configure the corresponding providers as plugin dependencies, as mentioned here.
In your case, just add this to the POM:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<useFile>false</useFile>
<includes>
<include>**/*Test.java</include>
<include>**/*Spec.java</include>
</includes>
</configuration>
<!-- Run Spock 2 and JUnit 4 tests in parallel -->
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>3.0.0-M4</version>
</dependency>
</dependencies>
</plugin>
It also makes sense to explicitly add a test-scoped dependency to JUnit 4.12 or 4.13 to your POM because JUnit 4.12 is only a transitive dependency in your current POM. But later Spock 2 versions might remove that dependency because it is not really needed. I think that already happened with 2.0-M3. So be careful.
After this change, Maven says:
[INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) # spock-example ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running HelloJUnitTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.059 s - in HelloJUnitTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running DatabaseDrivenSpec
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.171 s - in DatabaseDrivenSpec
(...)
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 39, Failures: 0, Errors: 0, Skipped: 0
If you decide to upgrade from JUnit 4 to 5, maybe configuration gets easier for you because then both Spock and JUnit use the same provider. In that case please add a JUnit 5 dependency so your tests can import the corresponding test annotations and assertion methods.
Update: After #khmarbaise commented on using vintage engine and me fully agreeing that it is the better solution, I want to show you how to do that instead of adding plugin dependencies to Surefire. (So you can delete those if you want to use this solution):
<dependency> <!-- only required if you want to run JUnit 4 tests alongside Spock 2 -->
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.5.2</version>
<scope>test</scope>
</dependency>
Why version 5.5.2 and not e.g. 5.6.2? In order to avoid version conflicts and subsequent warnings about vintage engine not finding tests in the Groovy directory. This is just because the POM in this sample project still uses a Spock 2.0-M1 BOM. As I said, it ought to be updated. But with this version it just works because it depends on the same JUnit 5 platform version as Spock in this configuration.
BTW, now Maven executes the Spock tests first and then the JUnit 4 tests, so the log output for both would be in reverse order.

Related

mvn test after update to java 19 brings [ERROR] Error occurred during initialization of boot layer

I'm still working on a multi-module maven project which I upgraded from openJDK 15 to openJDK 19. I'm working on a MBP with macOS 13 Ventura.
Before the upgrade the unit test are passing with the maven-surefire-plugin without any problems.
After upgrading to openJDK 19 the mvn clean test command fails with the following error-message.
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) # core ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[ERROR] Error occurred during initialization of boot layer
[ERROR] java.lang.module.FindException: Module javafx.graphics not found, required by common
I downloaded the files (openJDK 19 and JavaFX 19), unzipped them to a desired location, added an environment variable pointing to the lib directory of the runtime.
I can run the program from IntelliJ without any problems.
My question is, what did I missed in the configuration to get the test running?
My issues are gone with the advice from #Slavomir Jaranowski.
The changed pom looks like
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<!--<skipTests>${skipUnitTests}</skipTests>-->
<testFailureIgnore>false</testFailureIgnore>
<forkCount>1.5C</forkCount>
<reuseForks>true</reuseForks>
<parallel>methods</parallel>
<threadCount>4</threadCount>
<useUnlimitedThreads>true</useUnlimitedThreads>
<perCoreThreadCount>true</perCoreThreadCount>
<reportFormat>plain</reportFormat>
<trimStackTrace>false</trimStackTrace>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
The configuration is not finished yet.

Java project with Maven dependency compiles but fails at runtime

EDIT: This question should absolutely not be closed. I'm NOT asking how to create an executable jar. A jar doesn't need to be executable to be run from the terminal. For example, if I have have this code:
package com.dogzilla.maven.quickstart;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World" );
}
}
...and Maven builds it, it creates quickstart-0.0.1-SNAPSHOT.jar. Which is not, ahem, 'executable'.
I can run it from the terminal quite successfully with this:
java -cp /opt/workspace/eclipse/java/quickstart/target/quickstart-0.0.1-SNAPSHOT.jar com.dogzilla.maven.quickstart.App
The problem, as I have written below, is experienced when using an external dependency. </end edit>
I have a simple Maven project in Eclipse (2020-6). It was set up by doing the following in Eclipse:
1. File -> New -> Other... Maven -> Maven Project
2. Used the maven-archetype-quickstart archetype
Group ID: com.dogzilla.maven
Artifact ID: quickstart
Right click the pom file -> select Add Dependency -> enter:
Group ID: com.google.code.gson
Artifact ID: gson
Version: 2.8.6
Which I verified on https://search.maven.org/
Here's the POM file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.dogzilla.maven</groupId>
<artifactId>quickstart</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>quickstart</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Here's the source code:
package com.dogzilla.maven.quickstart;
import com.google.gson.Gson;
public class App
{
public static void main( String[] args )
{
Gson gson = new Gson();
System.out.println(gson.toJson("Hello World!") );
}
}
I then right-clicked on the POM file -> Run As -> Maven Build...
and here is the output:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/eclipse/java/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/opt/eclipse/java/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/eclipse/java/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/opt/eclipse/java/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.dogzilla.maven:quickstart >--------------------
[INFO] Building quickstart 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # quickstart ---
[INFO] Deleting /opt/workspace/eclipse/java/quickstart/target
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) # quickstart ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/workspace/eclipse/java/quickstart/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) # quickstart ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /opt/workspace/eclipse/java/quickstart/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) # quickstart ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/workspace/eclipse/java/quickstart/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) # quickstart ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /opt/workspace/eclipse/java/quickstart/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) # quickstart ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.dogzilla.maven.quickstart.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 s - in com.dogzilla.maven.quickstart.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) # quickstart ---
[INFO] Building jar: /opt/workspace/eclipse/java/quickstart/target/quickstart-0.0.1-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.967 s
[INFO] Finished at: 2020-12-13T20:00:27-07:00
[INFO] ------------------------------------------------------------------------
But if I run:
java -cp /opt/workspace/eclipse/java/quickstart/target/quickstart-0.0.1-SNAPSHOT.jar com.dogzilla.maven.quickstart.App
It fails with:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gson/Gson
at com.dogzilla.maven.quickstart.App.main(App.java:13)
Caused by: java.lang.ClassNotFoundException: com.google.gson.Gson
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 1 more
The thing is if I change System.out.println(gson.toJson("Hello World!") ); to plain 'ol System.out.println("Hello World"); it works. So I know the porblem isn't with my java command or how I set the project up outside of the dependency getting resolved.
So the question is, I'm not sure how this is failing on the dependency. I was under the impression Maven managed all that for you. Why is this failing to run?
The jar file that created from your project only contains classes that written by you. If you need to run the application, you need to include all the necessary dependencies (either direct or transitive) in your classpath.
If you need a single jar file that you can execute without other dependencies, Please follow this to create a fatjar.
Use the Maven plugin mentioned in comment https://stackoverflow.com/a/65486325/679858 or use the Maven Shade plugin described here: https://maven.apache.org/plugins/maven-shade-plugin/
Your question was "Why does it run from Eclipse and not from console?":
If you run it from Eclipse then the Maven plugin in Eclipse knows the full runtime classpath and so it works. If you run it in console with the created JAR file then that JAR file only contains the classes of your sources but not the transitive dependencies, e.g. Google GSON. But if you use the Maven Assembly plugin or the Maven Shade plugin then you can create a JAR file which contains all the transitive dependencies of your project. That jar could be executed like you wrote it in your example.
try remove gson from .m2 folder then run maven install again.
You are not providing the path to the additional, transitive, dependencies of your project in the java command, which is why it fails.
You are using maven to build your project, not to execute your class: this is not Maven purpose, although it can do it using maven-exec-plugin. Eclipse is different: it uses Maven information (with m2e) and provides a context to run classes, context that includes dependencies.
The option -cp, explained in depth at Oracle Web Site: java (15), accepts one or more path to list of directories, jar and zip to search for class files:
--class-path classpath, -classpath classpath, or -cp classpath
A semicolon (;) separated list of directories, JAR archives, and ZIP archives to search for class files.
Specifying classpath overrides any setting of the CLASSPATH environment variable. If the class path option isn't used and
classpath isn't set, then the user class path consists of the current
directory (.).
As a special convenience, a class path element that contains a base name of an asterisk (*) is considered equivalent to specifying a
list of all the files in the directory with the extension .jar or .JAR
. A Java program can't tell the difference between the two
invocations. For example, if the directory mydir contains a.jar and
b.JAR, then the class path element mydir/* is expanded to A.jar:b.JAR,
except that the order of JAR files is unspecified. All .jar files in
the specified directory, even hidden ones, are included in the list. A
class path entry consisting of an asterisk (*) expands to a list of
all the jar files in the current directory. The CLASSPATH environment
variable, where defined, is similarly expanded. Any class path
wildcard expansion that occurs before the Java VM is started. Java
programs never see wildcards that aren't expanded except by querying
the environment, such as by calling System.getenv("CLASSPATH").
So you need to fix your command to provides gson and any other compile/runtime/provided dependencies you may add later:
CLASSPATH=''
CLASSPATH+=";$HOME/.m2/repository/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar"
CLASSPATH+=";/opt/workspace/eclipse/java/quickstart/target/quickstart-0.0.1-SNAPSHOT.jar"
CLASSPATH="${CLASSPATH:1}" # remove leading ';'
java -cp "${CLASSPATH}" com.dogzilla.maven.quickstart.App
The man says that you can use ; to separate entries; that is true at least for Windows. However on other Linux based OS (which seems to are on due to /opt being used), this can also be :: that what appassembler does when writing CLASSPATH.
Do note that you will have to adapt the path manually to retarget the actual location of gson.jar (I guessed from what maven does by default).
You can also use appassembler or launch4j to do the trick for you. You can also use build-classpath to build the classpath (it may also work from command line).

Running pitest with maven fails to find or load org.pitest.coverage.execute.CoverageMinion

I am learning about mutation testing with pitest and facing problems when I try to run it with maven. In my pom.xml I have the pitest dependency:
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest</artifactId>
<version>1.5.2</version>
</dependency>
I also have the plugin:
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<id>pit-report</id>
<!-- optional, this example attached the goal into mvn test phase -->
<phase>test</phase>
<goals>
<goal>mutationCoverage</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>0.12</version>
</dependency>
</dependencies>
<configuration>
<targetClasses>
<param>mypackage.myClass*</param>
</targetClasses>
<targetTests>
<param>mypackage*</param>
</targetTests>
</configuration>
</plugin>
However, when I run mvnw.cmd verify test -Dverbose it reports that it found the mutation engine, Junit 5 and the Junit plugin, adds the junit 5 plugin to the classpath, adds pitest to the classpath, and then fails to find and load main class org.pitest.coverage.execute.CoverageMinion and doesn't do any mutation testing:
[INFO] --- pitest-maven:1.5.2:mutationCoverage (pit-report) # myProject ---
[...]
[INFO] Found plugin : Mutant export plugin
[INFO] Found shared classpath plugin : Default mutation engine
[INFO] Found shared classpath plugin : JUnit 5 test framework support
[INFO] Found shared classpath plugin : JUnit plugin
[INFO] Found shared classpath plugin : TestNG plugin
[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath
[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from C:\Users\myUser\myWorkspace\myProject\target\classes
[...]
13:20:27 PIT >> FINE : Running report with ReportOptions [targetClasses=[mypackage.myClass*], excludedMethods=[], excludedClasses=[], excludedTestClasses=[], codePaths=[C:\Users\myUser\myWorkspace\myProject\target\classes], reportDir=C:\Users\myUser\myWorkspace\myProject\target\pit-reports, historyInputLocation=null, historyOutputLocation=null, sourceDirs=[C:\Users\myUser\myWorkspace\myProject\src\main\java, C:\Users\myUser\myWorkspace\myProject\src\test\java], classPathElements=[C:\Users\myUser\myWorkspace\myProject\target\test-classes, C:\Users\myUser\myWorkspace\myProject\target\classes, C:\Users\myUser\.m2\repository\org\junit\jupiter\junit-jupiter\5.7.0\junit-jupiter-5.7.0.jar, C:\Users\myUser\.m2\repository\org\junit\jupiter\junit-jupiter-params\5.7.0\junit-jupiter-params-5.7.0.jar, C:\Users\myUser\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.7.0\junit-jupiter-engine-5.7.0.jar, C:\Users\myUser\.m2\repository\org\junit\platform\junit-platform-engine\1.7.0\junit-platform-engine-1.7.0.jar, C:\Users\myUser\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.7.0\junit-jupiter-api-5.7.0.jar, C:\Users\myUser\.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar, C:\Users\myUser\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar, C:\Users\myUser\.m2\repository\org\junit\platform\junit-platform-commons\1.7.0\junit-platform-commons-1.7.0.jar, C:\Users\myUser\.m2\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar, C:\Users\myUser\.m2\repository\org\pitest\pitest\1.5.2\pitest-1.5.2.jar, C:\Users\myUser\.m2\repository\org\pitest\pitest-junit5-plugin\0.12\pitest-junit5-plugin-0.12.jar, C:\Users\myUser\.m2\repository\org\pitest\pitest\1.5.2\pitest-1.5.2.jar], mutators=[], features=[], dependencyAnalysisMaxDistance=-1, jvmArgs=[-Djava.awt.headless=true], numberOfThreads=1, timeoutFactor=1.25, timeoutConstant=3000, targetTests=[^myPackage.*$], loggingClasses=[], maxMutationsPerClass=0, verbose=true, failWhenNoMutations=true, outputs=[HTML], groupConfig=TestGroupConfig [excludedGroups=[], includedGroups=[]], fullMutationMatrix=false, mutationUnitSize=0, shouldCreateTimestampedReports=true, detectInlinedCode=true, exportLineCoverage=false, mutationThreshold=0, coverageThreshold=0, mutationEngine=gregor, javaExecutable=null, includeLaunchClasspath=true, properties={}, maxSurvivors=0, excludedRunners=[], includedTestMethods=[], testPlugin=junit5, useClasspathJar=false, skipFailingTests=false]
13:20:27 PIT >> FINE : System class path is C:\Users\myUser\myWorkspace\myProject\.mvn\wrapper\maven-wrapper.jar
13:20:27 PIT >> FINE : Maximum available memory is 1796 mb
13:20:27 PIT >> FINE : MINION : Installing PIT agent
13:20:27 PIT >> INFO : MINION : Error: Could not find or load main class org.pitest.coverage.execute.CoverageMinion
Initially I thought it would be a problem with the classpath, given the error message, but the above logs show that the classpath being used includes the relevant jars and paths. What else could I be doing wrong? Thanks in advance.
For anyone running into the same problem, my mistake was that I assumed the classpath to be correct, but it wasn't. It seems the logs don't take into account the value of the classpath environment variable, and in my computer that variable had a value, when it shouldn't be set. Unsetting it with set classpath= solved the classpath issues that were causing the error with pitest.

How to stop the maven-release-plugin from using an old version of the maven-gpg-plugin

How can I configure the maven-release-plugin to use version 1.6 of the maven-gpg-plugin in my pom.xml?
When I run mvn release:prepare, the maven-release-plugin (version 2.5.3) is executing a sub-process that uses a very old version of the maven-gpg-plugin (1.1):
$ mvn release:prepare
...
[INFO] --- maven-release-plugin:2.5.3:prepare (default-cli) # heroku-sdk-parent ---
...
[INFO] Executing goals 'clean verify'...
...
[INFO] --- maven-gpg-plugin:1.1:sign (sign-artifacts) # heroku-sdk-parent ---
Eventually this gives me an error because the maven-gpg-plugin:1.1 doesn't work with the gpg 2.2.4 on my machine. Nothing I've tried has worked.
You can find the actual project I'm working with here:
https://github.com/heroku/heroku-maven-plugin
You can reproduce with:
$ git clone https://github.com/heroku/heroku-maven-plugin
$ cd heroku-maven-plugin
$ ./mvnw release:prepare -DdryRun
The problem was my use of a deprecated oss-parent pom from Sonatype.
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
I removed this, and my build started working.

Maven Compile GWT & OpenJDK 11

Recently, I am trying to switch my project to use OpenJDK 11, however the Maven build is failing because one of the GWT modules is failing to compile.
The project currently uses GWT 2.6.0, and I've tried updating to 2.8.2 if any of the newer versions is compatible with OpenJDK 11. The build is run from Eclipse IDE 4.9.0
When running with 2.6.0, the following error occurs:
Compiling module XXXXModule
[INFO] Looking for precompiled archives. To disable, use -Dgwt.usearchives=false
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/user/User.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/core/Core.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/regexp/RegExp.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/web/bindery/event/Event.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/xml/XML.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/json/JSON.gwtar
[INFO] Found 0 cached/archived units. Used 0 / 0 units from cache.
[INFO] Compiling...
[INFO] Compilation completed in 0.00 seconds
[INFO] Added 0 units to cache since last cleanup.
[INFO] Validating units:
[INFO] Removing invalidated units
[INFO] Checked 0 dependencies for errors.
[INFO] [ERROR] Unable to find type 'java.lang.Object'
[INFO] [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
[INFO] Shutting down PersistentUnitCache thread
....
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.0:compile (default) on project tlm-war: Command [[
[ERROR] C:\jdk-11.0.1\bin\java -Xmx512M -Xss1024k -classpath .... -localWorkers 4 -XfragmentCount -1 -sourceLevel auto -gen C:\Users\XXXX\gitrepos\XXXX\XXXX\XXXX\target\.generated XXXXModule XXXXModule XXXXModule XXXXModule
But investigating XXXXModule.gwt.xml, the file does include 'Core'
<module>
<inherits name="com.google.gwt.user.User" />
<inherits name="com.smartgwt.SmartGwt" />
....
I did some investigation online, and according to this answer, Migrating a GWT 2.5 web app to Java 10, I should try upgrading to GWT 2.8.2, but the build gets another issue:
[ERROR] Unexpected internal compiler error
[INFO] java.lang.SecurityException: class "org.eclipse.jdt.internal.compiler.ast.LambdaExpression"'s signer information does not match signer information of other classes in the same package
[INFO] at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1150)
[INFO] at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:905)
[INFO] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1014)
[INFO] at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
[INFO] at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
[INFO] at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
[INFO] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
[INFO] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
[INFO] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
[INFO] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.<init>(GwtAstBuilder.java:3881)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3970)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:129)
[INFO] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:336)
[INFO] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
[INFO] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1040)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:325)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:548)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:479)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:465)
[INFO] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:222)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:125)
Has anyone else been successful in compiling GWT 2.6-2.8.2 with OpenJDK 11?
EDIT:
Snippet of pom.xml
....
<properties>
<gwt.version>2.8.2</gwt.version>
<smartgwt.version>2.4</smartgwt.version>
</properties>
....
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<execution>
<configuration>
<modules>
<module>XXXXModule</module>
<module>XXXXModule</module>
<module>XXXXModule</module>
<module>XXXXModule</module>
</modules>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<logLevel>DEBUG</logLevel>
</configuration>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Classpath:
C:\Users\XXXX\.m2\repository\com\google\gwt\gwt-servlet\2.8.2\gwt-servlet-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\google\gwt\gwt-user\2.8.2\gwt-user-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\google\jsinterop\jsinterop-annotations\1.0.2\jsinterop-annotations-1.0.2.jar
C:\Users\XXXX\.m2\repository\com\google\jsinterop\jsinterop-annotations\1.0.2\jsinterop-annotations-1.0.2-sources.jar
C:\Users\XXXX\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar
C:\Users\XXXX\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar
C:\Users\XXXX\.m2\repository\javax\servlet\javax.servlet-api\3.0.1\javax.servlet-api-3.0.1.jar
C:\Users\XXXX\.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar
C:\Users\XXXX\.m2\repository\com\smartgwt\smartgwt\2.4\smartgwt-2.4.jar
C:\Users\XXXX\.m2\repository\com\smartgwt\smartgwt-skins\2.4\smartgwt-skins-2.4.jar
C:\Users\XXXX\.m2\repository\org\slf4j\slf4j-api\1.7.6\slf4j-api-1.7.6.jar
C:\Users\XXXX\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.6\jcl-over-slf4j-1.7.6.jar
C:\Users\XXXX\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.6\log4j-over-slf4j-1.7.6.jar
C:\Users\XXXX\.m2\repository\ch\qos\logback\logback-classic\1.1.1\logback-classic-1.1.1.jar
C:\Users\XXXX\.m2\repository\ch\qos\logback\logback-core\1.1.1\logback-core-1.1.1.jar
C:\Users\XXXX\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar
C:\Users\XXXX\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar
C:\Users\XXXX\.m2\repository\org\jasypt\jasypt\1.9.2\jasypt-1.9.2.jar
C:\Users\XXXX\.m2\repository\org\hibernate\hibernate-core\4.3.5.Final\hibernate-core-4.3.5.Final.jar
C:\Users\XXXX\.m2\repository\org\jboss\logging\jboss-logging\3.1.3.GA\jboss-logging-3.1.3.GA.jar
C:\Users\XXXX\.m2\repository\org\jboss\logging\jboss-logging-annotations\1.2.0.Beta1\jboss-logging-annotations-1.2.0.Beta1.jar
C:\Users\XXXX\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.0.0.Final\jboss-transaction-api_1.2_spec-1.0.0.Final.jar
C:\Users\XXXX\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar
C:\Users\XXXX\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar
C:\Users\XXXX\.m2\repository\org\hibernate\common\hibernate-commons-annotations\4.0.4.Final\hibernate-commons-annotations-4.0.4.Final.jar
C:\Users\XXXX\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar
C:\Users\XXXX\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar
C:\Users\XXXX\.m2\repository\org\jboss\jandex\1.1.0.Final\jandex-1.1.0.Final.jar
C:\Users\XXXX\.m2\repository\org\hibernate\hibernate-jpamodelgen\4.3.5.Final\hibernate-jpamodelgen-4.3.5.Final.jar
C:\Users\XXXX\.m2\repository\org\hibernate\hibernate-tools\4.3.1.CR1\hibernate-tools-4.3.1.CR1.jar
C:\Users\XXXX\.m2\repository\org\hibernate\hibernate-entitymanager\4.3.1.Final\hibernate-entitymanager-4.3.1.Final.jar
C:\Users\XXXX\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar
C:\Users\XXXX\.m2\repository\freemarker\freemarker\2.3.8\freemarker-2.3.8.jar
C:\Users\XXXX\.m2\repository\org\hibernate\jtidy\r8-20060801\jtidy-r8-20060801.jar
C:\Users\XXXX\.m2\repository\org\eclipse\tycho\org.eclipse.jdt.core\3.9.1.v20130905-0837\org.eclipse.jdt.core-3.9.1.v20130905-0837.jar
C:\Users\XXXX\.m2\repository\org\eclipse\text\3.3.0-v20070606-0010\text-3.3.0-v20070606-0010.jar
C:\Users\XXXX\.m2\repository\org\eclipse\core\commands\3.3.0-I20070605-0010\commands-3.3.0-I20070605-0010.jar
C:\Users\XXXX\.m2\repository\org\eclipse\equinox\common\3.6.200-v20130402-1505\common-3.6.200-v20130402-1505.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-context\3.2.9.RELEASE\spring-context-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-aop\3.2.9.RELEASE\spring-aop-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-beans\3.2.9.RELEASE\spring-beans-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-expression\3.2.9.RELEASE\spring-expression-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-jdbc\3.2.9.RELEASE\spring-jdbc-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-tx\3.2.9.RELEASE\spring-tx-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-core\3.2.9.RELEASE\spring-core-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-orm\3.2.9.RELEASE\spring-orm-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\com\oracle\jdbc\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar
C:\Users\XXXX\.m2\repository\com\oracle\ucp\ucp\11.2.0.3.0\ucp-11.2.0.3.0.jar
C:\Users\XXXX\.m2\repository\com\mysema\querydsl\querydsl-sql\2.8.2\querydsl-sql-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\mysema\querydsl\querydsl-core\2.8.2\querydsl-core-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\google\guava\guava\11.0.2\guava-11.0.2.jar
C:\Users\XXXX\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar
C:\Users\XXXX\.m2\repository\com\mysema\commons\mysema-commons-lang\0.2.4\mysema-commons-lang-0.2.4.jar
C:\Users\XXXX\.m2\repository\cglib\cglib\2.2\cglib-2.2.jar
C:\Users\XXXX\.m2\repository\asm\asm\3.1\asm-3.1.jar
C:\Users\XXXX\.m2\repository\joda-time\joda-time\1.6\joda-time-1.6.jar
C:\Users\XXXX\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar
C:\Users\XXXX\.m2\repository\org\springframework\data\spring-data-jdbc-core\1.0.0.RELEASE\spring-data-jdbc-core-1.0.0.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\retry\spring-retry\1.0.0.RELEASE\spring-retry-1.0.0.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar
C:\Users\XXXX\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar
C:\Users\XXXX\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar
C:\Users\XXXX\.m2\repository\commons-beanutils\commons-beanutils\1.9.1\commons-beanutils-1.9.1.jar
C:\Users\XXXX\.m2\repository\commons-configuration\commons-configuration\1.10\commons-configuration-1.10.jar
C:\Users\XXXX\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-test\3.2.9.RELEASE\spring-test-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar
C:\Users\XXXX\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar
C:\Users\XXXX\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.1\jaxb-runtime-2.3.1.jar
C:\Users\XXXX\.m2\repository\org\glassfish\jaxb\txw2\2.3.1\txw2-2.3.1.jar
C:\Users\XXXX\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.7\istack-commons-runtime-3.0.7.jar
C:\Users\XXXX\.m2\repository\org\jvnet\staxex\stax-ex\1.8\stax-ex-1.8.jar
C:\Users\XXXX\.m2\repository\com\sun\xml\fastinfoset\FastInfoset\1.2.15\FastInfoset-1.2.15.jar
C:\Users\XXXX\.m2\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar
C:\Users\XXXX\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar
C:\Users\XXXX\.m2\repository\org\apache\cxf\cxf-xjc-plugin\3.2.3\cxf-xjc-plugin-3.2.3.jar
C:\Users\XXXX\.m2\repository\org\sonatype\plexus\plexus-build-api\0.0.7\plexus-build-api-0.0.7.jar
C:\Users\XXXX\.m2\repository\org\codehaus\plexus\plexus-utils\2.0.5\plexus-utils-2.0.5.jar
C:\Users\XXXX\.m2\repository\org\codehaus\plexus\plexus-archiver\1.2\plexus-archiver-1.2.jar
C:\Users\XXXX\.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-9-stable-1\plexus-container-default-1.0-alpha-9-stable-1.jar
C:\Users\XXXX\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar
C:\Users\XXXX\.m2\repository\org\codehaus\plexus\plexus-io\1.0.1\plexus-io-1.0.1.jar
C:\Users\XXXX\.m2\repository\org\apache\maven\shared\maven-artifact-resolver\1.0\maven-artifact-resolver-1.0.jar
C:\Users\XXXX\.m2\repository\com\sun\xml\bind\jaxb-xjc\2.3.0\jaxb-xjc-2.3.0.jar
C:\Users\XXXX\.m2\repository\com\sun\xml\bind\jaxb-impl\2.3.0\jaxb-impl-2.3.0.jar
C:\Users\XXXX\.m2\repository\com\sun\xml\bind\jaxb-core\2.3.0\jaxb-core-2.3.0.jar
C:\Users\XXXX\.m2\repository\xml-resolver\xml-resolver\1.2\xml-resolver-1.2.jar
C:\Users\XXXX\.m2\repository\org\javassist\javassist\3.18.2-GA\javassist-3.18.2-GA.jar
C:\Users\XXXX\.m2\repository\javax\xml\ws\jaxws-api\2.3.0\jaxws-api-2.3.0.jar
C:\Users\XXXX\.m2\repository\javax\xml\soap\javax.xml.soap-api\1.4.0\javax.xml.soap-api-1.4.0.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\7.0.91\tomcat-embed-core-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\tomcat-annotations-api\7.0.91\tomcat-annotations-api-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-jasper\7.0.91\tomcat-embed-jasper-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jdt\core\compiler\ecj\4.4.2\ecj-4.4.2.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\7.0.91\tomcat-embed-el-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-logging-log4j\7.0.91\tomcat-embed-logging-log4j-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\7.0.91\tomcat-embed-websocket-7.0.91.jar
C:\Users\XXXX\.m2\repository\commons-fileupload\commons-fileupload\1.2\commons-fileupload-1.2.jar
C:\Users\XXXX\.m2\repository\javax\activation\activation\1.1.1\activation-1.1.1.jar
C:\Users\XXXX\.m2\repository\com\google\gwt\gwt-dev\2.8.2\gwt-dev-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar
C:\Users\XXXX\.m2\repository\com\google\code\gson\gson\2.6.2\gson-2.6.2.jar
C:\Users\XXXX\.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar
C:\Users\XXXX\.m2\repository\org\ow2\asm\asm-util\5.0.3\asm-util-5.0.3.jar
C:\Users\XXXX\.m2\repository\org\ow2\asm\asm-tree\5.0.3\asm-tree-5.0.3.jar
C:\Users\XXXX\.m2\repository\org\ow2\asm\asm-commons\5.0.3\asm-commons-5.0.3.jar
C:\Users\XXXX\.m2\repository\colt\colt\1.2.0\colt-1.2.0.jar
C:\Users\XXXX\.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar
C:\Users\XXXX\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar
C:\Users\XXXX\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar
C:\Users\XXXX\.m2\repository\com\ibm\icu\icu4j\50.1.1\icu4j-50.1.1.jar
C:\Users\XXXX\.m2\repository\tapestry\tapestry\4.0.2\tapestry-4.0.2.jar
C:\Users\XXXX\.m2\repository\net\sourceforge\htmlunit\htmlunit\2.19\htmlunit-2.19.jar
C:\Users\XXXX\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar
C:\Users\XXXX\.m2\repository\xalan\serializer\2.7.2\serializer-2.7.2.jar
C:\Users\XXXX\.m2\repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar
C:\Users\XXXX\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar
C:\Users\XXXX\.m2\repository\org\apache\httpcomponents\httpclient\4.5.1\httpclient-4.5.1.jar
C:\Users\XXXX\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar
C:\Users\XXXX\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar
C:\Users\XXXX\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar
C:\Users\XXXX\.m2\repository\org\apache\httpcomponents\httpmime\4.5.1\httpmime-4.5.1.jar
C:\Users\XXXX\.m2\repository\net\sourceforge\htmlunit\htmlunit-core-js\2.17\htmlunit-core-js-2.17.jar
C:\Users\XXXX\.m2\repository\xerces\xercesImpl\2.11.0\xercesImpl-2.11.0.jar
C:\Users\XXXX\.m2\repository\net\sourceforge\nekohtml\nekohtml\1.9.22\nekohtml-1.9.22.jar
C:\Users\XXXX\.m2\repository\net\sourceforge\cssparser\cssparser\0.9.18\cssparser-0.9.18.jar
C:\Users\XXXX\.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\websocket\websocket-client\9.2.13.v20150730\websocket-client-9.2.13.v20150730.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-util\9.2.14.v20151106\jetty-util-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-io\9.2.14.v20151106\jetty-io-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\websocket\websocket-common\9.2.13.v20150730\websocket-common-9.2.13.v20150730.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\websocket\websocket-api\9.2.13.v20150730\websocket-api-9.2.13.v20150730.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-webapp\9.2.14.v20151106\jetty-webapp-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-xml\9.2.14.v20151106\jetty-xml-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-servlet\9.2.14.v20151106\jetty-servlet-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-security\9.2.14.v20151106\jetty-security-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-server\9.2.14.v20151106\jetty-server-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-http\9.2.14.v20151106\jetty-http-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-servlets\9.2.14.v20151106\jetty-servlets-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-continuation\9.2.14.v20151106\jetty-continuation-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-annotations\9.2.14.v20151106\jetty-annotations-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-plus\9.2.14.v20151106\jetty-plus-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-jndi\9.2.14.v20151106\jetty-jndi-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\apache-jsp\9.2.14.v20151106\apache-jsp-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\toolchain\jetty-schemas\3.1.M0\jetty-schemas-3.1.M0.jar
C:\Users\XXXX\.m2\repository\org\mortbay\jasper\apache-jsp\8.0.9.M3\apache-jsp-8.0.9.M3.jar
C:\Users\XXXX\.m2\repository\org\mortbay\jasper\apache-el\8.0.9.M3\apache-el-8.0.9.M3.jar
Now I did notice that gwt-dev and ecj jar does have LambdaExpression with the same package. But I removed ecj and I still get the same issue. Apache-jsp jar does have a LambdaExpression but different package so I doubt that is the issue.
GWT 2.8.2 works with openjdk11. Here you can see that the tbroyer gwt-maven-plugin works with openjdk8 and openjdk11 using both last GWT release (version 2.8.2) and last development commit (version HEAD-SNAPSHOT).
So, you really should upgrade to GWT 2.8.2. GWT only support the last version. Usually upgrading between version is trivial because almost no API changes have been made for years and only bug fixes and new java language support has been added. It should be quite easy.
In your case, it seems to be a dependency problem, maybe because some of your dependencies have a dependency on the old version of GWT itself. To avoid dependencies conflicts it is recommended to use the BOM dependency. This tutorial includes a minimal explanation of why and how to use the GWT BOM dependency. Essentially, add this in your root project pom.xml:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt</artifactId>
<version>2.8.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Categories

Resources