Megadeth United Abomination Tour stop Singapore

Finally a band that really matters to me is playing in Singapore. Over the last two years I sat and cursed as India became the destination of music gods, first ‘Joe Satriani’ and then ‘Iron Maiden’. Here I was slaving away in Singapore while the immortals performed in India. And then yesterday Dyan had a welcome suprise for me. Megadeth is performing in Singapore. Yeah you heard it right Megadeth, one of the big four Trash Metal bands is going to be live in Singapore. 26th October is the date. And just to make things sweeter it’s Heaven and Hell the next day. tickets available at sisti .

Heaven and Hell is the Black Sabbath reunited with Dio. It features the original Black Sabbath bandmates Tony Iommi and Geezer Butler, as well as Vinny Appice. Dio is widely believed to be one of the best singers in metal. And this was the line up with which Black Sabbath released the Dio years. More on the two bands later. All in all October is going to be one hell of a month. The countdown begins


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

Ant prompt for username/password for Oracle / Svnant

While ant is usually used to run scripts automatically there are times when one requires that a the user name and password be dynamically be fed. For this the ant core task Input is available. It is really a cool task which will allow for the prompting of required variables at runtime.

To syntax for this task is:
<input message=”Please enter db-username:” addproperty=”db.user” defaultvalue=”Scott-Tiger”/>

Using this will create a prompt when the script is run. But wait for password you don’t want the password to be seen by others do you? Well Input does not provide for that. You can extend Ant’s input capabilities by writing a subclass of where you replace each character with a * or you can use Jera Ant Tasks. The query Task should fulfill ones needs.

Ant SQL Task Oracle procedures

Since we generally deal with Oracle as soon as we got the tables created via an ant script we ran into problems with the procedures. The ant transaction which takes in a file assumes that every line is to be executed separately . This makes it difficult to compile procedures. However the sql task provides for that as well.

<sql driver=”oracle.jdbc.driver.OracleDriver” url=”url” userid=”username” password=”password” delimiter=”/” delimitertype=”row” keepformat=”yes”>

Subversion, Ant and SVN task

Running subversion with Ant can be a bit of a tedious process.

First it requires the three jars (svnant.jar, svnClientAdapter.jar,svnjavahl.jar) which need to be loaded. For ‘ant’ this can be done in two ways. Either you place all the jars in the ant lib directory. The other method is to load the jars when running ant via the command prompt.

ant -lib /home/svn/java/lib

with this one is setup to use svn with ant. Unfortunately that is not enough.

With the help of the underlying svnClientAdapter, <svn> 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 now you are either have to have the native JNI interface or you have to have subversion installed in the system. I had subversion installed in my system.

So now we can move forward to the ant build file.

<typedef resource=””/>

This is required as it defines the svn task. the can be found in svnant.jar. This defines the task svn to map to org.tigris.subversion.svnant.SvnTask.

It is equivalent as to writing
<taskdef name=”svn” classname=”org.tigris.subversion.svnant.SvnTask” />

To checkout the xml is

<svn javahl=”false” username=”${svnant.repository.user}” password=”${svnant.repository.passwd}”>
<checkout url=”${svn.url}” destPath=”${svn.workdirectory}” />

javahl defaults to true. So unless you have the native JNI interface it is better to install subversion and use javahl=”false”.

The various subversion commands which can be used in ant can be found insubclipse:Svn task

Compliments from a Nurse

Nurse: You have lovely arms…

Patient: Er..

Nurse: For Blood letting.

Wat sayest u?

This is something we have seen a lot of times. From the Japanese tourist at the fountain to the guy behind the coconut tree. What caption can you put on this?

Mine: Its Big but does it shoot?