{Notes to self, programming, technology, linux, windows, git} U {Papers, reviews, games, coffee, tabletennis, ramblings} = {things worth saving}

Wednesday, July 08, 2009

Building tomcat applications in Luntbuild

General:

Since luntbuild will execute any build scripts relative to it's own path in it's own execution environment, environment variables specified in windows won't be considered. You might want to reference these, to allow the script to be run manually without having to manage application locations.


$property environment="env"/$
$property file="tomcat.properties" prefix="tomcat"/$
(tomcat.properties specifies the entry: home=${env.CATALINA_HOME} )

In my case, tomcat.home will point to "C:\Program Files\Apache Software Foundation\Tomcat 5.5" when running the build script manually, and the same when i run it with luntbuild, because i inject CATALINA_HOME = "C:\Program Files\Apache Software Foundation\Tomcat 5.5" into the buildscript.

You could inject this as a value, but i like using environment variables for decoupling.

Also note that specifying a schedule that includes space seems to convince luntbuilt to look for a target in the script named the tail word of the schedule name?


Tomcat specifics:


Luntbuild specifies it's own servlet.api which contains the javax namespace. (Anything to do with servlets and Http). Builds will usually fail if you include tomcat's own servlet api since there will be a collission of jar's, as luntbuild imports it's own.

Inject a "mode" value into the buildscript through luntbuild and use ant conditions to check which jar to include. Both servlet api's work fine when building applications depending on these, manually.

Links
http://blog.exis.com/colin/archives/2005/08/23/i-put-a-spell-on-you-because-youre-mine-aka-why-is-tomcat-holding-onto-jars/
http://www.velocityreviews.com/forums/t139757-anyone-have-problems-with-tomcat-554-undeploy-ant-task.html
http://raibledesigns.com/wiki/Wiki.jsp?page=TomcatAntTasks

Followers