Ant SVN Task (SvnAnt) and Javahl

On a previous post Subversion, Ant and SVN task I talked about how to use the SVN ant task. However for this to work i had to install the svn client. So all of a sudden I have the svn command line, tortoise and subclipse (in eclipse) installed on my system. I rarely use the command line because the tortoise client is efficient and pretty easy to use.
To use svnant without having the svnclient installed in your system is kind of difficult.
Repeating myself.
With the help of the underlying svnClientAdapter, task uses JavaHL (a native JNI interface to the subversion api) if it can find the corresponding library (e.g. svnjavahl.dll on windows). Otherwise it uses svn command line interface.

So we need to find the native JNI interfaces. I had no idea which these were and even googling did not help. Until it struck me that the subeclipse must have the JNI interfaces because it was working on my colleagues workstation who did not have subversion installed in his system. A quick search through eclipse plugins and we had what we needed. In the eclipse\plugins\org.tigris.subversion.javahl.win32_1.0.2 directory there are the following eight dll files.

  • intl3_svn.dll
  • libapr.dll
  • libapriconv.dll
  • libaprutil.dll
  • libdb43.dll
  • libeay32.dll
  • libsvnjavahl-1.dll
  • ssleay32.dll

These have dependencies about which we had no idea. So we copied all of them and placed them in the ant lib directory.

Now we set the javahl=”true” for the ant task and viola it works. Nice no, easy no way, but if you really want to run svn from ant then this is the way to go I guess. How to install subclipse in eclipse to get the dll files?

Installing Subclipse

Link to Javahl – courtesy Thomas


13 responses to “Ant SVN Task (SvnAnt) and Javahl

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: