Posts for the 'Building software' Category

Using Commons Logging from Ant

Wednesday, April 23rd, 2008

Here is a common problem with custom Ant tasks. A typical task is implemented using multiple classes, so classes that don't extend org.apache.tools.ant.Task class don't necessarily have to have a dependency on Ant APIs. For example, it is pretty easy to pass Ant properties in a hashtable instead of passing the entire project object. This [...]

Jython Ant Wrapper Examples

Monday, April 7th, 2008
Somebody asked me about examples for PAnt Jython wrapper. Here are some. I'll be updating this page with more examples in the future. Following is a simple echo task. Note that pant.py has to be on your "python.path". You can set it by adding it to your ANT_OPTS environment variable (ANT_OPTS=-Dpython.path=python_path). [...]

Ant Scripts without XML - Jython Ant Wrapper

Thursday, January 31st, 2008
In my previous post I blogged about my attempts to replace XML-based syntax for invoking Ant tasks using Jython scripts. But I wasn't fully satisfied with the result - I did not like that fact that I had to pass a task name as a parameter to PAnt.execTask, e.g. pant.execTask("mkdir", dir=buildDir). It just was not [...]

Ant Scripts without XML

Sunday, December 23rd, 2007
It's pretty easy to create an Ant file for a simple project. A simple Ant script typically contains ubiquitous "init", "compile", "test", "war" (or "jar), "build" targets all wired together. It's easy to change and easy to understand and the script's flow has a declarative, rule-based feel to it. The problem is, projects and [...]