目前我已经在我的 pom 依赖项中包含了 tools.jar。在 JDK11 中,它需要从依赖项中删除。仅当 java 版本小于 9 时,请帮助我在依赖项中包含 tools.jar,否则它应该存在于 pom.xml 中。
1 回答
1
您应该使用 Maven 配置文件(http://maven.apache.org/guides/introduction/introduction-to-profiles.html)
<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<dependencies>
...
</dependencies>
</profile>
</profiles>
于 2018-10-24T04:20:09.800 回答