基于 JDK11 的重组,tools.jar
我试图将其从 POM 依赖项中排除,如下所示
<profile>
<id>exclude-if-jdk11</id>
<activation>
<jdk>11</jdk>
</activation>
<properties>
<!-- bla bla bla -->
</properties>
<dependencies>
<dependency>
<groupId>com.internal.mypomz</groupId>
<artifactId>mypomext</artifactId>
<type>pom</type>
<version>1.1</version>
<exclusions>
<exclusion>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
JDK11/bin
尽管如此,我还是收到了在文件夹中找不到 tools.jar 的错误。但我期待这个 jar 查找将被跳过。有什么我配置不正确的吗?