原文链接:http://blog.csdn.net/topwqp/article/details/8902863
在IDE中(本人使用的是Eclipse)
一,首先配置settings.xml文件
<profiles>
<profile>
<id>downloadSources</id>
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
</profile>
</profiles>
......
<activeProfiles>
<activeProfile>downloadSources</activeProfile>
</activeProfiles>
二,IDE的配置如下
三,执行命令下载源码
进入项目目录,执行以下命令即可:
mvn dependency:sources
尝试下载JavaDoc
mvn dependency:resolve -Dclassifier=javadoc
亲测非常实用~