1.0-milestone-6 cannot contact Maven Central when using a proxy


(melkild) #1

There seems to be an issue with using a proxy in milestone-6. If I try to run the java/onlyif sample using the following settings in gradle.properties

systemProp.http.proxyHost=co.proxy.myCompany.com
systemProp.http.proxyPort=8000

It works in milestone-5, but fails in milestone-6 with a connect issue as shown here below. Note, that I am running the same 1.0-milestone-5 sample, just with the milestone-6 gradle version…

C:\PROGRA~1\gradle-1.0-milestone-5\samples\java\onlyif>gradle -version
  ------------------------------------------------------------
Gradle 1.0-milestone-6
------------------------------------------------------------
  Gradle build time: Thursday, November 17, 2011 5:54:12 AM UTC
Groovy: 1.8.4
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.6.0_23 (Sun Microsystems Inc. 19.0-b09)
OS: Windows XP 5.1 x86
    C:\PROGRA~1\gradle-1.0-milestone-5\samples\java\onlyif>gradle build --stacktrace
  :compileJava
:processResources UP-TO-DATE
:classes
:jar
:assemble
:compileTestJava
  FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve group:junit, module:junit, version:4.8.2.
Required by:
    :onlyif:unspecified
Cause: java.lang.reflect.UndeclaredThrowableException (no error message)
  * Try:
Run with --info or --debug option to get more log output.
  * Exception is:
org.gradle.api.internal.artifacts.ivyservice.ModuleVersionResolveException: Coul
d not resolve group:junit, module:junit, version:4.8.2.
Required by:
    :onlyif:unspecified
        at org.gradle.api.internal.artifacts.ivyservice.IvyResolverBackedDepende
ncyToModuleResolver$DefaultModuleVersionResolver.getDescriptor(IvyResolverBacked
DependencyToModuleResolver.java:82)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder$ModuleVersionSelectorResolveState.resolve(DependencyGraphBuilder.ja
va:559)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder$DependencyResolvePath.resolveMetaData(DependencyGraphBuilder.java:6
49)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder.traverseGraph(DependencyGraphBuilder.java:130)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.Dependency
GraphBuilder.resolve(DependencyGraphBuilder.java:58)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDep
endencyResolver.resolve(DefaultDependencyResolver.java:69)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe
ndencyResolver$1.call(CacheLockingArtifactDependencyResolver.java:37)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe
ndencyResolver$1.call(CacheLockingArtifactDependencyResolver.java:35)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManag
er.withCacheLock(DefaultCacheLockingManager.java:54)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDepe
ndencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:35)
        at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyR
esolver.resolve(SelfResolvingDependencyResolver.java:42)
        at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigs
ArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyRes
olver.java:78)
        at org.gradle.api.internal.artifacts.ivyservice.EventBroadcastingArtifac
tDependencyResolver.resolve(EventBroadcastingArtifactDependencyResolver.java:37)
          at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDep
endencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:36)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
.getResolvedConfiguration(DefaultConfiguration.java:234)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
_Decorated.getResolvedConfiguration(Unknown Source)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:493)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
.getFiles(DefaultConfiguration.java:204)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration
_Decorated.getFiles(Unknown Source)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:1
87)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.doResolve(DefaultFileCollectionResolveContext.java:102)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:1
78)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.doResolve(DefaultFileCollectionResolveContext.java:97)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:1
78)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.doResolve(DefaultFileCollectionResolveContext.java:97)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolve
Context.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
        at org.gradle.api.internal.file.CompositeFileCollection$1.resolve(Compos
iteFileCollection.java:88)
        at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollect
ions(CompositeFileCollection.java:143)
        at org.gradle.api.internal.file.CompositeFileTree.getSourceCollections(C
ompositeFileTree.java:30)
        at org.gradle.api.internal.file.CompositeFileCollection.getFiles(Composi
teFileCollection.java:38)
        at org.gradle.api.internal.file.AbstractFileCollection.iterator(Abstract
FileCollection.java:60)
        at org.gradle.api.internal.changedetection.DefaultFileSnapshotter.snapsh
ot(DefaultFileSnapshotter.java:42)
        at org.gradle.api.internal.changedetection.InputFilesChangedUpToDateRule
.create(InputFilesChangedUpToDateRule.java:35)
        at org.gradle.api.internal.changedetection.CompositeUpToDateRule.create(
CompositeUpToDateRule.java:35)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepos
itory$HistoricExecution.calcCurrentState(DefaultTaskArtifactStateRepository.java
:80)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepos
itory$HistoricExecution.isUpToDate(DefaultTaskArtifactStateRepository.java:88)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepos
itory$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:1
28)
        at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactState
