I found new macrodef feature in ant extremely useful in my code development. It allows me to reuse lots of code and save time. Here is a quick example on how to use macrodef and why it is cool Let’s say I have several web applications that I need to deploy on the same web server. If I use a regular Ant task, I would have to replicate these lines of code for every application: <wldeploy action="deploy" verbose="${verbose}" debug="${debug}" name="myApp" source="${output.dir}/myApp.war" user="${admin.username}" password="${admin.password}" adminurl="${adminurl}" targets="myWebSiteDomain" /> I know it does not look that bad, but this is just a short sample. In a real world case, I also need to compile the application, generate a WAR file, deploy it, generate a client stub, etc. So, the Ant build.xml tends to grow very fast. In one o...
This is a collection of notes on programming by Mykola Dzyuba.