maven下载源码和java docs

方法一:

mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc

The first command will attempt to download source code for each of the dependencies in your pom file.

The second command will attempt to download the Javadocs.

方法二:

Open your settings.xml file (~/.m2/settings.xml). Add a section with the properties added. Then make sure the activeProfiles includes the new profile.

<profiles>
    <profile>
        <id>downloadSources</id>
        <properties>
            <downloadSources>true</downloadSources>
            <downloadJavadocs>true</downloadJavadocs>
        </properties>
    </profile>
</profiles>

<activeProfiles>
    <activeProfile>downloadSources</activeProfile>
</activeProfiles>

 

posted @ 2014-09-25 22:53  庚武  Views(458)  Comments(0Edit  收藏  举报