首页 > 代码库 > maven下载源码和java docs

maven下载源码和java docs

方法一:

mvn dependency:sourcesmvn 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>

 

maven下载源码和java docs