[英]gradle build: repo1.maven.org: unknown error
I have a spring-boot app that I was able to start up the server in eclipse. 我有一个能够在Eclipse中启动服务器的spring-boot应用程序。 However, when I goto terminal and do gradle compile, here is the console log i am getting:
但是,当我转到终端并进行gradle编译时,这是我得到的控制台日志:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'springBootREST'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.2.5.RELEASE.
Required by:
:springBootREST:unspecified
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:1.2.5.RELEASE.
> Could not get resource 'https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.2.5.RELEASE/spring-boot-gradle-plugin-1.2.5.RELEASE.pom'.
> Could not HEAD 'https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.2.5.RELEASE/spring-boot-gradle-plugin-1.2.5.RELEASE.pom'.
> repo1.maven.org: unknown error
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I am not entirely sure why this is happening: it seems like it is having some issues with proxy server, but if I were to do wget I can get the files under repo1.maven... 我不完全确定为什么会这样:代理服务器似乎出现了一些问题,但是如果我要进行wget操作,则可以在repo1.maven下获取文件。
For reference, this is my build.gradle: 供参考,这是我的build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.5.RELEASE")
}
}
// same as what is in my .bash_profile
systemProp.http.proxyHost='my proxy server'
systemProp.http.proxyPort='my proxy port'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'spring-boot'
group = 'lookupGroup'
jar {
baseName = 'lookupService'
version = '0.1.0'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile 'org.springframework.boot:spring-boot-gradle-plugin:1.2.5.RELEASE'
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-actuator")
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("junit:junit")
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
Any idea why I can't build? 知道为什么我不能建造吗?
代理属性应按照docs中所述在gradle.properties
文件中进行配置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.