Based on JDK11 restructuring of tools.jar
I was trying to exclude it from a POM dependency as follows
<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>
Despite the above, I am getting the error that tools.jar cannot be found in JDK11/bin
folder. But I was expecting that this jar lookup will be skipped. Is there something I've configured incorrectly?