1.从github下载源码:https://github.com/spring-projects/spring-boot
2.安装maven插件
3.在源码根目录执行 mvnw eclipse:eclipse, 执行这个命令后可以直接用eclipse导入存在的项目了
4. 在eclipse中 import — General — Existing Projects into Workspace. 选择你想导入的项目。
问题:
在执行第三步是报错
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.10:copy (copy-effe
ctive-pom) on project spring-boot-cli: Unable to find artifact.: Failure to find org.springframework
.boot:spring-boot-dependencies:effective-pom:2.0.0.BUILD-SNAPSHOT in http://repo.spring.io/snapshot
was cached in the local repository, resolution will not be reattempted until the update interval of
spring-snapshots has elapsed or updates are forced
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.springframework.boot -DartifactId=spring-boot-dep
endencies -Dversion=2.0.0.BUILD-SNAPSHOT -Dpackaging=effective-pom -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.springframework.boot -DartifactId=spring-boot-depen
dencies -Dversion=2.0.0.BUILD-SNAPSHOT -Dpackaging=effective-pom -Dfile=/path/to/file -Durl=[url] -D
repositoryId=[id]
[ERROR]
[ERROR]
[ERROR] org.springframework.boot:spring-boot-dependencies:effective-pom:2.0.0.BUILD-SNAPSHOT
这里的cli需要手动安装或者使用mvn clean install -U 强制更新
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#getting-started-installing-the-cli
注意:
jdk1.8+
maven3.2+
参考:
https://github.com/ligui989/spring-boot/blob/master/CONTRIBUTING.adoc