title: Could not resolve org.apache.commons:commons-lang3:3.0 peer not authenticated gradle 2.2.1
body: <p>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:</p>
  <pre><code>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
  </code></pre>
  <p>I already made a <strong>gradle.properties</strong> file inside my project with the following configuration:</p>
  <pre><code>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)
  </code></pre>
  <p><strong>build.gradle:</strong></p>
  <pre><code>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'
  } 
  </code></pre>
  <p>I saved this configuration inside the</p>
  <blockquote>
  <p>%userprofile%.gradle\gradle.properties</p>
  </blockquote>
  <p>file and also inside my test project as suggest <a href="http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html#sec%3Agradle_properties_and_system_properties" rel="nofollow noreferrer">the user guide</a>.</p>
  <p>I also checked this <a href="https://stackoverflow.com/questions/22887829/peer-not-authenticated-while-importing-gradle-project-in-eclipse">related issue</a> but is basically the steps that I´m currently following. I Also confirmed the parameters with the ones described in the <a href="http://gradle.org/docs/current/userguide/userguide_single.html#sec:gradle_configuration_properties" rel="nofollow noreferrer">official guide</a>.</p>
  <p>I'm basically following <a href="http://www.concretepage.com/build-tools/gradle/java-project-gradle-eclipse-integration-example" rel="nofollow noreferrer">this gradle tutorial</a></p>
  <p>Am I missing something? to be honest my brain has been locked out and I´m out of ideas :)</p>
  <p>Thanks in advance</p>
  <p>Phoenixzero</p>
  <p>UPDATE 2014-12-12:</p>
  <p>After playing with the log options I can get the following output log:</p>
  <pre><code>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] &gt;&gt; CONNECT repo1.maven.org:443 HTTP/1.1
  16:50:03.202 [DEBUG] [org.apache.http.headers] &gt;&gt; Host: repo1.maven.org
  16:50:03.202 [DEBUG] [org.apache.http.headers] &gt;&gt; Proxy-Connection: Keep-Alive
  16:50:03.202 [DEBUG] [org.apache.http.headers] &gt;&gt; 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] &gt;&gt; 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] &lt;&lt; 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&lt;-&gt;(IPAddress):3128 closed
  16:50:03.405 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Connection 0.0.0.0:5931&lt;-&gt;(IPAddress):3128 shut down
  16:50:03.405 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Connection 0.0.0.0:5931&lt;-&gt;(IPAddress):3128 closed
  16:50:03.405 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection released: [id: 0][route: {tls}-&gt;http://(IPAddress):3128-&gt;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) -&gt; 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}-&gt;http://(IPAddress):3128-&gt;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}-&gt;http://(IPAddress):3128-&gt;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] &gt;&gt; CONNECT repo1.maven.org:443 HTTP/1.1
  16:50:03.421 [DEBUG] [org.apache.http.headers] &gt;&gt; Host: repo1.maven.org
  16:50:03.421 [DEBUG] [org.apache.http.headers] &gt;&gt; Proxy-Connection: Keep-Alive
  16:50:03.421 [DEBUG] [org.apache.http.headers] &gt;&gt; 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] &gt;&gt; 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] &lt;&lt; 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.
  </code></pre>
  <p>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?</p>
  <p>Thanks in advance</p>