2017-04-05 139 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