使用 Java 11 编译 Java 和 groovy [英] compiling Java and groovy with java 11
本文介绍了使用 Java 11 编译 Java 和 groovy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道哪个编译器/插件使用 java 11 版本编译 java 和 groovy 代码?
Does anyone know which compiler/plugin compiles java and groovy code with the java 11 version?
我尝试过 GMavenPlus、Groovy eclipse 编译器和 Maven 的 Ant 插件.到目前为止没有成功.
I've tried GMavenPlus, Groovy eclipse compiler, and Maven’s Ant plugin. So far without success.
推荐答案
最终这奏效了:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>
groovy.version: 2.4.12
groovy.version: 2.4.12
这篇关于使用 Java 11 编译 Java 和 groovy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文