Unable to resolve latest.integration from Ivy repo

We typically publish internal artifacts to a Ivy repo with a status of integration. In other projects, we use the ivy revision of latest.integration to pull the most recent published version.

It seems from the dependency documentation that the latest.integration version would work in Gradle but it isn’t.

I have repositories consisting of mavenCentral and then our internal ivy repo. When I declare a dependency on latest.integration, it fails to find the dependency. If I use an explicit version it works fine.

The interesting thing is, when I use latest.integration it only seems to search the maven repo and doesn’t check my ivy repo. Is this something that should work?

Ivy repo config

ivy {
    url "<some internal url>"
    layout 'pattern', {
        artifact "[organisation]/[module]/[type]s/[artifact](-[revision]).[ext]"
        ivy "[organisation]/[module]/ivys/ivy(-[revision]).xml"
    }
    resolve.dynamicMode = true
}

I’m using latest.integration without any problem with Gradle.

My repo does not have resolve.dynamicMode = true though (not sure it this is related)

and I only have (several) ivy + maven repo configured (not maven central)

Hope this helps …

Using debug flag, I noticed that gradle was complaining that it didn’t see the revision pattern in my ivy repository configuration. I was able to get this working by removing the optional syntax around revision in my patterns (http://ant.apache.org/ivy/history/latest-milestone/concept.html#patterns). I added additional pattern configurations to account for the functionality that the optional pattern provided.

layout 'pattern', {
    artifact "default/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"
    artifact "default/[organisation]/[module]/[type]s/[artifact].[ext]"
    ivy "default/[organisation]/[module]/ivys/ivy-[revision].xml"
    ivy "default/[organisation]/[module]/ivys/ivy.xml"
}