一、在eclipse使用maven 下載源碼包須要更改 D:\apache-maven-3.2.1-bin\apache-maven-3.2.1\conf 目錄下apache
的 settings.xml 文件, 在文件中加入:eclipse
<profile> <id>downloadSources</id> <properties> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> </properties> </profile>
<activeProfiles> <activeProfile>downloadSources</activeProfile> </activeProfiles>
兩行配置maven
二、配置eclipse:
spa
Window > Preferences > Maven and checking the "Download Artifact Sources" and "Download Artifact JavaDoc" 選擇。code
三、pom.xml 文件 右擊 RUN AS eclipse:clean eclipse:eclipse -DdownloadSources=true 命令便可。xml