Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven project required sun.javadoc jar

i came across this http://mvnrepository.com/artifact/javadoc/javadoc but it stated sun not allow redistribution. i have a maven project that required to use com.sun.javadoc.* . which repository can i use to grab the dependency?

p/s: i'm using eclipse

<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>2.5</version>
</dependency>
like image 274
cometta Avatar asked Mar 01 '10 02:03

cometta


2 Answers

I'm not sure this is what you're asking but classes from com.sun.javadoc are in tools.jar (which can't be distributed). If for whatever reason you need these classes on the class path, add the following dependency:

<dependencies>
  <dependency>
    <groupId>sun.jdk</groupId>
    <artifactId>tools</artifactId>
    <version>1.5.0</version>
    <scope>system</scope>
    <systemPath>${java.home}/../lib/tools.jar</systemPath>
  </dependency>
</dependencies>

See How do I include tools.jar in my dependencies?‎

like image 103
Pascal Thivent Avatar answered Nov 15 '22 17:11

Pascal Thivent


Just use the regular maven-javadoc-plugin which runs the javadoc from your JDK, which you already have a valid copy of. Be sure that JAVA_HOME points to a JDK and not a JRE, and that the 'java' command in your path is from the JDK, not the JRE.

like image 20
bmargulies Avatar answered Nov 15 '22 16:11

bmargulies