maven 下载源码

1,命令方式

进入到相应的pom.xml目录中

mvn dependency:sources

2,配置文件设置在maven user settings.xml中加入

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

<activeProfiles>
  <activeProfile>downloadSources</activeProfile>
</activeProfiles>
原文地址:https://www.cnblogs.com/china2k/p/4240494.html