Repository$ShortCircuitArtifactState.isUpToDate(ShortCircuitTaskArtifactStateRep
ository.java:77)
        at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifac
tStateRepository$1.isUpToDate(FileCacheBroadcastTaskArtifactStateRepository.java
:37)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec
ute(SkipUpToDateTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut
e(ValidatingTaskExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu
ter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
.execute(SkipTaskWithNoActionsExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut
e(SkipOnlyIfTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter
.execute(ExecuteAtMostOnceTaskExecuter.java:42)
        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailur
e(AbstractTask.java:243)
        at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTask
GraphExecuter.java:192)
        at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGr
aphExecuter.java:177)
        at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGrap
hExecuter.java:83)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask
ExecutionAction.java:36)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:70)
        at org.gradle.execution.DefaultBuildExecuter.access$300(DefaultBuildExec
uter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecu
ter.java:80)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx
ecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:70)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
r.java:63)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:157)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:112)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:80)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42
)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28
)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionRe
portingAction.java:32)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionRe
portingAction.java:21)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.ex
ecute(CommandLineActionFactory.java:233)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.ex
ecute(CommandLineActionFactory.java:217)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:53)
        at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:51)
        at org.gradle.launcher.exec.Execution.execute(Execution.java:28)
        at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:39)
        at org.gradle.launcher.Main.main(Main.java:39)
        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:
51)
        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:33)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: java.lang.reflect.UndeclaredThrowableException
        at $Proxy32.exists(Unknown Source)
        at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingP
attern(RepositoryResolver.java:97)
        at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findRes
ourceUsingPatterns(AbstractPatternsBasedResolver.java:93)
        at org.apache.ivy.plugins.resolver.IBiblioResolver.findIvyFileRef(IBibli
oResolver.java:102)
        at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicReso
lver.java:223)
        at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblio
Resolver.java:503)
        at org.gradle.api.internal.artifacts.repositories.MavenResolver.getDepen
dency(MavenResolver.java:50)
        at org.gradle.api.internal.artifacts.ivyservice.UserResolverChain$Module
Resolution.resolveModule(UserResolverChain.java:326)
        at org.gradle.api.internal.artifacts.ivyservice.UserResolverChain.resolv
eLatestModule(UserResolverChain.java:110)
        at org.gradle.api.internal.artifacts.ivyservice.UserResolverChain.getDep
endency(UserResolverChain.java:74)
        at org.gradle.api.internal.artifacts.ivyservice.TopLeveResolverChain.get
Dependency(TopLeveResolverChain.java:60)
        at org.gradle.api.internal.artifacts.ivyservice.IvyResolverBackedDepende
ncyToModuleResolver$DefaultModuleVersionResolver.getDescriptor(IvyResolverBacked
DependencyToModuleResolver.java:79)
        ... 75 more
Caused by: java.net.ConnectException: Connection timed out: connect
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.c
reateSocket(DefaultProtocolSocketFactory.java:80)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.c
reateSocket(DefaultProtocolSocketFactory.java:122)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java
:707)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Htt
pMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMe
thodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
a:397)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.jav
a:323)
        at org.gradle.api.internal.artifacts.repositories.CommonsHttpClientBacke
dRepository$LazyResourceInvocationHandler.init(CommonsHttpClientBackedRepository
.java:186)
        at org.gradle.api.internal.artifacts.repositories.CommonsHttpClientBacke
dRepository$LazyResourceInvocationHandler.invoke(CommonsHttpClientBackedReposito
ry.java:179)
        ... 87 more
    BUILD FAILED
  Total time: 23.719 secs
  C:\PROGRA~1\gradle-1.0-milestone-5\samples\java\onlyif>

(Hristo Stoyanov) #2

same problem, with milestone 6 the proxy setting stopped working


#3

In Milestone 6 we switched to use Commons HTTP Client to download artifacts (away from using regular java.net.URL). This allows us to do much better things with authentication, but unfortunately doesn’t support standard java proxy settings out of the box.

I’ll raise this as a bug, and we’ll make sure this is fixes for 1.0. Thanks for the report.


(Eric Deandrea) #4

I’m having the exact same problem:

C:\Projects1\ContentHttpRetriever\implementation>gradle -version
  ------------------------------------------------------------
Gradle 1.0-milestone-6
------------------------------------------------------------
  Gradle build time: Thursday, November 17, 2011 5:54:12 AM UTC
Groovy: 1.8.4
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.7.0_01 (Oracle Corporation 21.1-b02)
OS: Windows XP 5.1 x86
  C:\Projects1\ContentHttpRetriever\implementation>gradle build --stacktrace
