|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ANT - Generic Scripts |
« View previous topic :: View next topic » |
Author |
Message
|
Deeko |
Posted: Tue Jan 26, 2010 8:44 am Post subject: ANT - Generic Scripts |
|
|
 Acolyte
Joined: 16 May 2001 Posts: 72 Location: Edinburgh, UK
|
Hi,
I've been running my ANT scripts for a while but I'd like to improve them a bit.
By this I mean I'd like to make the calls to the antcall targets generic. My scripts are based on the ones shown on Developerworks and whilst they work OK you need to have a build xml file that has specific entries. This means creating new files for new deployments instead of a single template that can be run against any project.
Ideally, I'd like to create a temporary build project, check out artefacts from a tag and then run a generic script that loops through the project and builds the bar files. Unfortunately, my ANT skills are somewhat lacking (my "Ant in Action" book order is still pending!) and I can't seem to get any decent hits from the internet.
Has anyone attempted this and if so can you help shed any light on what's involved?
Thanks, |
|
Back to top |
|
 |
Cliff |
Posted: Fri Jan 29, 2010 8:32 am Post subject: |
|
|
Centurion
Joined: 27 Jun 2001 Posts: 145 Location: Wiltshire
|
FWIW, I used a slightly different approach to automation of WMB builds, Java builds etc. Essentially it works like this:
Master perl scipt reads a config file to determine what technologies need building and generates a master Ant build file.
Master Ant build file runs, and for each technology runs a (perl) process to extract code from ClearCase against a baseline into a temp area, runs that technology's Build process (perl for WMB, Java for Java!) that reads a config file, determines what to build and writes a child Ant build file. This is then executed, then a ClearCase update process stashes the results of the build and creates another baseline. Job done.
There is a separate Release process when we're ready to deploy, essentially this just extracts the built objects and packages them for distribution.
I control the master build & release processes, the technology teams are responsible for their own build processes, everything is driven from config files and held in ClearCase.
The biggest problems we encountered were wrestling with ClearCase UCM in the extract and update processes. A right royal pain in the a*se.
Hope this helps -
Cliff |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Jan 29, 2010 9:15 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Cliff - Kudos for using Perl. Camel power all the way.
But I think Deeko is asking for more specific help on this step:
Cliff wrote: |
determines what to build |
|
|
Back to top |
|
 |
Cliff |
Posted: Mon Feb 01, 2010 1:24 am Post subject: |
|
|
Centurion
Joined: 27 Jun 2001 Posts: 145 Location: Wiltshire
|
Well, one approach I tried was to extract from ClearCase and walk the tree to find all the candidate .msgflow and .msgset files and to generate Ant targets for building these. However this doesn't cater for needing to build more objects that were changed, such as when a utility subflow has been amended. I also tried driving the build list from ClearQuest activities, but again this proved to be more trouble that it was worth.
I came to the conclusion that 'determining what to build' is best done with a config file. Less elegant perhaps but more fit for purpose! |
|
Back to top |
|
 |
Deeko |
Posted: Thu Feb 04, 2010 8:39 am Post subject: |
|
|
 Acolyte
Joined: 16 May 2001 Posts: 72 Location: Edinburgh, UK
|
Hi Cliff, Jeff,
Thanks for the comments. I think the config file based approach does have it's merits I have to say!
However, rather than using Perl, I may use Java in conjunction with Ant via LeafCutter. Not tried this yet mind you!
Regards,
Derek. |
|
Back to top |
|
 |
Deeko |
Posted: Fri Feb 05, 2010 7:51 am Post subject: |
|
|
 Acolyte
Joined: 16 May 2001 Posts: 72 Location: Edinburgh, UK
|
BTW - I just changed my script over to use macrodef rather than antcall and the results were quite nice!
I went from 14mins 40 seconds for 9 messageflows to 2 mins 10 seconds for 11 messageflows (I added another two)...
Well worth doing!  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|