By putting a Perl front end to calling ANT builds I've managed to carve out a significant niche in the build/deploy process for Perl. Perl takes care of file movement and modifications and then sets up environment vars to control the build. This allows for multiple applications to utilize a centralized set of ANT targets so that each new app that comes up can work off a template of pre-set task to build their application.
For instance Perl sets up $ENV{APPNAME} with the appropriate value that it has parsed from a text configuration file and than executes the build.xml for that application. The ant file can pick up that value via a line <property name="appname" value="${env.APPNAME}"/> ANT can then access that value as ${appname}
Tip try to keep all required OS calls isolated to one area and executed from the Perl Code. Don't just use backticks but create functions that are reusable and cross platform as most development happens on NT but production may be a Unix variant
Modularity and reuse is key as while this project started as just a one-time quick fix and has grown into an integral part of the infrastructure with non-stop feature creep for over a year now. (There's already quite a list of new feature request for Version 3).
One place where Perl has stood out has been in Pre and Post Deployment modifications to files ( to make server/environment specific changes to files ) and in pushing directories between servers in shared environments
Best of luck.
coreolynIn reply to Re: Ant and Perl
by coreolyn
in thread Ant and Perl
by P0w3rK!d
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |