Dependency download failing in milestone 7


(David Resnick) #1

I’m encountering a sporadic problem with gradle 1.0 milestone 7.

I have a project with 4 repositories configured, 2 maven and 2 SVN, like this:

mavenRepo name: “internal-repo-site-cache”,

url: “http://squid/nexus/content/groups/repo

mavenRepo name: “internal-repo”,

url: “http://maven-repo:8081/nexus/content/groups/repo

mavenRepo name: “svn-repo”,

url: “http://svn1:18080/svn/main/repository

mavenRepo name: “svn-repo-mirror”,

url: “http://svn-mirror/svn/main/repository

Since upgrading to m7 a few builds have failed in the CI build system because a jar could not be retrieved from SVN.

For example:

Download failed for artifact 'com.atomikos:transactions-essentials-all:3.5.13@jar': Could not GET 'http://svn1:18080/svn/main/repository/com/atomikos/transactions-essentials-all/3.5.13/transactions-essentials-all-3.5.13.jar'.

2 things are strange about this: 1. I know that the jar file is available. All manual tests I’ve done show this. A build never failed with this reason with previous versions of gradle. 2. Why doesn’t gradle attempt to use the next repository, svn-repo-mirror? The svn-repo repository is not situated in the same data center as the CI server, so the response time for this retrieval may be slow. But that is why I have the alternate repository configured. This is in the same data center and I expect would respond well. So why is it not picked up from there?

I am not able to find any open issues about this problem.

Any suggestions on how I could implement a work around?

All help on would be greatly appreciated!

  • David

(Adam Murdoch) #2

I know that the jar file is available. All manual tests I’ve done show this. A build never failed with this reason with previous versions of gradle.

Do you have a stack trace for the failure? You can run gradle with --stacktrace to get this.

Why doesn’t gradle attempt to use the next repository, svn-repo-mirror? The svn-repo repository is not situated in the same data center as the CI server, so the response time for this retrieval may be slow. But that is why I have the alternate repository configured. This is in the same data center and I expect would respond well. So why is it not picked up from there?

The repositories are searched in order specified in the ‘repositories { }’ block. You might change the order of the repositories if you want them to be searched in a particular order.


(David Resnick) #3

The repositories are searched in order specified in the repositories { } block. You might change the order of the repositories if you want them to be searched in a particular order.

Right, I expect gradle to search in the order specified. What seems to be a problem is that the build failed and reported that it couldn’t retrieve the dependency from the repository before the last. It doesn’t look like it tried all specified repositories.

Do you have a stack trace for the failure? You can run gradle with --stacktrace to get this.

Here is the stack trace:

Download failed for artifact 'com.atomikos:transactions-essentials-all:3.5.13@jar': Could not GET 'http://svn1:18080/svn/main/repository/com/atomikos/transactions-essentials-all/3.5.13/transactions-essentials-all-3.5.13.jar'.
  FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve all dependencies for configuration ':engine:basic:framework:compile'.
Cause: Download failed for artifact 'com.atomikos:transactions-essentials-all:3.5.13@jar': Could not GET 'http://svn1:18080/svn/main/repository/com/atomikos/transactions-essentials-all/3.5.13/transactions-essentials-all-3.5.13.jar'.
  * Try:
Run with --info or --debug option to get more log output.
  * Exception is:
org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':engine:basic:framework:compile'.
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.wrapException(ErrorHandlingArtifactDependencyResolver.java:47)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.access$000(ErrorHandlingArtifactDependencyResolver.java:26)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingArtifactDependencyResolver.java:80)
 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:497)
 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.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:187)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:102)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:178)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:97)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
 at org.gradle.api.internal.file.CompositeFileCollection$1.resolve(CompositeFileCollection.java:88)
 at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections(CompositeFileCollection.java:143)
 at org.gradle.api.internal.file.CompositeFileTree.getSourceCollections(CompositeFileTree.java:30)
 at org.gradle.api.internal.file.CompositeFileCollection.getFiles(CompositeFileCollection.java:38)
 at org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:60)
 at org.gradle.api.internal.changedetection.DefaultFileSnapshotter.snapshot(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.DefaultTaskArtifactStateRepository$HistoricExecution.calcCurrentState(DefaultTaskArtifactStateRepository.java:80)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$HistoricExecution.isUpToDate(DefaultTaskArtifactStateRepository.java:88)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:128)
 at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactStateRepository$ShortCircuitArtifactState.isUpToDate(ShortCircuitTaskArtifactStateRepository.java:77)
 at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifactStateRepository$1.isUpToDate(FileCacheBroadcastTaskArtifactStateRepository.java:37)
 at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:44)
 at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
 at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
 at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
 at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
 at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
 at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:243)
 at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:192)
 at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java: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:61)
 at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
 at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
 at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
 at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:111)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:109)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:103)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
 at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
 at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
 at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
 at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
 at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:152)
 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:108)
 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:76)
 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.java:32)
 at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:238)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:222)
 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)
 at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
 at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:124)
 at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:53)
