MAST

Links

Home
Mighty Automated Build (MAB)

MAB Overview
Setting Up
Configure and Build
Mighty Automated Deployment (MAD)

MAD Overview
For Developers
For Administrators
External links

ArchStudio 3
xADL 2.0 Site
Official xArch Site
UCI Institute for Software Research
MAST - Mighty Automated Build - Setup Mighty Automated Software Tools

Mighty Automated Build - Setup

Setting up MAB requires two software packages to be installed on your machine independent of MAB. You will need:

  1. A Java 2 Software Developer's Kit (J2SDK): Windows, Solaris, and Linux users can get one from Sun Microsystems; we use Java 2, version 1.4 for all our builds here. It is likely, if you are a Java developer, that you already have a J2SDK installed on your machine and are familiar with how to use it. Otherwise, download the appropriate one for your project and install it.
  2. Apache Ant: You can download Apache Ant here. As of this writing the latest version of Ant is 1.5.1, which seems to work fine with MAB. Should Ant 2 ever be released, it is unlikely that it will work with the current version of MAB as they seem to be completely redesigning the Ant language. Download and install Ant per the instructions on the Apache site. Ant should work with any J2SDK from Sun.

The Build Environment

MAB assumes that your project is in a particular directory structure before building. This directory structure is fairly standard across Java projects. In this structure, a top-level directory for the project, which we will call prod_dir, contains all product code, arranged hierarchically in directories corresponding to Java packages. This structure looks like this:

prod_dir/
 |
 +-package1/
 | |
 | +-subpackage2/
 | | |
 | | +-SomeClass.java
 | |
 | +-SomeOtherClass.java
 |
 +-package2/ 
   |
   +-SomeThirdClass.java

Depending on your development environment, the corresponding .class files for the .java files may be in those directories as well; this is fine. Likewise, resource files (images and other static binaries accessed by the program) will also likely be in those directories. This is also fine.

If your software is not in this format but is in some other format (a CVS repository, perhaps, or scattered across two or three directories) then you should refactor it into this format for building with MAB. You can do this with a small shellscript or batch file, usually.

Assuming your software is in this format, you are ready to download MAB. Do a "Save As..." on the link below and save the build.xml file to the directory prod_dir. This is the MAB stub script.

Click here to download the MAB Stub Script

It is important to understand at this point what MAB will do to your code. In the next section, you will choose an output directory, which we will call build_dir. Assuming we configure MAB properly, the output will be a directory and file structure like this:

build_dir/
 |
 +-myproduct.zip 
 | (contains contents of myproduct directory,
 |  below)
 |
 +-myproduct/
   |
   +-doc/
   |  |
   |  +-(contains javadoc documentation)
   |
   +-lib/
   |  |
   |  +-myproduct.jar
   |    (contains .class files and resources)
   |
   +-src/
     |
     +-package1/
     | |
     | +-subpackage2/
     | | |
     | | +-SomeClass.java
     | |
     | +-SomeOtherClass.java
     |
     +-package2/ 
       |
       +-SomeThirdClass.java

As you will see in the next section, additional files can be "mixed in" to this structure to create a complete build.

Now, please proceed to the next section.




Copyright (C)2000-2003 The Regents of the University of California. All Rights Reserved Worldwide.