Could not resolve all dependencies error with M8


(Dan Stine) #1

Hello, I am receiving the following error building with the M8 release candidate:

11:02:41.938 [ERROR] [org.gradle.BuildExceptionReporter] Could not resolve all dependencies for configuration ':sef-domain:compile'.
11:02:41.938 [ERROR] [org.gradle.BuildExceptionReporter] > Could not find group:org.codehaus.jackson, module:jackson-core-asl, version:1.5.1.
11:02:41.939 [ERROR] [org.gradle.BuildExceptionReporter]
 Required by:
11:02:41.939 [ERROR] [org.gradle.BuildExceptionReporter]
     com.copyright.rup.sef:sef-domain:0.1.10
11:02:41.939 [ERROR] [org.gradle.BuildExceptionReporter] > Could not find group:xpp3, module:xpp3_min, version:1.1.4c.
11:02:41.939 [ERROR] [org.gradle.BuildExceptionReporter]
 Required by:
11:02:41.941 [ERROR] [org.gradle.BuildExceptionReporter]
     com.copyright.rup.sef:sef-domain:0.1.10 > com.thoughtworks.xstream:xstream:1.4.2

This project builds successfully with M6, except for periodic failures due to GRADLE-2010.

This project also seems to build properly with M7. I tried several times and was successful each time. Our team is on M6, so we don’t have a lot of experience with M7.

This is a multi-project build with four subprojects. This failure is on the first subproject that gets compiled (it is a dependency for the other three subprojects).

We are using a local Artifactory repository to proxy third-party libraries from Maven Central.

Output of gradle --version:

------------------------------------------------------------
Gradle 1.0-milestone-8-20120208051443+0100
------------------------------------------------------------
  Gradle build time: Wednesday, February 8, 2012 4:14:43 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 7 6.1 amd64

What is the best way to debug this? I could post relevant gradle scripts and settings. I could post the output from “gradle build --debug” but since that is ~900 lines long I am not including it in this initial post. I could open a JIRA item. Etc.

Thanks, Dan


Resolving non-Ivy artifacts via Ivy (in the context of Node.js)
(Dan Stine) #2

I just reproduced the isssue with a much simpler build. Just a couple *.java files, single project build.

build.gradle:

apply plugin: 'java'
  repositories {
    maven { url myLocalArtifactoryUrl }
}
  dependencies {
    compile 'com.thoughtworks.xstream:xstream:1.4.2'
}

“gradle build” results in:

:compileJava
  FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not find group:xpp3, module:xpp3_min, version:1.1.4c.
  Required by:
      :local:unspecified > com.thoughtworks.xstream:xstream:1.4.2
  * 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 ':compile'.
 at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:51)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:36)
 at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.rethrowFailure(SelfResolvingDependencyResolver.java:81)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingArtifactDependencyResolver.java:70)
 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:499)
 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:250)
 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:155)
 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
 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)
Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionNotFoundException: Could not find group:xpp3, module:xpp3_min, version:1.1.4c.
Required by:
    :local:unspecified > com.thoughtworks.xstream:xstream:1.4.2
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver$StaticVersionResolveResult.notFound(LazyDependencyToModuleResolver.java:159)
 at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver$StaticVersionResolveResult.resolve(LazyDependencyToModuleResolver.java:118)
 at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$ModuleVersionSelectorResolveState.resolve(DependencyGraphBuilder.java:869)
 at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DefaultModuleRevisionResolveState.getDescriptor(DependencyGraphBuilder.java:597)
 at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphBuilder.java:307)
 at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBuilder.java:283)
 at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:117)
 at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:53)
 at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver.resolve(DefaultDependencyResolver.java:67)
 at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:36)
 at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:34)
 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.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:34)
 at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver.resolve(SelfResolvingDependencyResolver.java:42)
 at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyResolver.java:78)
 at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:36)
 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:237)
 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
 at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:497)
 ... 66 more
    BUILD FAILED
  Total time: 2.814 secs

(René Groeschke) #3

Hello Dan, I tested your snippet above and it works quite well for me. You might ran into GRADLE-2086? Can you run your build again with commandlineoption “–refresh dependencies”?

regards, René


#4

The best way to diagnose these problems is to run with “–refresh dependencies --info”. You will then see the result all of the HTTP requests being made to resolve the dependencies.


(Dan Stine) #5

The key fact seems to be that I have a buildscript block that declares two repositories A and B (in that order), and then a standard repositories block that declares only repository B. If I switch the order of the repositories in the buildscript block to B then A, and clear the gradle cache by deleting the directories, the build will succeed.

Here is a walk-through of a simplified demonstration. I switched to the official M8 build and reproduced the same behavior. In the demo project below, there are no actual dependencies on Spring 3.1.0 in the build script or in my source code; I just picked a common library as an example.