:compileJava
  FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve group:commons-httpclient, module:commons-httpclient, version:3.1.
Required by:
    org.tiaa:implementation:1.0
Cause: java.lang.reflect.UndeclaredThrowableException (no error message)
  * Try:
Run with --info or --debug option to get more log output.
  * Exception is:
org.gradle.api.internal.artifacts.ivyservice.ModuleVersionResolveException: Could not resolve g
roup:commons-httpclient, module:commons-httpclient, version:3.1.
Required by:
    org.tiaa:implementation:1.0
        at org.gradle.api.internal.artifacts.ivyservice.IvyResolverBackedDependencyToModuleReso
lver$DefaultModuleVersionResolver.getDescriptor(IvyResolverBackedDependencyToModuleResolver.jav
a:82)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$Mo
duleVersionSelectorResolveState.resolve(DependencyGraphBuilder.java:559)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$De
pendencyResolvePath.resolveMetaData(DependencyGraphBuilder.java:649)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.tr
averseGraph(DependencyGraphBuilder.java:130)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.re
solve(DependencyGraphBuilder.java:58)
        at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver
.resolve(DefaultDependencyResolver.java:69)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$
1.call(CacheLockingArtifactDependencyResolver.java:37)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$
1.call(CacheLockingArtifactDependencyResolver.java:35)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.withCacheLoc
k(DefaultCacheLockingManager.java:54)
        at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.
resolve(CacheLockingArtifactDependencyResolver.java:35)
        at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver.resolve
(SelfResolvingDependencyResolver.java:42)
        at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsArtifactDepende
ncyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyResolver.java:78)
        at org.gradle.api.internal.artifacts.ivyservice.EventBroadcastingArtifactDependencyReso
lver.resolve(EventBroadcastingArtifactDependencyResolver.java:37)
        at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver
.resolve(ErrorHandlingArtifactDependencyResolver.java:36)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedCon
figuration(DefaultConfiguration.java:234)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getR
esolvedConfiguration(Unknown Source)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationF
ileCollection.getFiles(DefaultConfiguration.java:493)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(Defau
ltConfiguration.java:204)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getF
iles(Unknown Source)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTre
eConverter.convertInto(DefaultFileCollectionResolveContext.java:187)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResol
ve(DefaultFileCollectionResolveContext.java:102)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolve
AsFileTrees(DefaultFileCollectionResolveContext.java:74)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTre
eConverter.convertInto(DefaultFileCollectionResolveContext.java:178)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResol
ve(DefaultFileCollectionResolveContext.java:97)
        at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolve
AsFileTrees(DefaultFileCollectionResolveContext.java:74)
        at org.gradle.api.internal.file.CompositeFileCollection$1.resolve(CompositeFileCollecti
on.java:88)
        at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections(CompositeF
ileCollection.java:143)
        at org.gradle.api.internal.file.CompositeFileTree.getSourceCollections(CompositeFileTre
e.java:30)
        at org.gradle.api.internal.file.CompositeFileCollection.getFiles(CompositeFileCollectio
n.java:38)
        at org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.
java:60)
        at org.gradle.api.internal.changedetection.DefaultFileSnapshotter.snapshot(DefaultFileS
napshotter.java:42)
        at org.gradle.api.internal.changedetection.InputFilesChangedUpToDateRule.create(InputFi
lesChangedUpToDateRule.java:35)
        at org.gradle.api.internal.changedetection.CompositeUpToDateRule.create(CompositeUpToDa
teRule.java:35)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$HistoricE
xecution.calcCurrentState(DefaultTaskArtifactStateRepository.java:80)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$HistoricE
xecution.isUpToDate(DefaultTaskArtifactStateRepository.java:88)
        at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$TaskArtif
actStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:128)
        at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactStateRepository$Shor
tCircuitArtifactState.isUpToDate(ShortCircuitTaskArtifactStateRepository.java:77)
        at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifactStateRepositor
y$1.isUpToDate(FileCacheBroadcastTaskArtifactStateRepository.java:37)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDat
eTaskExecuter.java:44)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTas
kExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(Ski
pEmptySourceFilesTaskExecuter.java:41)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTa
skWithNoActionsExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTas
kExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(Execut
eAtMostOnceTaskExecuter.java:42)
        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.
java:243)
        at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.j
ava:192)
        at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.jav
a:177)
        at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:
83)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction
.java:36)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:70)
        at org.gradle.execution.DefaultBuildExecuter.access$300(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:80)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.j
ava:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:70)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:63)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.
java:157)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:1
12)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42)
        at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.j
ava:32)
        at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.j
