Home Contact

PD Versus-inspired Logophilduba.com

Adventures in Web Application Develompent by Phil Duba

Recent Entries

Popular Entries

Top Commenters

  • Nathan Mische (11)
  • CFdevfusion (6)
  • CFFusionDev (5)
  • Peter Bell (4)
  • Sean Corfield (3)
  • Rey Bango (3)
  • Terrence Ryan (3)
  • Scott (2)
  • Jim Priest (2)
  • David (2)

Slideshows

Pool Surprises...

Sponsored Links

Text Link Ads

CFUnited: Automating the build & deployment process with ANT

Posted On June 21, 2008 10:20 AM By Phil in CFUnited

Marc Esher gave a good overview of ANT on Thursday. When first working with ANT, I found it daunting, I didn't really understand it and the setup and it's real power. After attending Marc's presentation (as well as seeing its use in others), I'm not as "scared" of it as I was. Hopefully I can bring some things back to work and show my group how we can use it to minimize some of our more repetitive tasks that could really be done using build tools like ANT. Here are my notes from this presentation:

- went over basic tags and related them to cf tags used in a component to make it easier to understand - there's an example in the presentation downlaod
- all properties set are global and cannot be overwritten using property tag elsewhere/after "creation"
- went right into examples with all online at MXUnit.org (well, at least in the presentation zip file)
    - first was just to show properties, targets, depends, and basic ANT language structure
    - second, was to copy files from one server to another where also bringing over shared directores (ie., more than one app uses the same codebase)
        - directories end with backslashes
        - use excludes to not copy items over to including filters
        - can put multiple file sets into the copy tag
    - third example - zip files
        - not shown, but can add existing files to a zip archive
        - casesensitive="false" - particularly useful on Windows
        - the number of files, amount of includes/excludes will increase the time of zip execution
        - prefix - use to create a containing directory for the zip for quicker deployment
        - can set more than one zipfileset
        - showed how to build with different prefixes to push different code across a number of different directories (ie. inetpub\wwwroot and coldfusion8\customtags)
        - can unzip, just not shown
    - fourth example - using SVN (in supplement code, there is VSS examples as well)
        - sets up the SVN properties (.jar files, paths, etc.)
        - connect to svn using username/password - best case to use a properties file
        - first step was checkout using checkout tag
        - second step was update using update tag (enclosed in svn tag)
        - can use to tag SVN files
        - in appendix, there is a file that uses tagging very well
    - fifth example - ftp of files
        - ftp task with external download
        - only do newer files using newer attribute
        - ftp has minute level granularity so it won't copy over unless you use "cache" area of his examples - gives second level granularity

Resources
- Jim Priest - www.thecrumb.com/wiki/Ant
- Mike Henke - www.henke.ws/machblog
- Luis Manjo - http://coldboxframework.org
- guys at MXUnit.org at Update:theguys@mxunit.org (list for asking questions)
ANT Manual is the uiltimate resource
- http://ant.apache.org/manual/index.html
- well documented, with many examples

Getting back at work
- download presentation
- create new, empty directories
- copy build-stub.xml from preso directory
- copy some of applications to this directory
- add targets to build.xml file and play around
- check out the "teasers" for additonal stuff
- have fun since this is a safe directory
- for configuration, see the other ppt in the zip

I'd recommend downloading the presentation zip over at MXUnit.org and looking through the examples. I know I'm going to be using the as starting points for some of the things I want to do now and when our new architecture comes online.

Comments

marc esher's Gravatar hey phil, great to meet you this morning!

I wanted to add that in the "Resources" section, people can email theguys@mxunit.org, which is a distribution list. A number of us on that list have been messing with ant for a while and for some weird reason love to talk about it.

thanks!

marc
# By marc esher | 6/21/08 3:24 PM
Phil Duba's Gravatar You too Marc! I've updated the resources area.
# By Phil Duba | 6/21/08 4:03 PM
Post Your Comments

Captcha

If you subscribe, any new posts to this thread will be sent to your email address.