I am responding to this old post because the archive for it was the closest thing I found to an answer, and I'm hoping this helps someone else with the same issue I was having!
In short, the above didn't work for me. Here's what I added to my root gradle.build: //BEGIN make sure that the optional ant stuff works: configurations { antssh } dependencies { antssh group: 'org.apache.ant', name: 'ant-jsch', version: '1.8.2' } // add additional jars to the AntBuilder classpath for use within the imported build. ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader configurations.antssh.each { File f -> antClassLoader.addURL(f.toURI().toURL()) } //END: Make sure that the optional ant stuff work I posted about it on my blog: http://taytay.com/?p=309 Thanks to this response by TheKaptain, I was alerted to the answer: http://gradle.1045684.n5.nabble.com/Calling-ant-test-target-fails-with-junit-classpath-issue-newbie-td4385167.html Cheers -- View this message in context: http://gradle.1045684.n5.nabble.com/optional-task-in-ant-build-xml-tp1434718p5469431.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