Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.4
-
Fix Version/s: 1.6
-
Component/s: None
-
Labels:None
-
Patch Submitted:Yes
Description
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) sun.jdk:tools:jar:1.5.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=sun.jdk -DartifactId=tools \
-Dversion=1.5.0 -Dpackaging=jar -Dfile=/path/to/file
Path to dependency:
1) org.codehaus.enunciate:maven-enunciate-plugin:maven-plugin:1.4
2) org.codehaus.enunciate:enunciate-top:jar:1.4
3) org.codehaus.enunciate:enunciate-core:jar:1.4
4) sun.jdk:tools:jar:1.5.0
----------
1 required artifact is missing.
for artifact:
org.codehaus.enunciate:maven-enunciate-plugin:maven-plugin:1.4
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
java.net (https://maven-repository.dev.java.net/nonav/repository)
tools.jar is included in the Mac's classpath by default, so you should only have a dependency on tools.jar when running on Windows. Here's the fix:
Hmmm... That's how I have it in the pom:
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
Why isn't Maven behaving?