[GRADLE-2027] Milestone 6 fails to recognize fetched dependencies and then fails fetch dependencies from Nexus repository Created: 05/Jan/12  Updated: 04/Jan/13  Resolved: 23/Jan/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-6
Fix Version/s: 1.0-milestone-8

Type: Bug
Reporter: Moritz Dietsche Assignee: Daz DeBoer
Resolution: Fixed Votes: 0


 Description   

Milestone 4 successfully fetches required dependencies from an internal Nexus repository (no proxy).
When switching to milestone 5 these artifacts are recognized and the repository is not contacted.
When removing these artifacts milestone 5 successfully downloads them again.
When switching to milestone 6 these artifacts are NOT recognized and Gradle tries to fetch them again.
Fetching them with milestone 6 fails due to the following error:

Cause: Could not GET 'https://blabla.pom'. Received status code 401 from server: Unauthorized
at org.gradle.api.internal.artifacts.repositories.CommonsHttpClientBackedRepository$LazyResourceInvocationHandler.init(CommonsHttpClientBackedRepository.java:191)
org.gradle.api.internal.artifacts.repositories.CommonsHttpClientBackedRepository$LazyResourceInvocationHandler.invoke(CommonsHttpClientBackedRepository.java:179)
org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:97)
org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(AbstractPatternsBasedResolver.java:93)
org.apache.ivy.plugins.resolver.IBiblioResolver.findIvyFileRef(IBiblioResolver.java:102)
org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:223)
org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:503)
org.gradle.api.internal.artifacts.repositories.MavenResolver.getDependency(MavenResolver.java:50)
org.gradle.api.internal.artifacts.ivyservice.UserResolverChain$ModuleResolution.resolveModule(UserResolverChain.java:326)
org.gradle.api.internal.artifacts.ivyservice.UserResolverChain.resolveLatestModule(UserResolverChain.java:110)
org.gradle.api.internal.artifacts.ivyservice.UserResolverChain.getDependency(UserResolverChain.java:74)
org.gradle.api.internal.artifacts.ivyservice.TopLeveResolverChain.getDependency(TopLeveResolverChain.java:60)
org.gradle.api.internal.artifacts.ivyservice.IvyResolverBackedDependencyToModuleResolver$DefaultModuleVersionResolver.getDescriptor(IvyResolverBackedDependencyToModuleResolver.java:79)
... 70 more

Going back to milestone 5 works without downloading the required artifacts again.



 Comments   
Comment by Moritz Dietsche [ 05/Jan/12 ]

Problem persists in gradle-1.0-milestone-7-20111219065105+0100.

Comment by Daz DeBoer [ 07/Jan/12 ]

Could you please try with the final M7 release, running with '-i'? This will give us a better idea of what's going on.

http://gradle.org/downloads

Comment by Moritz Dietsche [ 10/Jan/12 ]

I solved it. It seems that from Milestone 6 on I can no longer use the Ivy credential store to access protected repositories. (Solution: http://gradle.org/docs/current/userguide/dependency_management.html#mavenPasswordProtectedRepo)

repositories

{ flatDir name: 'localDiskRepo', dirs: 'lib' org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(nexusAuthRealm, nexusAuthHost, nexusAuthUser, nexusAuthPassword); mavenRepo url: nexusURL }

run on Milestone 7 leads to

basic authentication scheme selected
No credentials available for BASIC 'Canoo Nexus Repository'@ci.canoo.com:443
Request for checksum at https://correct_url.pom.sha1 failed: Unauthorized
Checksum SHA-1 unavailable. [HTTP GET: https://correct_url.pom.sha1]
basic authentication scheme selected
No credentials available for BASIC 'Repository'@ci.canoo.com:443
Failed to get resource: 401 (Unauthorized). [HTTP GET: https://correct_url.pom]

which worked before.

Thanks for your effort.

Comment by Adam Murdoch [ 17/Jan/12 ]

Can we close this?

Comment by Moritz Dietsche [ 20/Jan/12 ]

Probably yes. The problem is not solved but does no longer arise in milestone 7.

Generated at Wed Jun 30 12:10:48 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.