spring boot — 导入源码到eclipse

扫码关注公众号:Java 技术驿站

发送:vip
将链接复制到本浏览器,永久解锁本站全部文章

【公众号:Java 技术驿站】 【加作者微信交流技术,拉技术群】

1.从github下载源码:https://github.com/spring-projects/spring-boot

2.安装maven插件

3.在源码根目录执行 mvnw eclipse:eclipse, 执行这个命令后可以直接用eclipse导入存在的项目了

  1. 在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


来源:http://ddrv.cn

赞(0) 打赏
版权归原创作者所有,任何形式的转载请联系博主:daming_90:Java 技术驿站 » spring boot — 导入源码到eclipse

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