Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing com.sun:tools:jar:1.5.0 #12

Closed
josephruscio opened this issue Sep 28, 2011 · 9 comments
Closed

Missing com.sun:tools:jar:1.5.0 #12

josephruscio opened this issue Sep 28, 2011 · 9 comments

Comments

@josephruscio
Copy link

Running mvn package gives the following error:

$ mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) com.sun:tools:jar:1.5

  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.5 -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.5 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
        1) org.jvnet.hudson.tools:maven-hpi-plugin:maven-plugin:1.40
        2) org.kohsuke.stapler:maven-stapler-plugin:jar:1.12
        3) com.sun:tools:jar:1.5

----------
1 required artifact is missing.

for artifact: 
  org.jvnet.hudson.tools:maven-hpi-plugin:maven-plugin:1.40

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  java.net (http://download.java.net/maven/1/),
  m.g.o-public (http://maven.glassfish.org/content/groups/public/),
  java.net2 (http://download.java.net/maven/2/)



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Sep 28 11:11:12 PDT 2011
[INFO] Final Memory: 10M/105M
[INFO] ------------------------------------------------------------------------

The following is the output of mvn --version:

$ mvn --version
Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_20
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-21-generic" arch: "amd64" Family: "unix"
@josephruscio
Copy link
Author

Fails the same way when I try this as suggested by the maven output:

$ mvn install:install-file -DgroupId=com.sun -DartifactId=tools \
> -Dversion=1.5 -Dpackaging=jar \
> -Dfile=/usr/lib/jvm/java-6-sun/lib/tools.jar

@josephruscio
Copy link
Author

I also tried adding the XML specified here to pom.xml and it didn't seem to work either: http://maven.apache.org/general.html#tools-jar-dependency

@nikz
Copy link

nikz commented Sep 30, 2011

I'm getting the same issue :(

@nikz
Copy link

nikz commented Sep 30, 2011

Same deal even if I check out any of the tags. Not sure how to fix this, not being much of a Java person :)

@nikz
Copy link

nikz commented Sep 30, 2011

I fixed this by reinstalling java via apt-get and making sure that my JAVA_HOME environment variable was set to the path to the java binary on my system.

@josephruscio
Copy link
Author

So installing the Sun JDK and then setting JAVA_HOME to this worked for me.

@cadwallion
Copy link

If you are on ubuntu and are using OpenJDK, make sure you sudo apt-get install openjdk-6-jdk (or equivalent version in the future). It's not part of the standard openjdk that gets installed with maven.

@craigblaster
Copy link

Likewise on Centos6: sudo yum install java-1.6.0-openjdk-devel

@josephruscio
Copy link
Author

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants