On 11/01/2012, at 4:06 AM, Glyn Walters wrote:

> Hi
> 
> Having a few problems configuring my dependencies for Ivy as used by
> TeamCity to store artifacts. I'm using Gradle 1.0-milestone-7.
> 
> My repositiories configuration looks like this:
> 
> repositories {
>    ivy {
>        url "http://cmbuilddev/guestAuth/repository/download/";
>        layout 'pattern', {
>            artifact "[module]/[revision]/[artifact](.[ext])"
>            ivy "[module]/[revision]/teamcity-ivy.xml"
>        }
>    }
> }
> 
> And the dependencies are configured like this:
> 
> dependencies {
>       compile group: "org", name: "bt521", ext: "jar", version: "88075"
> }
> 
> This finds the teamcity-ivy.xml which looks like this:
> 
> <ivy-module version="1.4">
>  <info organisation="org" module="bt521" revision="88075"/>
>  <publications>
>    <artifact name="JavaAppCommon-88075" type="jar" ext="jar"/>
>    <artifact name="reports" type="zip" ext="zip"/>
>  </publications>
> </ivy-module>
> 
> But then gradle will attempt to download a bt521-88075.jar. Shouldn't it try
> to download the artifacts in the ivy.xml?

When you specify an extension (using the 'ext' attribute), you're telling 
Gradle to ignore whatever artifacts that are declared in the ivy.xml, and 
instead to get the artifact ${name}-${version}.${ext}. You should remove the 
'ext' attribute if you want the artifacts declared in the ivy.xml.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to