Is there any disadvantage to putting API code into a JAR along with the classes?

前端 未结 2 1844
半阙折子戏
半阙折子戏 2020-12-16 23:26

In Java if you package the source code (.java) files into the jar along with classes (.class) most IDE\'s like eclipse will show the javadoc comments for code compl

2条回答
  •  忘掉有多难
    2020-12-16 23:58

    Using maven, attach the sources automatically like this:

    http://maven.apache.org/plugins/maven-source-plugin/usage.html

    and the javadocs like this:

    http://maven.apache.org/plugins/maven-javadoc-plugin/jar-mojo.html

    That way they will automatically be picked up by

    mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true 
    

    or by m2eclipse

提交回复
热议问题