Caused by: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ArtifactResolveException: Download failed for artifact 'com.atomikos:transactions-essentials-all:3.5.13@jar': Could not GET 'http://svn1:18080/svn/main/repository/com/atomikos/transactions-essentials-all/3.5.13/transactions-essentials-all-3.5.13.jar'.
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ArtifactResolutionExceptionBuilder.downloadFailure(ArtifactResolutionExceptionBuilder.java:35)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver.downloadFromResolver(IvyResolverBackedArtifactToFileResolver.java:105)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver.downloadArtifact(IvyResolverBackedArtifactToFileResolver.java:96)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver.downloadWithCache(IvyResolverBackedArtifactToFileResolver.java:91)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver.resolve(IvyResolverBackedArtifactToFileResolver.java:57)
 at org.gradle.api.internal.artifacts.ivyservice.ArtifactToFileResolverChain.resolve(ArtifactToFileResolverChain.java:41)
 at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1$1.create(ResolvedArtifactFactory.java:39)
 at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1$1.create(ResolvedArtifactFactory.java:37)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:99)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:49)
 at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1.get(ResolvedArtifactFactory.java:37)
 at org.gradle.api.internal.artifacts.DefaultResolvedArtifact.getFile(DefaultResolvedArtifact.java:107)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactFileResolver.getFile(DefaultLenientConfiguration.java:137)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFiles(DefaultLenientConfiguration.java:115)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFilesStrict(DefaultLenientConfiguration.java:98)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.getFiles(DefaultResolvedConfiguration.java:45)
 at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.getFiles(SelfResolvingDependencyResolver.java:56)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingArtifactDependencyResolver.java:78)
 ... 70 more
    BUILD FAILED

#4

Gradle treats each repository as independent. So if it finds the meta-data for a module in a particular repository, then it expects to find the artifacts for this module in the same repository.

So my guess is that Gradle is finding the pom file for ‘com.atomikos:transactions-essentials-all’ at “http://svn1:18080/svn/main/repository”, but not finding the respective jar file. If this is how your repositories are configured, you may want to combine the 2 urls into a single maven repository. Something like:

maven {
        name "svn-repo"
        url "http://svn1:18080/svn/main/repository"
        artifactUrls
"http://svn-mirror/svn/main/repository"
    }

Gradle will only look for pom files in the “url” location, but will search for artifacts in both “url” and “artifactUrls”.


(David Resnick) #5

Thanks for the suggestion, Daz.

I’ve cross added each other SVN repository as an artifactUrl and will see if the problem recurs.

Unfortunately though, the jars from SVN that are not downloaded do not have pom files, so the fact that gradle doesn’t try the next defined repository seems like a bug to me.


#6

Hmmm. If these are “artifact-only” modules (no pom/ivy file), then Gradle is using the existence of the jar file to indicate the existence of the module. So it seems strange that it then reports that it cannot download the jar!

Can you please: 1) Try a recent nightly: http://gradle.org/nightly 2) Run the build with the ‘–info’ flag and send us the output next time the build fails in this way

A similar problem was reported at GRADLE-2034


(David Resnick) #7

I’m going to set up my CI builds to run with the --info flag. Hopefully this will shed more light on the problem next time it fails.

I tried to run with the latest nightly, but it fails during the configuration phase. I’ve started a new top for this: http://forums.gradle.org/gradle/topics/nightly_fails_to_initialize_with_java_lang_classnotfoundexception_org_gradle_api_internal_project_serviceregistry

