This is the first time using Gradle 2.2.1. Unfortunately in my company we have settled up proxy with authentication scheme based on AD credentials. But when I try to make an eclipse project I receive the following error:
Could not resolve all dependencies for configuration compile.
Could not resolve org.apache.commons commons-lang3 3.0.
Required by:
GradleTest 2.2.1
Could not GET repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.0/commons-lang3-3.0.pom
peer not authenticated
Could not resolve log4j log4j 1.2.16.
Required by
GradleTest 2.2.1
Could not GET https://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16.pom.
peer not authenticated
I already made a gradle.properties file inside my project with the following configuration:
systemProp.https.proxyHost=(Proxy IP address)
systemProp.https.proxyPort=3128
systemProp.https.proxyUser=(My Username - tried with domain and without domain)
systemProp.https.proxyPassword=(My AD Password)
build.gradle:
apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'war'
archivesBaseName = 'martin'
version = '2.2.1'
repositories {
mavenCentral()
}
dependencies {
compile 'org.apache.commons commons-lang3 3.0'
compile 'log4j log4j 1.2.16'
}
I saved this configuration inside the
%userprofile%.gradle\gradle.properties
file and also inside my test project as suggest the user guide.
I also checked this related issue but is basically the steps that I´m currently following. I Also confirmed the parameters with the ones described in the official guide.
I'm basically following this gradle tutorial
Am I missing something? to be honest my brain has been locked out and I´m out of ideas :)
Thanks in advance
Phoenixzero
UPDATE 2014-12-12:
After playing with the log options I can get the following output log:
6:50:03.187 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Authentication required
16:50:03.187 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] (IPAddress):3128 requested authentication
16:50:03.187 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Authentication schemes in the order of preference: [negotiate, Kerberos, NTLM, Digest, Basic]
16:50:03.187 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Challenge for negotiate authentication scheme not available
16:50:03.187 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Challenge for Kerberos authentication scheme not available
16:50:03.187 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Challenge for NTLM authentication scheme not available
16:50:03.187 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Challenge for Digest authentication scheme not available
16:50:03.187 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Selected authentication options: [BASIC]
16:50:03.187 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Connection kept alive
16:50:03.187 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
16:50:03.187 [DEBUG] [org.apache.http.client.protocol.RequestProxyAuthentication] Proxy auth state: CHALLENGED
16:50:03.187 [DEBUG] [org.apache.http.client.protocol.RequestProxyAuthentication] Generating response to an authentication challenge using basic scheme
16:50:03.202 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Sending request: CONNECT repo1.maven.org:443 HTTP/1.1
16:50:03.202 [DEBUG] [org.apache.http.headers] >> CONNECT repo1.maven.org:443 HTTP/1.1
16:50:03.202 [DEBUG] [org.apache.http.headers] >> Host: repo1.maven.org
16:50:03.202 [DEBUG] [org.apache.http.headers] >> Proxy-Connection: Keep-Alive
16:50:03.202 [DEBUG] [org.apache.http.headers] >> User-Agent: Gradle/2.2.1 (Windows 7;6.1;x86) (Oracle Corporation;1.7.0_71;24.71-b01)
16:50:03.202 [DEBUG] [org.apache.http.headers] >> Proxy-Authorization: Basic ***
16:50:03.218 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 200 Connection established
16:50:03.218 [DEBUG] [org.apache.http.headers] << HTTP/1.1 200 Connection established
16:50:03.218 [DEBUG] [org.apache.http.client.protocol.ResponseProcessCookies] Cookie spec not specified in HTTP context
16:50:03.218 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Authentication succeeded
16:50:03.218 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Caching 'basic' auth scheme for http://(IPAddress):3128
16:50:03.218 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Tunnel to target created.
16:50:03.405 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Connection 0.0.0.0:5931<->(IPAddress):3128 closed
16:50:03.405 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Connection 0.0.0.0:5931<->(IPAddress):3128 shut down
16:50:03.405 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Connection 0.0.0.0:5931<->(IPAddress):3128 closed
16:50:03.405 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection released: [id: 0][route: {tls}->http://(IPAddress):3128->https://repo1.maven.org][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 10]
16:50:03.421 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Visiting dependency :GradleTest:2.2.1(compile) -> log4j:log4j:1.2.16(dependency: log4j#log4j;1.2.16 {compile=[default]})
16:50:03.421 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder] Selecting new module version log4j:log4j:1.2.16
16:50:03.421 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainDependencyResolver] Attempting to resolve log4j:log4j:1.2.16 using repositories [MavenRepo]
16:50:03.421 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading https://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16.pom
16:50:03.421 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: https://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16.pom
16:50:03.421 [DEBUG] [org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing external resource: https://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16.pom
16:50:03.421 [DEBUG] [org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP GET: https://repo1.maven.org/maven2/log4j/log4j/1.2.16/log4j-1.2.16.pom
16:50:03.421 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection request: [route: {tls}->http://(IPAddress):3128->https://repo1.maven.org][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 10]
16:50:03.421 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection leased: [id: 1][route: {tls}->http://(IPAddress):3128->https://repo1.maven.org][total kept alive: 0; route allocated: 1 of 5; total allocated: 1 of 10]
16:50:03.421 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnectionOperator] Connecting to (IPAddress):3128
16:50:03.421 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Re-using cached 'basic' auth scheme for http://(IPAddress):3128
16:50:03.421 [DEBUG] [org.apache.http.client.protocol.RequestProxyAuthentication] Proxy auth state: CHALLENGED
16:50:03.421 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Sending request: CONNECT repo1.maven.org:443 HTTP/1.1
16:50:03.421 [DEBUG] [org.apache.http.headers] >> CONNECT repo1.maven.org:443 HTTP/1.1
16:50:03.421 [DEBUG] [org.apache.http.headers] >> Host: repo1.maven.org
16:50:03.421 [DEBUG] [org.apache.http.headers] >> Proxy-Connection: Keep-Alive
16:50:03.421 [DEBUG] [org.apache.http.headers] >> User-Agent: Gradle/2.2.1 (Windows 7;6.1;x86) (Oracle Corporation;1.7.0_71;24.71-b01)
16:50:03.421 [DEBUG] [org.apache.http.headers] >> Proxy-Authorization: Basic ***
16:50:03.436 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 200 Connection established
16:50:03.436 [DEBUG] [org.apache.http.headers] << HTTP/1.1 200 Connection established
16:50:03.436 [DEBUG] [org.apache.http.client.protocol.ResponseProcessCookies] Cookie spec not specified in HTTP context
16:50:03.436 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Authentication succeeded
16:50:03.436 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Caching 'basic' auth scheme for http://(IPAddress):3128
16:50:03.436 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Tunnel to target created.
As far as I´m looking, Gradle is trying to connect to the Proxy server via http, but this is not an HTTP proxy. Am I wrong? How do I set to enable the proxy host but it does not connect using http?
Thanks in advance