Friday, 12 February 2010

JDeveloper & Hudson

Since a while I was looking for a description on how to do continuous integration with Hudson based on a JDeveloper project without any luck.

Last Wednesday however I read the blog post of Geoff Waymark ‘Ultra quick Hudson setup to build a JDeveloper ADF application’ and in no time I fished the job.
Geoff’s blog post is very complete and detailed but since I was not familiar with Hudson and scripting at all, I’ will go on a bit more detail on Hudson’s workspace variable and ojdeploy.

The %WORKSPACE% variable just represents the directory specified under ‘Remote FS root’ completed with your ‘Project name’.

So in my case C:\Hudson_Slave_Node\dummy-trunk

Secondly to get the Windows batch command right I read Steve Muench blog post ‘Online Help for ojdeploy Utility’ which brought me to the JDeveloper Help page ‘About Deploying from the Command Line’.

There you can find all the info you need to know about the ojdeploy utility.
You find the profile parameter under ‘Application Properties ’ > ‘Deploy’.

This is my batch code:
del *.ear
%OJDEPLOY% -profile dummy_application1 -workspace %WORKSPACE%\trunk\dummy.jws
copy %WORKSPACE%\trunk\deploy\*.ear %WORKSPACE%
rmdir /S /Q %WORKSPACE%\trunk

Job’s done.

Next thing on my wish list now is automatic deployment of my ear file to a WLS via the usage of WLST.