On 02/09/2011, at 7:23 PM, richardm wrote:

> I'm experimenting with Ivy for the first time (at the moment we have JARS in
> lib directories copied in all of our projects)
> 
> In the release notes for Gradle 1.0-milestone-3 I see there is an easier way
> to define the repository (
> http://wiki.gradle.org/display/GRADLE/Gradle+1.0-milestone-3+Release+Notes
> http://wiki.gradle.org/display/GRADLE/Gradle+1.0-milestone-3+Release+Notes 
> )
> 
> repositories {
>    ivy {
>        name = 'libs'
>        userName = 'some-user'
>        password = 'some-password'
>        artifactPattern
> 'http://myrepo.com/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]'
>    }
> }
> 
> Does this only work with a URLResolver?  The notes say "Gradle will choose
> the appropriate repository implementation based on the URL patterns you have
> supplied", however I can't get this working using a local file system (I'm
> using a file system repository while learning to use Ivy) e.g.
> 
> uploadArchives {
>    uploadDescriptor = false
>    repositories {
> 
>        ivy {
>            name = 'local-repo'                        
>            artifactPattern
> "file://F:/ivy-repo/[module]/[revision]/[artifact]-[revision].[ext]"
>        }
>    }
> }
> 
> With this setup I get the error:
> 
> Cause: Could not publish configurations [configuration ':archives'].
> Cause: URL repository only support HTTP PUT at the moment

The repositories.ivy{} method only supports http/https urls in milestone-3. 
Milestone-4 added support for files and file urls.

For milestone-3 and earlier, you need to use an Ivy FileSystemResolver, as 
below.


> 
> Do I have to set up the repository as follows if using a file system
> repository?
> 
> add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
>            name = 'repo'
>            addIvyPattern
> "F:/ivy-repo/[organisation]/[module]-ivy-[revision].xml"
>            addArtifactPattern
> "F:/ivy-repo/[organisation]/[module]-[revision](-[classifier]).[ext]"
>            descriptor = 'optional'
>            checkmodified = true
>        }
> 
> 
> 
> --
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/Ivy-Repository-setup-with-FileSystemResolver-tp4761675p4761675.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
> 
> 


--
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