Installing SVNAnt into Eclipse

On my road of exploration for ANT, and the end goal of using it for deployment, I have had to tackle how to get files out of SVN ready for moving to a server. This means getting ANT to run the equivalent of an svn export from the command line. This is possible using the […]
August 4, 2007 9:51 am

On my road of exploration for ANT, and the end goal of using it for deployment, I have had to tackle how to get files out of SVN ready for moving to a server. This means getting ANT to run the equivalent of an svn export from the command line. This is possible using the command line client through ANT thus:

However there is a nicer way that doesn’t involve installing the SVN command line client. Enter SvnAnt.

To install it download the latest stable build, I have used the svnant-1.0.0.zip. Take the jar files

  • svnant.jar
  • svnClientAdapter.jar
  • svnjavahl.jar

And place them somewhere sensible. I used my workspace directory c:\development\development or perhaps the \eclipse\plugins\org.apache.ant_1.6.5\lib ANT lib directory inside my eclipse folder. Once you have placed your jar files, you need to get Eclipse to load them at runtime. I read somewhere that using the ANT folder above and a simple restart would have Eclipse pick them up, but that didnt work for me.

  1. Open Eclipse
  2. Window > Preferences
  3. Ant > Runtime
  4. Ant Home Entries (Default)
  5. Click Add External JARs
  6. Navigate to c:\development\workspace or wherever you unzipped the jar files
  7. Select the 3 .jar files
  8. Open > Apply > OK
  9. Restart Eclipse

You should now be able to run the svn tasks. Here is an example to update a local working copy.

Leave a Comment

Login
Log in below to access your courses.
Log In With Google
Forgot Password
Enter your email address or username and we’ll send you instructions to reset your password.