我刚刚克隆了Spring Boot samples的github repo,我正在尝试运行各种样本,但它们都返回相同的错误:
c:\temp\spring-boot\spring-boot-samples\spring-boot-sample-web-jsp>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring Boot Web JSP Sample 1.2.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.springframework.boot:spring-boot-maven-plugin:jar:1.2.0.BUILD-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.197s
[INFO] Finished at: Fri Aug 29 11:57:22 BST 2014
[INFO] Final Memory: 3M/183M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:1.2.0.BUILD-SNAPSHOT or one of its dependencies could not be resolved: Failed to read
artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:1.2.0.BUILD-SNAPSHOT: Could not find artifact org.springframework.boot:
spring-boot-maven-plugin:pom:1.2.0.BUILD-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
我错过了什么吗?我需要为Spring Boot添加一个repo吗?主maven仓库中唯一的Spring Boot工件都是1.1.5.RELEASE
。如果我将1.2.0.BUILD-SNAPSHOT
替换为1.1.5.RELEASE
,则会构建;但毫无疑问,它无法运行。
答案 0 :(得分:2)
我从1.1.5.RELEASE
更新时遇到了同样的问题。
我从mvn install
目录运行了spring-boot
。
花了超过1小时10分钟!
请告诉我这是否可以解决问题!
答案 1 :(得分:1)
您是否将pom文件指向此link中的快照存储库? repo link列出了maven插件内容。
<repositories>
<repository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/snapshot</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>