Hello , Have worked on couple of projects where have simply copy pasted build files for ant from other's / web .
Now there seems to be a common approach :: compile / run Junit tests / war / jar / ear deploy
This seems to be repeated in my projects .
My question ::
Can I have a Master Build file and the other project specific build files which inherit from this .
I am thinking - if this is possible - than I would push common tasks in the project agnostic build file The project build file will pass as a parameter the project name ( for creation of jar / war / ear etc )
Any pointers would be greatly appreciated Thanks , ~satish
Can I have a Master Build file and the other project specific build files which inherit from this
Yes. You can create a master build file, and import it in your project specific build.xml:You could also use Ant's ANT task to call targets from your Master Build file, although that task is designed to allow you to build subprojects rather than to call targets from a master. [ September 02, 2008: Message edited by: Jan Cumps ]
Originally posted by Jeanne Boyarsky: Satish, Also take a look at macrodefs. They let you call the same logic with different parameter values.
And presetdefs, for simpler cases. Use them a lot - great way to reduce duplication.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Jun 19, 2008
Thanks Jan , Jeanne and Ilja for the help . Thanks , ~satish