I need web access from Gradle through a proxy to use the Gradle / Artifactory integration for Jenkins. To reduce the possible causes of the problems, I manually add the Artifactory plugin to build.gradle and run it from the command line:
apply { apply from: "http://gradle.artifactoryonline.com/gradle/plugins/org/jfrog/buildinfo/build-info-extractor-gradle/1.0.1/artifactoryplugin-1.0.1.gradle" }
Following this , I pointed out the following in .gradle / gradle.properties in my home directory:
systemProp.http.proxyHost=hostname systemProp.http.proxyPort=8080 systemProp.http.proxyUser=de\\username systemProp.http.proxyPassword=xxx
With the proxy server configuration specified above (which is known to work), it fails:
11: 33: 17.699 [ERROR] [org.gradle.BuildExceptionReporter] Called: java.io.IOException: the server responded with an HTTP response code: 407 for the URL: http://gradle.artifactoryonline.com/gradle/plugins/org/ jfrog / buildinfo / build-info-extractor-gradle / 1.0.1 / artifactoryplugin-1.0.1.gradle
I have two proxies to choose from, and each always responds with 407 (proxy authentication is required) and the other with 502 (Bad gateway), so obviously the proxyHost and proxyPort parameters are used.
Since the username (based on the Active Directory user) contains a backslash, I tried both \\ and \ , but didn't work. The specified user is different from the user who is registered on the machine and in Active Directory. These user credentials are not valid for the proxy server, so I need to specify a different user.
Setting the same options in the Jenkins or Artifactory GUI worked.
java proxy windows-server-2008 gradle active-directory
Daniel Beck May 13 '11 at 11:27 2011-05-13 11:27
source share