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.

coreolyn

In reply to Re: Ant and Perl by coreolyn
in thread Ant and Perl by P0w3rK!d

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.