ArtifactResolutionQuery does not use repository pattern to locate ivy files

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.

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.
1 Like

Thanks for the report: I can reproduce this issue. I’ve raised GRADLE-3328 to track it.

Thank you. Will watch the Jira issue

The fix is now in master, and will be in Gradle 2.7.