我刚刚克隆GitHub的回购为Spring Boot samples,我试图运行各种样品,但他们都返回相同的错误:错误运行弹簧引导样品
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添加一个回购吗?主Maven回购中唯一的Spring Boot artifacts都是1.1.5.RELEASE
。如果我用1.1.5.RELEASE
代替1.2.0.BUILD-SNAPSHOT
,它会生成;但是毫不奇怪的是,这并不意外。
在构建样例之前,您需要首先构建依赖关系,例如在您的案例中构建工具。我建议你通过父母的pom建立一切,然后你可以继续尝试构建独立的模块。在你的情况下,maven插件“1.2.0.BUILD-SNAPSHOT”丢失。 – 2014-08-29 11:55:07