方式一:
mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true
方式二:打开maven配置文件 setting.xml文件(.../.m2/settings.xml) profile节点下增加properties配置:
<profile> <id>nexus</id> <properties> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> </properties> </profile>