Looks like, when ArtifactResolutionQuery is executed, the resolution process does not look at pre-configured ivy pattern in repository definition. Instead, a hardcoded value is used. Step to reproduce are below.
Given.
-
Sample resource http://teamcity.jetbrains.com/guestAuth/repository/download/bt345/535061:id/teamcity-ivy.xml
repositories {
// url "http://teamcity.jetbrains.com/guestAuth/repository/download/"
ivy {
layout ‘pattern’ , {
artifact '[module]/[revision]/artifact’
ivy ‘[module]/[revision]/teamcity-ivy.xml’
}
}
Execute:
project.dependencies.createArtifactResolutionQuery()
.forComponents(componentIds)
.withArtifacts(IvyModule, IvyDescriptorArtifact)
.execute()
Expected
- teamcity-ivy.xml file content is resolved.
Actual
- Resolution fails, because file ivy.xml is missing.
Workaround
- Override IvyResolver.getMetaDataArtifactName() method and do some hacks to inject new resolver into Ivy repository.