OK now I think I understand. It is unfortunate that TeamCity is using
"latest.*" as version names, since these clash with a built-in feature of
ivy.
Ivy (and therefore Gradle) interprets "latest.<status>" as a _dynamic
version_, which is then resolved to a static version based on the status of
the published module.

- "latest.release" finds the newest version with "release" status.
- "latest.milestone" finds the newest version with "milestone" status.
- "latest.integration" finds the newest version with any status.

So "latest.lastSuccessful" will attempt to find the newest version with the
"lastSuccessful" status, and this is not what you want.
Unfortunately this rule is not configurable in Gradle, so I guess your
workaround is the best way forward for now.

cheers
Daz

On 16 January 2012 02:38, Glyn Walters <glyn.walt...@gmail.com> wrote:

> Hi Darrell
>
> I thought it would be resolved by constructing the url to the ivy.xml as
> normal, using "latest.lastSuccessful" in the version part.
>
> For example if I set the version to "88192" it resolves to a url of:
>
>
> http://cmbuilddev/guestAuth/repository/download/bt521/88192/teamcity-ivy.xml
> .
>
> With version "latest.lastSuccessfull" I assumed the url would become:
>
>
> http://cmbuilddev/guestAuth/repository/download/bt521/latest.lastSuccessful/teamcity-ivy.xml
>
> If I enter that url manually in a browser I do get the ivy.xml. Also in the
> TeamCity docs on artifact dependency they have the following:
>
> /    BUILD_REVISION can be either build number or one of the following
> strings:
>        latest.lastFinished
>        latest.lastSuccessful
>        latest.lastPinned
> /
>
> However, having said all that. If I enter just "lastSuccessful" that does
> work through gradle. So that's the answer. Many thanks!
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/Issues-using-TeamCity-Ivy-Repo-tp5134627p5148279.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


-- 
Darrell (Daz) DeBoer
Principal Engineer, Gradleware
http://www.gradleware.com

Reply via email to