Maven Error: Missing artifact jdk.tools:jdk.tools:jar:1.7

and tools.jar The package comes with JDK, so I doubt it pom.xml Implicit dependency in tools.jar Bag, and tools.jar Not in the library,

For example: the current project relies on package a, while package a relies on package a during the development and packaging process tools.jar Package a is released now. Our project depends on package a, so we should add package a to the package dependency tools.jar Package;

After this analysis, the problem is easy to solve, directly in the pom.xml Add a dependency project to the list:

		<dependency>
			<groupId>jdk.tools</groupId>
			<artifactId>jdk.tools</artifactId>
			<version>1.7</version>
			<scope>system</scope>
			<systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
		</dependency>

Read More: