打开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>
-
3:配置eclipse
Window > Preferences > Maven and checking the "Download Artifact Sources" and "Download Artifact JavaDoc" options
然后项目执行eclipse:eclipse
转载:http://blog.csdn.net/topwqp/article/details/8902863