[GRADLE-1781] Maven resolver does not find maven snapshots with uniqueVersion = true (which is the default value for the maven deployer) and latest selected Created: 03/Sep/11  Updated: 04/Jan/13  Resolved: 14/Nov/11

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

Type: Bug
Reporter: Ricardo Torres Assignee: Unassigned
Resolution: Fixed Votes: 2


 Description   

In the below examples repoBase is the URL for Artifactory, snapshotPublishRepoLocation is a snapshot repo in the Artifactory deployment, and resolverRepoLocation is the virtual repository that resolves from all repositories availabe to the Artifactory deployment including snapshotPublishRepoLocation.

Setup for artifact:

version = "0.1-SNAPSHOT"

uploadArchives {
repositories.mavenDeployer {
snapshotRepository(url: "${repoBase}/${snapshotPublishRepoLocation}")
pom.artifactId = 'example'
}
}

Setup for project that has example as a dependency:

buildscript {
repositories {
mavenRepo urls: "${repoBase}/${resolverRepoLocation}"
}
dependencies

{ classpath 'com.example:example:+' }

}

This project will fail to resolve example.jar. I suspect it is because the maven deployer's unique versioning which results in the expected version in the folder hierarchy, but replaces "SNAPSHOT" with a "timestamp and an incrementing counter" (thanks to Luke Daley for pointing that out) in the name of both the pom and jar artifacts. I believe this results in the resolver being unable to find either artifact.



 Comments   
Comment by Ricardo Torres [ 03/Sep/11 ]

A work around is to set uniqueVersion = false in the mavenDeployer.

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