2016-04-14 21 views
0

Projemi ./gradlew clean ile temizlemeye çalıştığımda, ancak ./gradlew build çalışmayacak. Birkaç depo denedim, ancak Bahar bağımlılıklarını çözemez. İşte Gradlew build not

build.gradle: Burada istisna

apply plugin: 'war' 

war { 
    baseName = 'hello' 
} 

configurations { 
    providedRuntime 
} 

dependencies { 

    compile('org.springframework.boot:spring-boot-starter-web') 
    compile('org.json:json:20141113') 
    compile('com.jayway.jsonpath:json-path:0.8.1') 
    compile('org.jsoup:jsoup:1.8.2') 
    compile('org.springframework.social:spring-social-twitter') 
    compile('org.springframework.social:spring-social-twitter:1.1.0.RELEASE') 
    compile('org.springframework.social:spring-social-core') 
    providedRuntime('org.springframework.boot:spring-boot-starter-tomcat') 
    testCompile('org.springframework.boot:spring-boot-starter-test') 
} 

repositories { 
     mavenCentral() 
} 

Ve:

* What went wrong: 
Could not resolve all dependencies for configuration ':compile'. 
> Cannot resolve external dependency org.springframework.boot:spring-boot-starter-web: because no repositories are defined. 
    Required by: 
     :hello:unspecified 
> Cannot resolve external dependency org.json:json:20141113 because no repositories are defined. 
    Required by: 
     :hello:unspecified 
> Cannot resolve external dependency com.jayway.jsonpath:json-path:0.8.1 because no repositories are defined. 
    Required by: 
     :hello:unspecified 
> Cannot resolve external dependency org.jsoup:jsoup:1.8.2 because no repositories are defined. 
    Required by: 
     :hello:unspecified 
> Cannot resolve external dependency org.springframework.social:spring-social-twitter:1.1.0.RELEASE because no repositories are defined. 
    Required by: 
     :hello:unspecified 
> Cannot resolve external dependency org.springframework.social:spring-social-twitter:1.1.0.RELEASE because no repositories are defined. 
    Required by: 
     :hello:unspecified 
> Cannot resolve external dependency org.springframework.social:spring-social-core: because no repositories are defined. 
    Required by: 
     :hello:unspecified 

Ben maven repo yeterli ama ben de jcenter() ile denedim başarısız tutar düşündük. Bir ubuntu 14.04 VM üzerinde çalışıyorum.

ÇÖZÜLDÜ:

Michael Ben bağımlılığı bir sürümünü eklemek zorunda yorumların söylediği gibi:

compile('org.springframework.boot:spring-boot-starter-web') 
compile('org.springframework.boot:spring-boot-starter-web:1.3.3.RELEASE') 
+0

Bağımlılıklardan önce depoları bildirmeyi denediniz mi? – Michael

+0

evet hala bu istisna: 'org.springframework.boot bulunamadı: spring-boot-starter-web' – julien

+0

Yönetilen bağımlılıkların çalışmasını ilkbahar-önyükleme Gradle eklentisini uygulamanız gerektiğinden eminim. Ayrıntılar için Spring Boot Gradle örneklerinden herhangi birine bakın. – cjstehno

cevap

1

Birincisi, bağımlılıklar önce depoları beyan ederim. Eski bir sürüm içermediğinden Ve ikincisi,

compile('org.springframework.boot:spring-boot-starter-web:1.3.3.RELEASE') 

ile

compile('org.springframework.boot:spring-boot-starter-web') 

değiştirin.