– David


(David Resnick) #8

Daz,

This problem has not appeared at all since I added as an artifactUrl the other SVN URL for each mavenRepo defined, as you advised in your comment before the last.

Like this:

mavenRepo name: "svn-repo",
url: "http://svn1:18080/svn/main/repository"
artifactUrls: "http://svn-mirror/svn/main/repository"
  mavenRepo name: "svn-repo-mirror",
url: "http://svn-mirror/svn/main/repository"
artifactUrls: "http://svn1:18080/svn/main/repository"

But it has failed again. Strangely enough, it seems to find the jar in both SVN repositories, but then fails to download it (see log below). I don’t think that there was any problem with access to either SVN repo during the build.

I’m still running with milestone 7.

Does this behavior make sense to you at all? Any idea why it ultimately failed?

Resource found. [HTTP GET: http://squid/nexus/content/groups/repo/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.pom]
Download http://squid/nexus/content/groups/repo/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.pom
Resource missing. [HTTP GET: http://squid/nexus/content/groups/repo//cglib-nodep/2.1/cglib-nodep-2.1.pom]
Resource missing. [HTTP GET: http://squid/nexus/content/groups/repo//cglib-nodep/2.1/cglib-nodep-2.1.jar]
Resource missing. [HTTP GET: http://maven-repo:8081/nexus/content/groups/repo//cglib-nodep/2.1/cglib-nodep-2.1.pom]
Resource missing. [HTTP GET: http://maven-repo:8081/nexus/content/groups/repo//cglib-nodep/2.1/cglib-nodep-2.1.jar]
Resource missing. [HTTP GET: http://svn1:18080/svn/main/repository//cglib-nodep/2.1/cglib-nodep-2.1.pom]
Resource found. [HTTP GET: http://svn1:18080/svn/main/repository//cglib-nodep/2.1/cglib-nodep-2.1.jar]
Resource missing. [HTTP GET: http://svn-mirror/svn/adm/repository//cglib-nodep/2.1/cglib-nodep-2.1.pom]
Resource found. [HTTP GET: http://svn-mirror/svn/adm/repository//cglib-nodep/2.1/cglib-nodep-2.1.jar]
Resource found. [HTTP GET: http://squid/nexus/content/groups/repo/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.jar]
downloading HttpResource: http://squid/nexus/content/groups/repo/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.jar ...
Download http://squid/nexus/content/groups/repo/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.jar
 [SUCCESSFUL ] postgresql#postgresql;9.0-801.jdbc4!postgresql.jar (48ms)
Download failed for artifact ':cglib-nodep:2.1@jar': Could not GET 'http://svn1:18080/svn/main/repository//cglib-nodep/2.1/cglib-nodep-2.1.jar'.
  FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve all dependencies for configuration ':db:compile'.
Cause: Download failed for artifact ':cglib-nodep:2.1@jar': Could not GET 'http://svn1:18080/svn/main/repository//cglib-nodep/2.1/cglib-nodep-2.1.jar'.
  * Try:
Run with --debug option to get more log output.
  * Exception is:
org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':db:compile'.
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.wrapException(ErrorHandlingArtifactDependencyResolver.java:47)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.access$000(ErrorHandlingArtifactDependencyResolver.java:26)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingArtifactDependencyResolver.java:80)
 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:497)
 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.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:187)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:102)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:178)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:97)
 at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
 at org.gradle.api.internal.file.CompositeFileCollection$1.resolve(CompositeFileCollection.java:88)
 at org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections(CompositeFileCollection.java:143)
 at org.gradle.api.internal.file.CompositeFileTree.getSourceCollections(CompositeFileTree.java:30)
 at org.gradle.api.internal.file.CompositeFileCollection.getFiles(CompositeFileCollection.java:38)
 at org.gradle.api.internal.file.AbstractFileCollection.iterator(AbstractFileCollection.java:60)
 at org.gradle.api.internal.changedetection.DefaultFileSnapshotter.snapshot(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.DefaultTaskArtifactStateRepository$HistoricExecution.calcCurrentState(DefaultTaskArtifactStateRepository.java:80)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$HistoricExecution.isUpToDate(DefaultTaskArtifactStateRepository.java:88)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:128)
 at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactStateRepository$ShortCircuitArtifactState.isUpToDate(ShortCircuitTaskArtifactStateRepository.java:77)
 at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifactStateRepository$1.isUpToDate(FileCacheBroadcastTaskArtifactStateRepository.java:37)
 at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:44)
 at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
 at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
 at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
 at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
 at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
 at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:243)
 at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:192)
 at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java: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:61)
 at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
 at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
 at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
 at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:111)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:109)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:103)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
 at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
 at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
 at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
 at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
 at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:152)
 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:108)
 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:76)
 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.java:32)
 at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:238)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:222)
 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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 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)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
 at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:124)
 at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:53)
