jdk tools.jar under Snow leopard
in Notes, Software - 3 min read

Se usando maven-antrun-plugin sotto MacOsX Snow Leopard ottenete

[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] Failed to resolve artifact.

Missing:
———-
1) sun.jdk:tools:jar:1.6.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.6.0 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=sun.jdk -DartifactId=tools -Dversion=1.6.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.4
2) sun.jdk:tools:jar:1.6.0

La soluzione veloce è :

cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/
sudo mkdir lib
cd lib
sudo ln -s ../Classes/classes.jar tools.jar

Purtroppo non ho ancora trovato un modo elegante dentro maven usando i profile.

Be Sociable, Share!
  • Yoghi:

    com.sun tools 1.5.0 system ${java.home}/../lib/tools.jar
    Non mi funziona eppure in giro suggeriscono questa

Leave a comment for