Thanks for the input. I was just about to E-mail the list with a similar 
solution using the following (using the setup from my original post):

classpath:"${sourceSets.main.runtimeClasspath.asPath}

But your custom configuration approach is far more elegant. Thanks for pointing 
this out.



From: Rene Groeschke <gra...@breskeby.com<mailto:gra...@breskeby.com>>
Reply-To: "user@gradle.codehaus.org<mailto:user@gradle.codehaus.org>" 
<user@gradle.codehaus.org<mailto:user@gradle.codehaus.org>>
Date: Wed, 14 Mar 2012 13:13:30 -0500
To: "user@gradle.codehaus.org<mailto:user@gradle.codehaus.org>" 
<user@gradle.codehaus.org<mailto:user@gradle.codehaus.org>>
Subject: Re: [gradle-user] SVNAnt in Gradle

Hello Neil,

I guess, you're mixing up your dependencies here. You should create a custom 
configuration for your antsvn dependencies:
---------------
configurations{
    antsvndeps
}

dependencies{
    antsvndeps group: svnAntGroup, name: "svnant", version: svnAntVersion
    antsvndeps  group: svnAntGroup, name: "svnkit", version: svnAntVersion
    antsvndeps  group: svnAntGroup, name: "ganymed", version: svnAntVersion
    antsvndeps  group: svnAntGroup, name: "jna", version: svnAntVersion
    antsvndeps  group: svnAntGroup, name: "svnjavahl", version: svnAntVersion
    antsvndeps  group: svnAntGroup, name: "svnClientAdapter", version: 
svnAntVersion
}
---------------

Now you can reference this configuration in your checkout task to declare the 
classpath
---------------
task checkout << {
  ant.taskdef(resource: 'org/tigris/subversion/svnant/svnantlib.xml', 
classpath:configurations.antsvndeps.asPath)
  ant.svn(javahl: 'false', svnkit:'true', username:'user', password:'pass', 
failonerror:'true'){
    ant.checkout(url:url, destPath:path)
  }
}

---------------

hope that helps,
regards,
René


[cid:part1.05060203.03010609@breskeby.com]
Neil Chaudhuri<mailto:nchaudh...@potomacfusion.com>
14. März 2012 18:51
I am attempting to reproduce in Gradle a simple SVN checkout that I have 
managed to pull off in Ant. I have the following:

dependencies {
  runtime group: svnAntGroup, name: "svnant", version: svnAntVersion
  runtime group: svnAntGroup, name: "svnkit", version: svnAntVersion
  runtime group: svnAntGroup, name: "ganymed", version: svnAntVersion
  runtime group: svnAntGroup, name: "jna", version: svnAntVersion
  runtime group: svnAntGroup, name: "svnjavahl", version: svnAntVersion
  runtime group: svnAntGroup, name: "svnClientAdapter", version: svnAntVersion
}

task checkout << {
  ant.taskdef(resource: 'org/tigris/subversion/svnant/svnantlib.xml', 
classpathref:"${sourceSets.main.runtimeClasspath}")
  ant.svn(javahl: 'false', svnkit:'true', username:'user', password:'pass', 
failonerror:'true'){
    ant.checkout(url:url, destPath:path)
  }
}

Unfortunately, the build fails with the following:

3:28:19.544 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: : Reference 
file collection not found.
13:28:19.544 [ERROR] [org.gradle.BuildExceptionReporter] at 
org.apache.tools.ant.types.Reference.getReferencedObject(Reference.java:115)
13:28:19.544 [ERROR] [org.gradle.BuildExceptionReporter] at 
org.apache.tools.ant.types.DataType.dieOnCircularReference(DataType.java:144)
13:28:19.545 [ERROR] [org.gradle.BuildExceptionReporter] at 
org.apache.tools.ant.types.Path.dieOnCircularReference(Path.java:497)
13:28:19.545 [ERROR] [org.gradle.BuildExceptionReporter] at 
org.apache.tools.ant.types.DataType.dieOnCircularReference(DataType.java:115)
13:28:19.545 [ERROR] [org.gradle.BuildExceptionReporter] at 
org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:248)
13:28:19.545 [ERROR] [org.gradle.BuildExceptionReporter] at 
org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:214)
13:28:19.545 [ERROR] [org.gradle.BuildExceptionReporter] at 
org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:202)
13:28:19.545 [ERROR] [org.gradle.BuildExceptionReporter] at 
org.apache.tools.ant.types.Path.isFilesystemOnly(Path.java:720)
…

Any insight into this issue is appreciated.

Thanks.
________________________________

<<inline: compose-unknown-contact.jpg>>

Reply via email to