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.ja开发者_C百科vadoc.* . 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>
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?
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.
精彩评论