ava:21)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLi
neActionFactory.java:233)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLi
neActionFactory.java:217)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:53)
        at org.gradle.launcher.exec.EntryPoint$1.execute(EntryPoint.java:51)
        at org.gradle.launcher.exec.Execution.execute(Execution.java:28)
        at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:39)
        at org.gradle.launcher.Main.main(Main.java:39)
        at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:51)
        at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:33)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
Caused by: java.lang.reflect.UndeclaredThrowableException
        at $Proxy32.exists(Unknown Source)
        at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(Reposito
ryResolver.java:97)
        at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatte
rns(AbstractPatternsBasedResolver.java:93)
        at org.apache.ivy.plugins.resolver.IBiblioResolver.findIvyFileRef(IBiblioResolver.java:
102)
        at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:223)
        at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:5
03)
        at org.gradle.api.internal.artifacts.repositories.MavenResolver.getDependency(MavenReso
lver.java:50)
        at org.gradle.api.internal.artifacts.ivyservice.UserResolverChain$ModuleResolution.reso
lveModule(UserResolverChain.java:326)
        at org.gradle.api.internal.artifacts.ivyservice.UserResolverChain.resolveLatestModule(U
serResolverChain.java:110)
        at org.gradle.api.internal.artifacts.ivyservice.UserResolverChain.getDependency(UserRes
olverChain.java:74)
        at org.gradle.api.internal.artifacts.ivyservice.TopLeveResolverChain.getDependency(TopL
eveResolverChain.java:60)
        at org.gradle.api.internal.artifacts.ivyservice.IvyResolverBackedDependencyToModuleReso
lver$DefaultModuleVersionResolver.getDescriptor(IvyResolverBackedDependencyToModuleResolver.jav
a:79)
        ... 72 more
Caused by: java.net.UnknownHostException: repo1.maven.org
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Def
aultProtocolSocketFactory.java:80)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Def
aultProtocolSocketFactory.java:122)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector
.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.ja
va:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
        at org.gradle.api.internal.artifacts.repositories.CommonsHttpClientBackedRepository$Laz
yResourceInvocationHandler.init(CommonsHttpClientBackedRepository.java:186)
        at org.gradle.api.internal.artifacts.repositories.CommonsHttpClientBackedRepository$Laz
yResourceInvocationHandler.invoke(CommonsHttpClientBackedRepository.java:179)
        ... 84 more
    BUILD FAILED
  Total time: 5.447 secs

#5

This will be fixed in the upcoming Milestone 7


(Frederic Simon) #6

Hi, Is there a Jira issue for this I can link. We like to use the new proxy settings you will do for https://issues.jfrog.org/jira/browse/GAP-15

Thanks.


(Peter Niederwieser) #7

GRADLE-1971

I believe the solution chosen was to respect the standard system properties.


#8

I’m not sure I understand the linked Jira issue. Do you require explicit proxy configuration for the Gradle Artifactory Plugin?


(josef.stadelmann) #9

That is my gradle-wrapper.properties; is it correct to use systemProp.http.proxy* or do we have to use only http.proxy* since you changed to Commons HTTP Cluient or does warpper not make use of Commons HTTP Client.

#Fri Apr 27 11:59:11 EST 2012
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-rc-3-bin.zip
systemProp.http.proxyHost=proxyserver.ch.winterthur.com
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=C770817
systemProp.http.proxyPassword=orbxorbx
systemProp.http.auth.preference=Basic
http.proxyHost=proxyserver.ch.winterthur.com
http.proxyPort=8080
http.proxyUser=C770817
http.proxyPassword=orbxorbx
http.auth.preference=Basic

Unless this prey issues are fixed, preferabley everywhere where gradle attempts to make use of a network resource, unless most builds fail as the very first action of gradle (I am nw to it) is calling a wrapper for download of a gradle*.zip, hence it fails.

using this properties above I get the following, but I think I passed the proxy server, so where is the problem.

C770817@C036357 /cygdrive/e/gradle
$ /bin/sh ./gradlew
Downloading http://services.gradle.org/distributions/gradle-1.0-rc-3-bin.zip
  Exception in thread "main" java.io.IOException: Server returned HTTP response code: 503
 for URL: http://downloads.gradle.org/distributions/gradle-1.0-rc-3-bin.zip
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
                        nection.java:1436)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:61)
        at org.gradle.wrapper.Download.download(Download.java:49)
        at org.gradle.wrapper.Install.createDist(Install.java:51)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:47)
  C770817@C036357 /cygdrive/e/gradle

response code: 503 according to WireShark this is - HTTP/1.1 503 Service Unavailable\r\n


(Luke Daley) #10

Josef, what Gradle version are you using? GRADLE-1679 says this was fixed in 1.0-milestone-8.