2017-02-01 2 views
3

Jenkins에서 gradle 빌드를 실행하는 데 문제가 있습니다. Gradle을 버전이 내 build.gradle 파일입니다 https://services.gradle.org/distributions/gradle-2.14.1-bin.zipGradle org.springframework.boot를 해결할 수 없습니다. spring-boot-gradle-plugin : 1.4.2.RELEASE (repo1.maven.org : 서비스 스코어 보드)

 
FAILURE: Build failed with an exception. 

* What went wrong: 
A problem occurred configuring root project 'myApp'. 
> Could not resolve all dependencies for configuration ':classpath'. 
    > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE. 
    Required by: 
     :myApp:unspecified 
     > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE. 
     > Could not get resource 'https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.2.RELEASE/spring-boot-gradle-plugin-1.4.2.RELEASE.pom'. 
      > Could not HEAD 'https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.2.RELEASE/spring-boot-gradle-plugin-1.4.2.RELEASE.pom'. 
       > repo1.maven.org: Nome o servizio sconosciuto 

* Try: 
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

입니다 : 오류가 당신에게 Nome o servizio sconosciuto,을 알려줍니다

buildscript { 
    ext { 
     springBootVersion = '1.4.2.RELEASE' 
    } 
    repositories { 
     mavenCentral() 
    } 
    dependencies { 
     classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 
    } 
} 

apply plugin: 'java' 
apply plugin: 'eclipse-wtp' 
apply plugin: 'org.springframework.boot' 
apply plugin: 'war' 


war { 
    baseName = 'myApp' 
    version = '1.0.5' 
} 
sourceCompatibility = 1.8 
targetCompatibility = 1.8 

repositories { 
    mavenCentral() 
} 

configurations { 
    providedRuntime 
} 

dependencies { 
    compile('org.springframework.boot:spring-boot-starter-thymeleaf') 
    providedRuntime('org.springframework.boot:spring-boot-starter-tomcat') 
    compile('org.springframework.boot:spring-boot-starter-security') 
    testCompile('org.springframework.boot:spring-boot-starter-test') 
    compile('org.springframework.boot:spring-boot-starter-web') 
    compile('com.fasterxml.jackson.core:jackson-core:2.7.3') 
    compile("org.springframework:spring-jdbc") 
    compile('com.fasterxml.jackson.core:jackson-databind:2.7.3') 
    compile('com.fasterxml.jackson.core:jackson-annotations:2.7.3') 
    compile files('src/main/resources/static/lib/ojdbc7.jar') 
    // https://mvnrepository.com/artifact/org.json/json 
    compile group: 'org.json', name: 'json', version: '20080701' 

} 

답변

4

으로은 DNS를 통해 확인할 수 없습니다. 따라서 네트워킹 문제가 있거나 Gradle 용으로 구성하지 않은 프록시 서버를 사용해야합니다. 호스트 이름을 확인할 수없는 이유는 IT 지원에 문의하십시오.

-1

빌드 파일에 스프링 부트 플러그인이 없습니다.

는 플러그인을 적용 종속성 관리 시스템이 봄 부팅 고장이없이

'org.springframework.boot' 

내가 Gradle을 처음 실행하려 할 때 나는 봄 부팅 스타트 의존도를 점점 문제를 해결하지 못할했다
+0

이 확실합니까? 내 build.gradle에는 org.springframework.boot : spring-boot-gradle-plugin이 포함되어있어 인터넷 연결 (dns resolution)을 수정하여 문제가 해결되었습니다. – sgargel

-1

필자의 랩탑을 사용하는 gradle 3.5를 사용하는 IntelliJ에서는 프록시가 필요하지 않습니다.

문제가 누락 된 다음 build.gradle 파일에서

apply plugin: 'org.springframework.boot' 

. 일단 포함되면 플래시에서 모든 종속성을 다운로드합니다.

+0

전체 오류 메시지를 읽어야한다고 생각합니다 ... – sgargel

+0

전체 오류를 읽었지만 가능한 시나리오 중 하나에 대해 대답했습니다. 의존성이 다운로드되지 않으면 많은 이유가있을 수 있습니다. 나는 위의 대답에 대해 언급 할 수 없었으므로 별도로 대답했다. 어쨌든 고마워. – Abhishek

1

이것은 네트워크 문제 일 수 있습니다. 그렇지 않다면 내 문제를 해결할 때 아래 단계를 시도하십시오.

나는 또한 동일한 문제에 직면했기 때문에 종속성을 변경하여 해결하려고했습니다.

이 값은 오류입니다.

compile("org.springframework.boot:spring-boot-starter-ws") 

compile group: 'org.springframework.boot', name: 'spring-boot-starter-ws', version: '1.4.7.RELEASE' 

참조 작동하는 것입니다 : https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-ws/1.1.8.RELEASE

Grüße, 
Rahul 
관련 문제