mvn cargo:deployが失敗する(com.sun:tools:jar:1.4.2が見つけられない)

$ mvn cargo:deploy
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building t3
[INFO] task-segment: [cargo:deploy]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:

                  • -

1) com.sun:tools:jar:1.4.2

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.
4.2 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:

mvn deploy:deploy-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4.
2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

pom.xmlに以下を追記すればOK.



default-tools.jar

true

java.vendor
Sun Microsystems Inc.




com.sun
tools
1.4.2
system
${java.home}/../lib/tools.jara