This set of steps consistently fails:

  1. Clear gradle cache by deleting C:\Users\dstine.gradle\caches\artifacts-8 and C:\Users\dstine.gradle\caches\1.0-milestone-8.

  2. Execute “gradle clean build” with the following build.gradle:

apply plugin: 'java'
  buildscript {
    repositories {
        maven { url "http://repository.springsource.com/maven/bundles/release" }
        maven { url "http://repo1.maven.org/maven2" }
    }
    dependencies {
        classpath 'org.springframework:spring-core:3.1.0.RELEASE'
    }
}
  repositories {
    maven { url "http://repo1.maven.org/maven2" }
}
  dependencies {
    compile 'org.springframework:spring-core:3.1.0.RELEASE'
}

This set of steps consistently succeeds:

  1. Clear gradle cache by deleting C:\Users\dstine.gradle\caches\artifacts-8 and C:\Users\dstine.gradle\caches\1.0-milestone-8.

  2. Execute “gradle clean build” with the following build.gradle:

apply plugin: 'java'
  buildscript {
    repositories {
        maven { url "http://repo1.maven.org/maven2" }
        maven { url "http://repository.springsource.com/maven/bundles/release" }
    }
    dependencies {
        classpath 'org.springframework:spring-core:3.1.0.RELEASE'
    }
}
  repositories {
    maven { url "http://repo1.maven.org/maven2" }
}
  dependencies {
    compile 'org.springframework:spring-core:3.1.0.RELEASE'
}

Other information:

