Build System Components

Apache Ant

-- RobertDunigan - 17 Mar 2006

Apache Ant is a Java-based build tool. Instead of a model based 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. This allows Ant to be cross platform.

  • Latest Ant version: 1.6.5
  • Current version in use: 1.6.5

Perforce

-- RobertDunigan - 19 Apr 2006

Perforce is a Revision Control(RC) system used to manage the CLforJava project. Perforce manages different clients, user-specs, and access to files being modified/submitted/deleted. Along with file version management, perforce also allows for branch management. Projects may be branched to make major changes to the project and then merged together once the change is complete and functioning. It also provides many ways to track changes and work being done by users. Remember, Jerry sees everything you do...

We use various perforce commands, such as "p4 sync", during the weeklyBuild.sh and submitTrigger.sh scripts along with Ant tasks to build the CLforJava project and increment its build number.

  • Latest Perforce version: Release 2007.3
  • Current version in use: Release 2007.2

Jar Files

-- TroyNelson - 21 Sep 2003

How to create a Jar File:

STEP 1: Open prompt and go to the directory of the file(s) you would to put in the JAR file.
STEP 2: Type jar cvf Name.jar Name.ext

Note: If you would like to put multiple files in you jar file, place them in a space seperated list.

>> jar cvf Name.jar Name.ext Name2.ext

STEP 3: View directory and you should see a Name.jar file

Properties Files

-- RobertDunigan - 17 Mar 2006

  • currentResources.properties
    • Java Resource Bundle which holds various key/value pairs. These values can be accessed throughout the CLforJava project when needed. The values include various strings and most importantly the current build number for the build system.

TO DO: Create seperate resource bundles for various languages

SH Files

These scripts run as the user build.group. Most of what they do is (or should be) done with ant.

  • weeklyBuild.sh
    • Script which runs the weekly build of CLforJava.

-- RobertDunigan - 17 Mar 2006 -- EricHSmith - 13 Apr 2006 -- AveryScott - 26 Feb 2008

XML Files

-- RobertDunigan - 15 Apr 2006

  • build.xml
    • Contains targets which call the various other xml files dealing with cleaning, building, and running the smoke tests. These other xml files reside inside the BuildEntites? directory.
    • The build.xml file is made of several tags
      • Project - this tag has the following attributes
        • name - the name of the project
        • default - the default target to use when a target is not supplied
        • basedir - the base directory from which all path calculations are done
      • Property - these tags help us avoid hard coding the directory structure throughout the build file
      • Target - this tag has the following attributes
        • name - the name of the target
        • depends - a comma-separated list of names of targets on which this target depends (dependencies)
        • if - the name of the property that must be set in order for this target to execute
        • unless - the name of the property that nust not be set in order for this target to execute
        • description - a short description of the target's function

  • incrementBuildWeekly.xml
    • Increments the build number within currentResources.properties during the weekly build
    • Creates a weekly label which holds the Date, Time, Build Number, and all the revision numbers for the files during the weekly build

  • incrementBuildSubmit.xml
    • Increments the build number within currentResources.properties when a submission is made to Perforce

  • copyProperties.xml
    • Copies the .properties files from the CLforJava src directory to the CLforJava build directory.

  • Many Files...pending

XSL Files

-- EricHSmith - 13 Apr 2006

  • junit-frames.xsl
    • Used by the Ant task junitreport to create the SmokeTest? Report HTML documents.
      • junitreport has a nested element report which has the following attributes:
        • styledir - specifies the directory that the XSL file is located.
        • format - the name of the XSL entirely depends on this
          • If format = "frames", the XSL file MUST be named junit-frames.xsl
          • If format = "noframes", the XSL file MUST be named junit-noframes.xsl
    • Can be modified to display internal Ant properties (properties set in build.xml), such as the build number.
      • When a property is set in build.xml, it is included as an element in the XML files created by JUnit.
      • Using standard XSLT (as well as XPath to select them), these property elements could then be loaded as variables and displayed anywhere within the Smoketest reports.
      • Links about XSLT and XPath:
        http://www.w3schools.com/xsl/
        http://www.w3schools.com/xpath/

Build Entities - Directory

The Build Entities directory contains files that are needed to make the Ant build system work. These files are all XML based documents that tell Ant things like, where to find the source files, where to place the compiled files, where the unit tests are, and how to create the unit test reports. These files allow the system to be built from source (around 900 files) with a single click in the NetBeans? IDE.

Topic revision: r11 - 2009-02-16 - 03:00:17 - MadelineWilliams
 
Home
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback