下载完成后attach source 这一步可能需要手动完成
一:使用maven命令手动下载
mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc
二:通过配置文件添加自动下载
打开maven配置文件 setting.xml文件(…/.m2/settings.xml) 增加如下配置:
<profiles>
<profile>
<id>downloadSources</id>
<properties>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>downloadSources</activeProfile>
</activeProfiles>
三:myeclipse中进行配置
Window > Preferences > Maven and checking the “Download Artifact Sources” and “Download Artifact JavaDoc” options