Tag Archives: MacroDef

Apache Ant – String to uppercase / lowercase using ScriptDef

In Apache Ant, we can define custom task using MacroDef.

 

Other than that, Apache Ant is now shipped with a Javascript engine so we could use ScriptDef to define our own task in Javascript. The following example defines two tasks converting a string to uppercase and lowercase.
Continue reading Apache Ant – String to uppercase / lowercase using ScriptDef

Apache Ant – Define your custom Ant Task using MacroDef

We can define custom task in Apache Ant using the <macrodef> which makes use of the <sequential> nested task as a template.

Try the following build.xml and run ant to get a rough idea on how it works.
build.xml
Continue reading Apache Ant – Define your custom Ant Task using MacroDef