Ant / continuous integration
Turning Client Vision into Results 2 Outline presentation Introduction Ant –History –Concepts –Tasks –Examples –Extending Ant Maven / Cruisecontrol
Turning Client Vision into Results 3 Why do you need continuous integration? Large development teams / different locations / specialities Automated alert mechanism for bugs Keep documentation up to date Include (Regression / Unit etc.) tests in automated build The so called 'nightly build' gives a snapshot of the current state of a project for all concerned
Turning Client Vision into Results 4 Ant - History Improvement of C/C++ make ( example ) Initially part of the Tomcat project Since January 2000 own project
Turning Client Vision into Results 5 Ant concepts XML / Java based Build process contained in a file called build.xml Central concept: Task – Task (1..N) are contained in Target s Concept xxxxx Set allows grouping of files, properties etc. Ant supports property files and command-line parameters which specify which Task needs to be performed Dependencies between Task s can be specified You can define you own task by simply extending from the org.apache.tools.ant.Task class
Turning Client Vision into Results 6 Ant tasks Most tasks are already available in Ant (core-tasks) –Java –Javac –CVS –Boolean (if / then) constructs Optional tasks –Junit –JspC Before you start with RAD: –Set ANT_HOME to the directory into which you downloaded the Ant distribution, see demo RAD where this is done –Copy Junit.jar supplied by RAD to the ANT_HOME/lib dir
Turning Client Vision into Results 7 Ant example Simple Web-project ( in RAD ) to demonstrate use in a fully-fledged project: –Source code repository tasks –Task dependencies –Junit tasks –Javadoc task –Reporting task (unittest reports) –Packaging (JAR / EAR)
Turning Client Vision into Results 8 Maven / CruiseControl Maven : Uniform project model (POM = Project Object Model) –Example POM CruiseControle –Written by Martin Fowler (Thoughtworks) –Uses a Publish / Subscribe model –Can call Maven / Maven2 and Ant !
Turning Client Vision into Results 9 Links