If I substitute mavenCentral() for maven { url “http://repo1.maven.org/maven2” }, the failure case becomes successful.

If I run “gradle --refresh dependencies clean build --info” the failure case still fails. This is the output:

Starting Build
Settings evaluated using empty settings file.
Projects loaded. Root project using build file 'C:\RUP\workspaces\test\local\build.gradle'.
Included projects: [root project 'local']
Evaluating root project 'local' using build file 'C:\RUP\workspaces\test\local\build.gradle'.
Compiling build file 'C:\RUP\workspaces\test\local\build.gradle' using BuildScriptClasspathScriptTransformer.
file or directory 'C:\Users\dstine\.gradle\caches\artifacts-8\filestore', not found
Checksum SHA-1 unavailable. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-core/3.1.0.RELEASE/spring-core-3.1.0.RELEASE.pom.sha1]
Resource missing. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-core/3.1.0.RELEASE/spring-core-3.1.0.RELEASE.pom]
Resource missing. [HTTP HEAD: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-core/3.1.0.RELEASE/spring-core-3.1.0.RELEASE.jar]
file or directory 'C:\Users\dstine\.gradle\caches\artifacts-8\filestore', not found
Checksum SHA-1 matched cached resource: [HTTP GET: http://repo1.maven.org/maven2/org/springframework/spring-core/3.1.0.RELEASE/spring-core-3.1.0.RELEASE.pom.sha1]
Checksum SHA-1 unavailable. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-parent/3.1.0.RELEASE/spring-parent-3.1.0.RELEASE.pom.sha1]
Resource missing. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-parent/3.1.0.RELEASE/spring-parent-3.1.0.RELEASE.pom]
Resource missing. [HTTP HEAD: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-parent/3.1.0.RELEASE/spring-parent-3.1.0.RELEASE.jar]
Checksum SHA-1 matched cached resource: [HTTP GET: http://repo1.maven.org/maven2/org/springframework/spring-parent/3.1.0.RELEASE/spring-parent-3.1.0.RELEASE.pom.sha1]
Resource missing. [HTTP HEAD: http://repo1.maven.org/maven2/org/springframework/spring-parent/3.1.0.RELEASE/spring-parent-3.1.0.RELEASE.jar]
Checksum SHA-1 unavailable. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.pom.sha1]
Resource missing. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.pom]
Resource missing. [HTTP HEAD: http://repository.springsource.com/maven/bundles/release/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.jar]
Checksum SHA-1 matched cached resource: [HTTP GET: http://repo1.maven.org/maven2/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.pom.sha1]
Checksum SHA-1 unavailable. [HTTP GET: http://repository.springsource.com/maven/bundles/release/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom.sha1]
Resource missing. [HTTP GET: http://repository.springsource.com/maven/bundles/release/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom]
Resource missing. [HTTP HEAD: http://repository.springsource.com/maven/bundles/release/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar]
Checksum SHA-1 matched cached resource: [HTTP GET: http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom.sha1]
Checksum SHA-1 unavailable. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/apache/commons/commons-parent/5/commons-parent-5.pom.sha1]
Resource missing. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/apache/commons/commons-parent/5/commons-parent-5.pom]
Resource missing. [HTTP HEAD: http://repository.springsource.com/maven/bundles/release/org/apache/commons/commons-parent/5/commons-parent-5.jar]
Checksum SHA-1 matched cached resource: [HTTP GET: http://repo1.maven.org/maven2/org/apache/commons/commons-parent/5/commons-parent-5.pom.sha1]
Checksum SHA-1 unavailable. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/apache/apache/4/apache-4.pom.sha1]
Resource missing. [HTTP GET: http://repository.springsource.com/maven/bundles/release/org/apache/apache/4/apache-4.pom]
Resource missing. [HTTP HEAD: http://repository.springsource.com/maven/bundles/release/org/apache/apache/4/apache-4.jar]
Checksum SHA-1 did not match cached resources: [HTTP GET: http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom.sha1]
Resource found. [HTTP GET: http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom]
Download http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom
Resource missing. [HTTP HEAD: http://repo1.maven.org/maven2/org/apache/apache/4/apache-4.jar]
Resource missing. [HTTP HEAD: http://repo1.maven.org/maven2/org/apache/commons/commons-parent/5/commons-parent-5.jar]
Checksum SHA-1 matched cached resource: [HTTP GET: http://repo1.maven.org/maven2/org/springframework/spring-core/3.1.0.RELEASE/spring-core-3.1.0.RELEASE.jar.sha1]
downloading CachedResource: C:\Users\dstine\.gradle\caches\artifacts-7\artifacts7bdfe3021e729aece151fb2788d0956\org.springframework\spring-core.1.0.RELEASE\jar\spring-core-3.1.0.RELEASE.jar for http://repo1.maven.org/maven2/org/springframework/spring-core/3.1.0.RELEASE/spring-core-3.1.0.RELEASE.jar ...
        [SUCCESSFUL ] org.springframework#spring-core;3.1.0.RELEASE!spring-core.jar (231ms)
Checksum SHA-1 matched cached resource: [HTTP GET: http://repo1.maven.org/maven2/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.jar.sha1]
downloading CachedResource: C:\Users\dstine\.gradle\caches\artifacts-7\artifacts7bdfe3021e729aece151fb2788d0956\org.springframework\spring-asm.1.0.RELEASE\jar\spring-asm-3.1.0.RELEASE.jar for http://repo1.maven.org/maven2/org/springframework/spring-asm/3.1.0.RELEASE/spring-asm-3.1.0.RELEASE.jar ...
        [SUCCESSFUL ] org.springframework#spring-asm;3.1.0.RELEASE!spring-asm.jar (230ms)
Checksum SHA-1 matched cached resource: [HTTP GET: http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar.sha1]
downloading CachedResource: C:\Users\dstine\.gradle\caches\artifacts-7\artifacts2e713c4c9d754c535205def24a7cb6a\commons-logging\commons-logging.1.1\jar\commons-logging-1.1.1.jar for http://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar ...
        [SUCCESSFUL ] commons-logging#commons-logging;1.1.1!commons-logging.jar (246ms)
Compiling build file 'C:\RUP\workspaces\test\local\build.gradle' using BuildScriptTransformer.
All projects evaluated.
Selected primary tasks 'clean', 'build'
Tasks to be executed: [task ':clean', task ':compileJava', task ':processResources', task ':classes', task ':jar', task ':assemble', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test', task ':check', task ':build']
:clean
Task ':clean' has not declared any outputs, assuming that it is out-of-date.
:clean UP-TO-DATE
:compileJava
  FAILURE: Build failed with an exception.
  * What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not find group:org.springframework, module:spring-core, version:3.1.0.RELEASE.
  Required by:
      :local:unspecified
  * Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
  BUILD FAILED
  Total time: 6.382 secs

My environment for all executions in this reply:

------------------------------------------------------------
Gradle 1.0-milestone-8
------------------------------------------------------------
  Gradle build time: Monday, February 13, 2012 11:53:32 PM 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 7 6.1 amd64

#6

Hi Dan

Thanks for the detailed report and analysis.

It seems you have indeed exposed a fairly critical bug in dependency resolution: for some reason we’re using the ‘springsource’ repository identifier in the second resolve, which causes us to use the cache entries for the incorrect repository. (The repository URL is correct, but the repository identifier is used to lookup entries in the cache).

Since the module is missing from the ‘springsource’ repository, it appears to be missing in the second resolve.

I’m looking into the cause and a fix right now. cheers Daz

PS Seems our forums don’t handle long posts very well. We had to remove your previous reply to make it possible to reply to this original post.


(Dan Stine) #7

Okay, thanks. I have filed JIRA issue GRADLE-2100, which includes the most important information from the removed post.


#8

We have a new milestone-8a release candidate available which fixes this bug. Any chance you could try it out for us?

http://gradle.org/release-candidate


(Dan Stine) #9

Sorry, I am offline for a long weekend. I will be able to try this out tomorrow. Though I see I’m too late for m8a. :frowning:


(Dan Stine) #10

Yes, I can confirm that m8a fixes the issue I had. Thanks for the speedy turnaround.