我在POM中有这样的配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version> <!-- Trova l'ultima versione su http://maven.apache.org/plugins/maven-enforcer-plugin/ -->
<executions>
<execution>
<id>enforce-bytecode-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>11</maxJdkVersion>
<excludes>
<exclude>org.mindrot:jbcrypt</exclude>
</excludes>
</enforceBytecodeVersion>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.0-beta-5</version>
</dependency>
</dependencies>
</plugin>
字符串
它给了我错误
执行目标org.apache.maven.plugins:maven-enforcer-plugin:3.4.1:enforce failed:给定的JDK版本未知。应该类似于“1.7”-> [Help 1]
我还没有在网上找到任何设置Java 11的解决方案。
1条答案
按热度按时间myzjeezk1#
解决方案是更新依赖版本
字符串