Setting up Ant to build ExpressoThis document describes a building system for Expresso, using the Ant which a Java-based build tool developed by Sun and now hosted at the Apache Software Foundation jakarta site, and used for the Jakarta Project . Ant is much like Make, but different in that instead of a model where it is extended with shell-based commands, Ant is extended using Java classes. Instead of writing shell commands, the configuration files are XML-based, calling out a target tree where various tasks get executed. Each task is run by an object that implements a particular Task interface.
IntroductionAnt is a Java-based build automation tool that removes many of the pitfalls associated with building large Java codebases. As mentioned it is possible to set up a CVSROOT and other environment variables to automate CVS operation. Ant is an open source portable Java technology build faciliaty that is XML driven that is independent of the IDE. Basicially it is a Make replacement without all of Makes idiosyncracies. Ant simplifies and automates the often complex
process associated with deployment for the J2EE platform. It offers
direct integration with test harnesses (Junit which we also use) and
version control systems (CVS).Please download ANT from http://ant.apache.org/.
Have a look at the very powerful Ant This document describes a building system for Expresso, using the Ant build-tool . Basic Requirements:Currently to build Expresso with ANT, you will need the following:
It's easy....honest! The detailed instructions below look more daunting than the process really is! Here is a summary of steps:
Options for Building ExpressoThere are many ways to build Expresso and depending
on your needs depends on how you may choose to build the tool. Philosophy of building Web Applications with ExpressoExpresso's philosophy of building web application is to build your application into the Expresso framework as opposed to adding Expresso to your application like Struts does. For symatics sake Expresso refers to client applications as components. To make more sense of this lets examine the directory structure of expresso for a moment.
Build your application in expresso or place Expresso jar within your applicationThis is the "Struts-ish" mentality of building web applications with expresso. While this method does work its not considered best practices because Expresso's model is so that you build web applications into Expresso not the other way around. Option 1 Running Expresso and components like eForums from downloads (easiest route, no Ant required)Download the expressoXXXX-bin.war from the jcorporate site and unwar it into your webapps directory. Next download eforumxxx-bin.zip and unzip into the base directory of your unwar'ed expresso, ie expresso5.0.3. This will automatically place the eforum files into their correct location. Start Tomcat! Done. Option 2 Building client application code in a static version of Expresso (useful for those building client code with a static Expresso)This option is for those who have no interest in modifying Expresso's files and build their own application to that expresso code base. Download expresso-xxxx-bin.war and unwar it. Create a directory in expressoxxxx/expresso called components and make that your client code docroot. Set your EXPRESSO_HOME env variable for your base directory, so if you unzipped expresso in c:\projects then make that your value for the env variable. Have your client application Ant file turn your class files into a jar and place that jar in WEB-INF/lib and copy your config files into WEB-INF/config. Option 3 Building Expresso and components like eForums from downloads src archives or CVS (This includes using Ant for both Expresso and component code, Preferred for Expresso developers or those who might want editable access to expresso source)This is very safe way to build your war files for deployment because if ensures that you can always recover because you have all of the source and all could is built from that source. Download expressoxxx-src.zip and eforumxxx-src.zip and unzip them in seperate directory locations (or download from CVS). Set your EXPRESSO_HOME env variable for your base directory, so if you unzipped expresso in c:\projects then make that your value for the env variable. Next take notice of the eforum build file, this will be the "master" file that builds your war. To build a clean version of Expresso with eforum included call the Ant target called expresso-eforum-binary, then upon success call ant deploy-component-war. This build file model can be used for building and integration your own Expresso app into Expresso. You will also need to download the Developers Bundle.zip or download the lib module from CVS to build Expresso. For further help on building from CVS see this. Building Expresso From CVS
cvs -d :pserver:guest@jcorporate.com:/home/javacorp/.cvs/expresso checkout lib Deploying and Testing your new build on Tomcat Catalina
Example Built ScriptsHere are some example build scripts that are unsupported and only provided as examples. If you have suggestions for enhancement or correctness, let us know.
You might want to use right-click "Save Target As" to store the files above, to prevent your browse |
Copyright © 2001-2003 Jcorporate Ltd. All rights
reserved. Copyright Privacy
Last Modified:
27-Aug-2003