Monday, December 13, 2010

Using SVNKit from within Groovy using SvnAnt

To load in SVN Ant you use (this assumes it's in the classpath):
ant.typedef(resource: "org/tigris/subversion/svnant/svnantlib.xml")

This then allows you to use the runSvn closures:
runSvn {
"export"(srcUrl: "", destPath: "")
"import"(url: "", path: "", message: "")
"copy"(srcUrl: "", destUrl: "", message: "")
"delete"(url: "", message: "")
"checkout"(url: "", destPath: "")
"propset"(path: "", name: "", value: "")
}

SvnAnt documentation has more details.
Post a Comment