2017-04-05 116 views
1

引导2.0.0.BUILD-SNAPSHOT我创建了版本2.0.0.BUILD-快照摇篮启动项目从https://start.spring.io,并没有做任何改动,并试图使用只需运行该应用程序:错误使用摇篮

gradle这个bootRun

我收到以下错误

FAILURE: Build failed with an exception. 

* What went wrong: 
Could not resolve all dependencies for configuration ':compileClasspath'. 
> Could not find org.springframework.boot:spring-boot-starter-actuator:. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-actuator//spring-boot-starter-actuator-.pom 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-actuator//spring-boot-starter-actuator-.jar 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-actuator//spring-boot-starter-actuator-.pom 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-actuator//spring-boot-starter-actuator-.jar 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-actuator//spring-boot-starter-actuator-.pom 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-actuator//spring-boot-starter-actuator-.jar 

现在,当我的版本改变为: springBootVe rsion ='1.5.3.BUILD-SNAPSHOT'该应用程序启动正常。

我怀疑有一些错误的依赖管理$ {} springBootVersion标签,如图:

https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-actuator/[WHERE IS版本???] /弹簧引导起动致动器 - [WHERE是版本???] .pom

下面是我已经配置回购(粗体一个未AUT通过INITIALZR产生:

repositories { 
    mavenCentral() 
    maven { url 'https://repo.spring.io/libs-snapshot' } 
    maven { url "https://repo.spring.io/snapshot" } 
    maven { url "https://repo.spring.io/milestone" } 
} 

这可能与某些相关性有帮助,但仍有用发酵POM的一个问题:

FAILURE: Build failed with an exception. 

* What went wrong: 
Could not resolve all dependencies for configuration ':compileClasspath'. 
> Could not find org.springframework.boot:spring-boot-starter-aop:. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-aop//spring-boot-starter-aop-.pom 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-aop//spring-boot-starter-aop-.jar 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-aop//spring-boot-starter-aop-.pom 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-aop//spring-boot-starter-aop-.jar 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-aop//spring-boot-starter-aop-.pom 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-aop//spring-boot-starter-aop-.jar 
    Required by: 
     project : 
> Could not find org.springframework.boot:spring-boot-starter-jdbc:. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-jdbc//spring-boot-starter-jdbc-.pom 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-jdbc//spring-boot-starter-jdbc-.jar 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-jdbc//spring-boot-starter-jdbc-.pom 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-jdbc//spring-boot-starter-jdbc-.jar 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-jdbc//spring-boot-starter-jdbc-.pom 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-jdbc//spring-boot-starter-jdbc-.jar 
    Required by: 
     project : 
> Could not find org.springframework.boot:spring-boot-starter-data-rest:. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.pom 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.jar 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.pom 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.jar 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.pom 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.jar 
    Required by: 
     project : 
> Could not find com.h2database:h2:. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/com/h2database/h2//h2-.pom 
     https://repo1.maven.org/maven2/com/h2database/h2//h2-.jar 
     https://repo.spring.io/snapshot/com/h2database/h2//h2-.pom 
     https://repo.spring.io/snapshot/com/h2database/h2//h2-.jar 
     https://repo.spring.io/milestone/com/h2database/h2//h2-.pom 
     https://repo.spring.io/milestone/com/h2database/h2//h2-.jar 
    Required by: 
     project : 
> Could not find org.hsqldb:hsqldb:. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/org/hsqldb/hsqldb//hsqldb-.pom 
     https://repo1.maven.org/maven2/org/hsqldb/hsqldb//hsqldb-.jar 
     https://repo.spring.io/snapshot/org/hsqldb/hsqldb//hsqldb-.pom 
     https://repo.spring.io/snapshot/org/hsqldb/hsqldb//hsqldb-.jar 
     https://repo.spring.io/milestone/org/hsqldb/hsqldb//hsqldb-.pom 
     https://repo.spring.io/milestone/org/hsqldb/hsqldb//hsqldb-.jar 
    Required by: 
     project : 
> Could not find org.springframework.boot:spring-boot-starter-security:. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-security//spring-boot-starter-security-.pom 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-security//spring-boot-starter-security-.jar 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-security//spring-boot-starter-security-.pom 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-security//spring-boot-starter-security-.jar 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-security//spring-boot-starter-security-.pom 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-security//spring-boot-starter-security-.jar 
    Required by: 
     project : 
> Could not find org.springframework.boot:spring-boot-starter-web:. 
    Searched in the following locations: 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-web//spring-boot-starter-web-.pom 
     https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-web//spring-boot-starter-web-.jar 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-web//spring-boot-starter-web-.pom 
     https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-starter-web//spring-boot-starter-web-.jar 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-web//spring-boot-starter-web-.pom 
     https://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-web//spring-boot-starter-web-.jar 
+0

发布您的整个build.gradle – Strelok

回答

1

您需要添加:

maven { 
    url 'https://repo.spring.io/libs-snapshot' 
} 

要将库块(包括主并buildscript)

+0

这可能有助于一些依赖关系,但仍有一个问题与起始pom的: –

+0

我在它们都有。问题在于那些REPO中的首发者。他们是错的:https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-aop/[VERSION MISSING]/spring-boot-starter-aop- [VERSION MISSING] .pom –

+0

BUILD-SNAPSHOT版本不在maven中心。你看错了地方。看看这里:https://repo.spring.io/libs-snapshot/org/springframework/boot/spring-boot-starter-aop/2.0.0.BUILD-SNAPSHOT/ – Strelok