我只是测试了gradle这个(在这一领域的绝对小白)。
我在Windows中尝试了这一点。 我曾经有过的Maven做构建和从同一台机器释放我。 它的背后是使用NTLM身份验证的代理。 这用来工作没有问题。 然而,不知何故摇篮是不是做对我来说。
我的build.gradle有以下配置(除了其他)
// Java plugin to build our JAR artifact.
apply plugin: 'java'
// Build stuff with jdk 1.7
sourceCompatibility = 1.7
targetCompatibility = 1.7
// Regular name and version for your project.
group = 'foo.bar.gradle'
version = '1.0-SNAPSHOT'
// The local maven repository
def localMavenRepo = 'file://C:/ProgramFiles/MavenRepository'
repositories {
// Use the maven central repository.
mavenCentral()
// ... and the local maven repository.
maven { url localMavenRepo }
// maven { url 'http://www.springsource.com/repository/' }
}
dependencies {
compile 'org.databene:contiperf:2.2.0','org.springframework:spring-webmvc:3.2.0.RELEASE'
testCompile 'junit:junit:4.11'
/*compile.exclude module: 'commons'*/
/*all*.exclude*/
}
我/gradle.properties具有以下设置
systemProp.proxySet=true
systemProp.http.proxyHost=<proxy name, same as that set in Maven>
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=<domain name>/<user name>
然而,当我运行它,我得到以下错误
NEGOTIATE authentication error: No valid credentials provided (Mechanism level:
No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
)
这是摇篮的1.3版本。 请帮忙。
更新:我现在已经更新到摇篮-1.4-RC-3我gradle.properties文件看现在这个样子
systemProp.proxySet="true"
systemProp.http.keepAlive="true"
systemProp.http.proxyHost=<proxy name>
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=<domain name>/<username>
但我还是继续看问题。 我有一些更多的日志。 我看到这个在STS(IDE)
Could not GET 'http://repo1.maven.org/maven2/org/spr...'. Received status code 500 from server: Internal Server Error
Could not execute build using Gradle installation 'C:\ProgramFiles\gradle-1.4-rc-3'.
不,凭证都没有错。 在相同的设置,有相同的价值观Maven是工作的罚款。 不,在gradle.properties是在正确的位置为好。 如果我更改代理的值,误差变化。 因此,该工具肯定是读gradle.properties文件。