zoukankan      html  css  js  c++  java
  • maven 下载 源码和javadoc命令(转)

    转自:http://blog.csdn.net/topwqp/article/details/8902863

            maven 下载 源码和javadoc命令

    目录(?)[+]
     

    1:Maven命令下载源码和javadocs

    当在IDE中使用Maven时如果想要看引用的jar包中类的源码和javadoc需要通过maven命令下载这些源码,然后再进行引入,通过mvn命令能够容易的达到这个目的:

    mvn dependency:sources
    mvn dependency:resolve -Dclassifier=javadoc
    命令使用方法:首先进入到相应的pom.xml目录中,然后执行以上命令:

    第一个命令是尝试下载在pom.xml中依赖的文件的源代码。

    第二个命令:是尝试下载对应的javadocs

    但是有可能一些文件没有源代码或者javadocs

    reference

    2:通过配置文件添加

    打开maven配置文件 setting.xml文件(.../.m2/settings.xml) 增加如下配置:
    1. <profiles>  
    2. <profile>  
    3.     <id>downloadSources</id>  
    4.     <properties>  
    5.         <downloadSources>true</downloadSources>  
    6.         <downloadJavadocs>true</downloadJavadocs>             
    7.     </properties>  
    8. </profile>  
    9. </profiles>  
    10.   
    11. <activeProfiles>  
    12.   <activeProfile>downloadSources</activeProfile>  
    13. </activeProfiles>  
    <profiles>
    <profile>
        <id>downloadSources</id>
        <properties>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>           
        </properties>
    </profile>
    </profiles>
    
    <activeProfiles>
      <activeProfile>downloadSources</activeProfile>
    </activeProfiles>

    3:配置eclipse

    Window > Preferences > Maven and checking the "Download Artifact Sources" and "Download Artifact JavaDoc" options
  • 相关阅读:
    【数据结构】树的DFS序&欧拉序
    Codeforces 1335E2
    Codeforces 1335E1
    Codeforces 1338A/1339C
    【数据结构】ST算法
    Codeforces 1334C
    Codeforces 1333D
    Codeforces 1333C
    python中的socket编程实例与查看端口占用
    java中打印数组
  • 原文地址:https://www.cnblogs.com/GarfieldTom/p/3777781.html
Copyright © 2011-2022 走看看