step 1
在装好了的maven的根目录,比如我的是d:/maven,打开conf/settings.xml文件,在<profiles> </profiles> 元素下加入子元素
<profile> <id>downloadSources</id> <properties> <-- 下载源代码 --> <downloadSources>true</downloadSources> <-- 下载源代码的javadoc --> <downloadJavadocs>true</downloadJavadocs> </properties> </profile>
然后,在 <activeProfiles> </activeProfiles> 加入
<-- 激活上面的配置的属性 --> <activeProfile>downloadSources</activeProfile>
step 2
在eclipse中配置下,window--perferences-maven,如下图
点击Apply,OK
step 3
在eclipse中,选中pom.xml,右键,run as maven-clean,如下图,
,稍等片刻,源代码就下载下来了,当然,这个有你的网速决定。