Caused by: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ArtifactResolveException: Download failed for artifact ':cglib-nodep:2.1@jar': Could not GET 'http://svn1:18080/svn/main/repository//cglib-nodep/2.1/cglib-nodep-2.1.jar'.
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ArtifactResolutionExceptionBuilder.downloadFailure(ArtifactResolutionExceptionBuilder.java:35)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver.downloadFromResolver(IvyResolverBackedArtifactToFileResolver.java:105)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver.downloadArtifact(IvyResolverBackedArtifactToFileResolver.java:96)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver.downloadWithCache(IvyResolverBackedArtifactToFileResolver.java:91)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyResolverBackedArtifactToFileResolver.resolve(IvyResolverBackedArtifactToFileResolver.java:57)
 at org.gradle.api.internal.artifacts.ivyservice.ArtifactToFileResolverChain.resolve(ArtifactToFileResolverChain.java:41)
 at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1$1.create(ResolvedArtifactFactory.java:39)
 at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1$1.create(ResolvedArtifactFactory.java:37)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:99)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:49)
 at org.gradle.api.internal.artifacts.ivyservice.ResolvedArtifactFactory$1.get(ResolvedArtifactFactory.java:37)
 at org.gradle.api.internal.artifacts.DefaultResolvedArtifact.getFile(DefaultResolvedArtifact.java:107)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactFileResolver.getFile(DefaultLenientConfiguration.java:137)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFiles(DefaultLenientConfiguration.java:115)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFilesStrict(DefaultLenientConfiguration.java:98)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.getFiles(DefaultResolvedConfiguration.java:45)
 at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.getFiles(SelfResolvingDependencyResolver.java:56)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingArtifactDependencyResolver.java:78)
 ... 78 more
    BUILD FAILED
  Total time: 15 mins 6.314 secs

#9

This url looks suspicious (particularly the ‘//’ part): http://svn1:18080/svn/main/repository//cglib-nodep/2.1/cglib-nodep-2.1.jar

It seems like you’re not defining the group/organisation of the dependency. Does this URL work for you directly?

We’ve made substantial changes to dependency resolution since Milestone7. Can you try upgrading to the latest release?


(David Resnick) #10

The dependency works fine 99% of the time.

I should be moving to the latest gradle release soon and will see if it recurs there.


#11
Resource found. [HTTP GET: http://svn1:18080/svn/main/repository//cglib-nodep/2.1/cglib-nodep-2.1.jar]
...
Download failed for artifact ':cglib-nodep:2.1@jar': Could not GET 'http://svn1:18080/svn/main/repository//cglib-nodep/2.1/cglib-nodep-2.1.jar'.

It looks to me like your svn servers are unreliable in their responses. The first GET is just to see if the module exists (since no pom file is found). The second GET is used to actually download the jar file. Gradle expects the responses to be consistent.

A few benefits you might see from Milestone8 and later:

  • the first request uses HEAD instead of GET.

  • we don’t discard the root cause of the problem, so you might get some better diagnostics.


(David Resnick) #12

I don’t think it’s likely that both SVN servers had a problem supplying the file, but some kind of temporary network problem could explain the eventual outcome.


(David Resnick) #13

Daz, when I said that this module was artifact-only did you assume I meant that the dependency is defined with @jar (it wasn’t).

I’m still encountering this error using Gradle 1.0 and am trying to figure out how I can make it more reliable.


#14

Can you please create a new forum post fully describing the issues you are seeing. The more information you can provide the better: build scripts, log files (use gist), etc