-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Junit test Compilation error with Java 11 #739
Comments
No guarantees this will work on Java 11 (see #686), but you can try: <pluginRepositories>
<pluginRepository>
<id>bintray</id>
<name>Groovy Bintray</name>
<url>https://dl.bintray.com/groovy/maven</url>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
...
</pluginRepositories>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
<release>11</release>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>3.0.0-01</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>2.4.15-01</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2.1</version>
</dependency>
</dependencies>
<version>3.8.0</version>
</plugin> |
Hi Eric, |
Java 10 compilation should be supported by the config I mentioned above. The ASM dependency is not required for Groovy compilation, so you can remove that if it's there to aid Groovy. You can find more information at: https://github.com/groovy/groovy-eclipse/wiki/Groovy-Eclipse-Maven-plugin Java 11 support is not complete yet. It should be viable from this branch: https://github.com/groovy/groovy-eclipse/tree/java11 However, it would require some work on your part to create the necessary target platform and then build the batch compiler from that branch. There was a bit of a timing problem with the Java 11 release and Eclipse's new quarterly release schedule. I had planned on Java 11 support in 3.1.0 and I think Eclipse planned on it in 4.9. But now it has been bumped to the next release for both. |
I get this error when trying to compile with jdk 10: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project rpm-external-spi: Compilation failure
|
@dacloutier Looks like you are setting "1.10" for the source/target version and it should be "10". |
Maybe it is because you have your scope dependency in another scope. Verify your dependency scope in pom.xml |
I have encounter a problem with ### Maven Compiler plugin 3.8.0 with ### joint compilation of Groovy and Java with ### JDK 10/11.
The console show that there is compilation error but no indication.
Here is maven configuration:
...
...
Here is the log with result of clean install -X option:
Is there anyone has the same problem?
Best regards,
Ann
The text was updated successfully, but these errors were encountered: