Exporting a SVN Working Copy with ANT

Once you have installed the SVN task to Eclipse, you can begin to look at the possibilities. For example in a deployment scenario you could use ANT to export the HEAD revision so you have a clean set of files ready for moving by FTP or some other means.

There certainly isnt any VooDoo here, its all very straight forward.

<!-- export current head revision -->

<echo message="exporting to ${buildDir}" />

<property name="buildDir" value="c:/export/${projectName}" />

<svn username="username" password="password">
   
   <export srcUrl="http://localhost/svn/testrepository" destPath="${buildDir}" revision="HEAD" />

</svn>

Comments
dickbob's Gravatar I'm trying to use export to get a copy from my repository onto my remote testing server. All works fine the first time but then I get "svn: Destination directory exists; please remove the directory or use --force to overwrite". I tried sneaking a "--force" into the srcUrl value. That didn't generate an error but it didn't update my testing copy either.

What am I missing here?
# Posted By dickbob | 27/09/07 23:33
BlogCFC was created by Raymond Camden. This blog is running version 5.9.001.