开发者

maven project required sun.javadoc jar

开发者 https://www.devze.com 2022-12-21 18:20 出处:网络
i came across this http://mvnrepository.com/artifact/javadoc/javadocbut it stated sun not allow redistribution.i have a maven project that required to use com.sun.ja开发者_C百科vadoc.*. which reposito

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号