I'm attempting to include C:/Java/jdk1.7.0_71/lib/tools.jar as a dependency in my .pom. Environment is Eclipse Luna SR2, Windows 10, and JAVA_HOME is defined as "C:/Java/jdk1.7.0_71".
How do I determine what version this tools.jar file "is"? Eclipse Maven editor shows an error where the dependency is defined, as "Missing artifact com.sun:tools:jar:1.7".
The dependency and profile are defined as:
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.7</version>
<scope>system</scope>
<systemPath>${tools.jar}</systemPath>
</dependency>
</dependencies>
<profiles>
<profile>
<id>standard-jdk</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
</activation>
<properties>
<tools-jar>${java.home}/../lib/tools.jar</tools-jar>
</properties>
</profile>
</profiles>
mvn help:active-profiles shows that this profile, standard-sdk, is active, because ${java.home}/../lib/tools.jar resolves to C:/Java/jdk1.7.0_71/lib/tools.jar, and the file does exist there.
I ran mvn install, and found %userprofile%.m2/repository/com/sun/tools/ with 2 files, tools-1.7.pom.lastUpdated and tools-1.7.jar.lastUpdated in the local filesystem. Compile seems to work as expected, and the build runs to successful completion.
I've tried various version numbers from 1.7 down through 1.4, and even tried the version shown in tools.jar MANIFEST.MF, but none resolves the missing artifact problem.