Added:
trunk/README.html (contents, props changed)
trunk/build.xml
trunk/checkstyle.build.xml
trunk/dist.build.xml (contents, props changed)
trunk/doc/
trunk/doc/History.html (contents, props changed)
trunk/emma.build.xml
trunk/findbugs.build.xml
trunk/javadoc.build.xml (contents, props changed)
trunk/junit.build.xml (contents, props changed)
trunk/lib/
trunk/lib/checkstyle/
trunk/lib/checkstyle/checkstyle.modules.xml (contents, props changed)
trunk/lib/emma/
trunk/lib/emma/echo.emma.xsl (contents, props changed)
trunk/lib/findbugs/
trunk/lib/findbugs/findbugs.filter.xml (contents, props changed)
trunk/lib/pmd/
trunk/lib/pmd/pmd.rulesets.xml (contents, props changed)
trunk/pmd.build.xml
trunk/sclc.build.xml (contents, props changed)
Log:
Initial commit of stack-arakaki
Added: trunk/README.html
==============================================================================
--- (empty file)
+++ trunk/README.html Mon Oct 6 01:47:16 2008
@@ -0,0 +1,232 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+ <head>
+ <title>Stack README</title>
+ </head>
+
+ <body>
+<center>
+<h1> ReadMe</h1>
+<A HREF="mailto:joh...@hawaii.edu">Philip Johnson</A> <br>
+<A HREF="http://csdl.ics.hawaii.edu/">Collaborative Software Development
Laboratory</A><br>
+<A HREF="http://www.hawaii.edu/">University of Hawaii<br>
+</A>
+<p>
+</center>
+
+This file introduces you to the
+major components of this software package. It includes information on the
+contents of the package you have downloaded, instructions on how to
install the
+system, basic invocation and usage, user documentation, developer
documentation,
+and contact coordinates for further information.</p>
+
+
+<h2>A. Contents of this package</h2>
+<table width="735" border="1">
+<tr><th align="center" valign="top" width="93">Directory/File <th
valign="top" width="626">Contents
+<tr><td align="center" valign="top" width="93">.
+ <td valign="top" width="626"> Top-level directory files include::
+ <ul>
+ <li> README.html (this document)
+ <li> build.xml (contains basic build targets and property definitions)
+ <li> checkstyle.build.xml (runs checkstyle)
+ <li> dist.build.xml (creates a distribution package)
+ <li> findbugs.build.xml (runs findbugs)
+ <li> javadoc.build.xml (runs javadoc)
+ <li> junit.build.xml (runs junit)
+ <li> pmd.build.xml (runs pmd)
+ <li> sclc.build.xml (runs sclc)
+ </ul>
+
+<tr><td align="center" valign="top" width="93">./lib
+ <td valign="top" width="626">Contains data files used to build and/or
run the system:
+ <ul>
+ <li>checkstyle/checkstyle.modules.xml contains
checkstyle
+ customizations.</li>
+ <li>pmd/pmd.rulesets.xml contains pmd customizations</li>
+ <li>findbugs/findbugs.rulesets.xml contains findbugs
customizations.</li>
+ </ul>
+<tr>
+ <td align="center" valign="top" width="93">./doc
+ <td valign="top" width="626">Contains developer documentation
including:
+ <ul>
+
+ <li><a href="doc/History.html">History.html</a> provides a
chronological
+ record of the releases of this system.</li>
+ </ul>
+</tr>
+
+<tr><td align="center" valign="top" width="93">./src
+ <td valign="top" width="626">Contains the source files.
+
+<tr><td align="center" valign="top" width="93">./build
+ <td valign="top" width="626">Contains various products of the build
process, including:
+ <ul>
+ <li>javadoc/: Contains javadoc API information.</li>
+ <li>locc/: Contains size data on the
+ system, created by 'ant locc'</li>
+ <li>junit/: Contains
+ output from the JUnit tests, created by 'ant test'</li>
+
+ <li>dist/ Contains any distributions built
+ during development.</li>
+ </ul>
+ <p>These links won't work until their corresponding ant target has
been
+ executed.
+
+</table>
+
+<h2>B. Basic Installation</h2>
+
+<p>These instructions assume that you have unzipped the zip file
containing this
+system to create a directory containing the system components. A note to
Unix
+users: due to a bug in java.util.zip, the directory permissions are munged
if you unzip in Unix, and you won't be able to cd into
+interior directories. To fix this, invoke the following from the
parent
+directory of this system: chmod -R a+x <system directory>. </p>
+
+<ol>
+ <li><b>Download and install the Java JDK version 1.5 or
above. </b></li>
+ <ul>
+ <li>The canonical site for obtaining Java JDKs is <a
href="http://java.sun.com/">http://java.sun.com/</a>.<br>
+
+ </ul>
+ <li><b>Set the JAVA_HOME environment variable and add Java to your
PATH. </b></li>
+ <ul>
+ <li>The procedure for setting environment variables is different on
Windows,
+ Mac, and Unix; consult your sysadmin or google if you do not know how
to set
+ environment variables.
+ <li>An example value for JAVA_HOME on a windows environment is: <a
href="file:///c:/java/jdk1.5.0_08">c:\java\jdk1.5.0_08</a>.
+ <li>Add JAVA_HOME/bin to your PATH <br>
+
+ </ul>
+
+ <li><b>Download and install Ant 1.7.1 or above.</b></li>
+ <ul>
+ <li> The canonical site for obtaining Ant is <a
href="http://ant.apache.org/">http://ant.apache.org/</a>. <br>
+
+ </ul>
+ <li><b>Set the ANT_HOME environment variable and add ANT to your
PATH.</b>
+ <ul>
+ <li>
+ Define the ANT_HOME environment variable An example value is
+ c:\apache-ant-1.7.0;
+ <li>
+ Add the <ANT_HOME>/bin directory to your PATH variable. For
+ details, see the Ant installation instructions.<br>
+ </ul>
+
+
+ <li><b>Invoke 'ant' with no arguments to perform the default build of the
+ system.</b>
+ <ul>
+ <li> This command compiles the system and builds the jar file.
+ <li> Here is example output from successful invocation of the 'ant'
command:<pre>C:\svn-csdl\stack>ant
+Buildfile: build.xml
+
+compile:
+ [mkdir] Created dir: C:\svn-csdl\stack\build\classes
+ [javac] Compiling 5 source files to C:\svn-csdl\stack\build\classes
+
+jar:
+ [mkdir] Created dir: C:\svn-csdl\stack\build\jar
+ [jar] Building jar: C:\svn-csdl\stack\build\jar\stack.jar
+
+BUILD SUCCESSFUL
+Total time: 1 second
+C:\svn-csdl\stack>
+ </pre>
+ </ul>
+
+ <li> <b> The stack.jar file is now ready for use in your applications in
the
+ build/jar directory.</b>
+ <ul>
+ <li>
+ You can include this on your classpath, or drop it into the java/lib/ext
+ directory to make it available in all applications.
+ </ul>
+</ol>
+
+<h2>C. Invocation</h2>
+
+To use the stack system, you employ the edu.hawaii.stack.Stack class in
your own
+code.
+ <h2>D. User documentation</h2>
+ <p>User-level documentation for this package is not available. The stack
+ system is intended for developer use only.</p>
+
+
+<h2>E. Developer documentation</h2>
+
+<p>This distribution includes Eclipse project definition files. In
addition, it
+includes the following developer build files and targets. For the external
tools
+(Checkstyle, PMD, FindBugs, JUnit, SCLC), you must download them from
their home
+pages, unzip them, and then set an environment variable (CHECKSTYLE_HOME,
+PMD_HOME, etc.) to point to this directory. </p>
+
+<table border="1" width="100%">
+ <tr>
+ <td width="22%" valign="top">checkstyle.build.xml
+ <p>Requires: checkstyle 5.0-beta01</td>
+ <td width="78%" valign="top">Runs <a
href="http://checkstyle.sourceforge.net/">Checkstyle</a>
+ on the system, using rules in lib/checkstyle/checkstyle.modules.xml
+ <p>Invocation: ant -f checkstyle.build.xml</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">junit.build.xml
+ <p>Requires: JUnit 4.5</td>
+ <td width="78%" valign="top">Runs <a
href="http://www.junit.org/">JUnit</a>
+ on the system, using Test case code in src/**/Test*.java.
+ <p>Invocation: ant -f junit.build.xml</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">javadoc.build.xml
+ <p> </td>
+ <td width="78%" valign="top">Runs JavaDoc on the system.
+ <p>Invocation: ant -f javadoc.build.xml</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">findbugs.build.xml
+ <p>Requires: FindBugs 1.3.5-rc3</td>
+ <td width="78%" valign="top">Runs <a
href="http://findbugs.sourceforge.net/">FindBugs</a>
+ on the system, using rules in lib/findbugs/findbugs.filter.xml
+ <p>Invocation: ant -f findbugs.build.xml</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">pmd.build.xml
+ <p>Requires: PMD 4.2.3</td>
+ <td width="78%" valign="top">Runs <a
href="http://pmd.sourceforge.net/">PMD</a>
+ on the system, using rules in lib/pmd/pmd.rulesets.xml
+ <p>Invocation: ant -f pmd.build.xml</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">sclc.build.xml
+ <p>Requires: SCLC 2.5.525</td>
+ <td width="78%" valign="top">Runs <a
href="http://csdl.ics.hawaii.edu/Tools/SCLC/">SCLC</a>
+ on the system.
+ <p>Invocation: ant -f sclc.build.xml</td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">dist.build.xml</td>
+ <td width="78%" valign="top">Creates a distribution zip file for this
+ system.
+ <p> </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">verify.build.xml</td>
+ <td width="78%" valign="top">Runs JUnit, PMD, FindBugs, Checkstyle, and
+ JavaDoc on system, failing build if any errors are found. </td>
+ </tr>
+</table>
+ <h2>F. Contact information</h2>
+ <p>If you would like to know more about this software, or would like to
be
+ informed of future releases:</p>
+ <ul>
+ <li><b>Home page</b>: <a
href="http://csdl.ics.hawaii.edu/~johnson/413f06">http://csdl.ics.hawaii.edu/~johnson/413f06</a></li>
+ <li><b>Developer contact:</b> Philip Johnson <a
href="mailto:(joh...@hawaii.edu">(joh...@hawaii.edu</a>)</li>
+ <li><b>Configuration management repository:</b> not available.</li>
+ <li><b>Developer and user mailing lists:</b> not available.</li>
+ </ul>
+<pre> </pre>
+
+</body>
+</html>
Added: trunk/build.xml
==============================================================================
--- (empty file)
+++ trunk/build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,85 @@
+<project name="stack-arakaki" default="jar">
+ <description>
+ The basic build file for the Stack system.
+ Invocation: ant
+ </description>
+
+ <!-- Always make environment variables available with the "env." prefix.
-->
+ <property environment="env" />
+
+ <!-- Make sure we're running a Java 5 or better. -->
+ <condition property="java.5.available">
+ <or>
+ <contains string="${java.version}" substring="1.5" />
+ <contains string="${java.version}" substring="1.6" />
+ </or>
+ </condition>
+ <fail message="This package requires Java 5 or 6."
unless="java.5.available" />
+
+ <!-- Make sure we're running Ant 1.7 . -->
+ <condition property="ant.1.7.available">
+ <contains string="${ant.version}" substring="1.7" />
+ </condition>
+ <fail message="This package requires Ant 1.7."
unless="ant.1.7.available" />
+
+ <!-- Make sure that a compatible version of JUnit is installed. -->
+ <!-- You can override the version. For example: 'ant -Djunit.version=4.1
-f junit.build.xml' -->
+ <property name="junit.version" value="4.5" />
+ <property name="junit.jar"
location="${env.JUNIT_HOME}/junit-${junit.version}.jar" />
+ <available file="${junit.jar}" type="file" property="junit.available" />
+ <fail message="This package requires JUNIT_HOME to be defined and
${junit.jar} available" unless="junit.available" />
+
+ <!-- Basic properties for this system. -->
+ <property name="system.name" value="stack-arakaki" />
+ <property name="majorVersionNumber" value="6" />
+ <property name="minorVersionNumber" value="0" />
+ <tstamp>
+ <format property="DAYSTAMP" pattern="Mdd" />
+ </tstamp>
+ <property name="version"
value="${majorVersionNumber}.${minorVersionNumber}.${DAYSTAMP}" />
+
+ <!-- Basic directory structure. -->
+ <property name="src.dir" location="${basedir}/src" />
+ <property name="lib.dir" location="${basedir}/lib" />
+ <property name="build.dir" location="${basedir}/build" />
+
+ <!-- The compile classpath is useful to many tools. -->
+ <path id="compile.classpath">
+ <fileset file="${junit.jar}" />
+ </path>
+
+ <target name="compile" description="Compiles the code.">
+ <!-- Now compile the code into build/classes -->
+ <mkdir dir="${build.dir}/classes" />
+ <javac srcdir="${src.dir}" destdir="${build.dir}/classes" source="1.5"
target="1.5" debug="on" includeAntRuntime="no">
+ <classpath refid="compile.classpath" />
+ <compilerarg value="-Xlint:all" />
+ <compilerarg value="-Werror" />
+ </javac>
+ </target>
+
+ <target name="clean" description="Delete build/ directory.">
+ <delete dir="${build.dir}" />
+ </target>
+
+ <target name="convertLineEndings" description="Makes *.build.xml line
endings compatible with host platform.">
+ <fixcrlf srcdir="${basedir}" includes="*.build.xml" />
+ </target>
+
+ <target name="jar" depends="compile" description="Create the jar file
for this system in the build dir.">
+ <mkdir dir="${build.dir}/jar" />
+ <jar jarfile="${build.dir}/jar/${system.name}.jar"
basedir="${build.dir}/classes" includes="edu/**">
+ <manifest>
+ <attribute name="Built-By" value="${user.name}" />
+ <attribute name="Main-Class" value="${system.main.class}" />
+ <attribute name="Specification-Title" value="${system.name}" />
+ <attribute name="Specification-Vendor" value="${system.vendor}" />
+ <attribute name="Specification-Version" value="${version}" />
+ </manifest>
+ </jar>
+ </target>
+
+</project>
+
+
+
Added: trunk/checkstyle.build.xml
==============================================================================
--- (empty file)
+++ trunk/checkstyle.build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,49 @@
+<project name="checkstyle" default="checkstyle">
+ <description>
+ Runs checkstyle on system, using rules in:
lib/checkstyle/checkstyle.modules.xml
+ Invocation: ant -f checkstyle.build.xml
+ </description>
+
+ <import file="build.xml"/>
+ <property name="checkstyle.version" value="5.0-beta01" />
+ <property name="checkstyle.dir" location="${build.dir}/checkstyle"/>
+ <property name="checkstyle.jar"
value="checkstyle-all-${checkstyle.version}.jar"/>
+ <property name="checkstyle.failOnViolation" value="false"/>
+
+ <path id="checkstyle.classpath">
+ <pathelement path="${build.dir}/classes"/>
+ <path refid="compile.classpath"/>
+ </path>
+
+ <target name="checkstyle" depends="checkstyle.tool, checkstyle.report"
+ description="Runs Checkstyle."/>
+
+ <target name="checkstyle.tool" depends="compile" description="Checks the
style of the sources and reports issues.">
+ <!-- Check for the CHECKSTYLE_HOME environment variable; fail build if
it can't be found. -->
+ <available file="${env.CHECKSTYLE_HOME}/${checkstyle.jar}"
property="checkstyle.available"/>
+ <fail unless="checkstyle.available"
+ message="Error: CHECKSTYLE_HOME not set or
${env.CHECKSTYLE_HOME}/${checkstyle.jar} not found."/>
+ <taskdef resource="checkstyletask.properties"
classpath="${env.CHECKSTYLE_HOME}/${checkstyle.jar}" />
+
+ <mkdir dir="${checkstyle.dir}"/>
+ <checkstyle config="${lib.dir}/checkstyle/checkstyle.modules.xml"
+ failOnViolation="${checkstyle.failOnViolation}"
+ classpathref="checkstyle.classpath">
+ <fileset dir="${src.dir}" includes="**/*.java" />
+ <formatter type="plain"/>
+ <formatter type="xml" tofile="${checkstyle.dir}/checkstyle.xml" />
+ </checkstyle>
+ </target>
+
+ <target name="checkstyle.report" description="Generates an HTML report
for Checkstyle.">
+ <xslt in="${checkstyle.dir}/checkstyle.xml"
+ out="${checkstyle.dir}/index.html"
+ style="${env.CHECKSTYLE_HOME}/contrib/checkstyle-noframes.xsl">
+ <param name="title" expression="Checkstyle Report" />
+ <param name="module" expression="${system.name}" />
+ </xslt>
+ </target>
+
+</project>
+
+
Added: trunk/dist.build.xml
==============================================================================
--- (empty file)
+++ trunk/dist.build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,28 @@
+<project name="dist" default="dist">
+ <description>
+ Provides the target for building a distribution of the StackyHack system.
+ </description>
+
+ <import file="build.xml" />
+
+ <target name="dist" depends="clean, compile, jar" description="Create a
distribution package.">
+ <!-- Define the directories and distribution name -->
+ <property name="dist.dir" location="${build.dir}/dist" />
+ <property name="tmp.dir" location="${basedir}/tmp" />
+ <property name="dist.name" value="${system.name}-${version}" />
+
+ <!-- Copy distribution files to the tmp dir. -->
+ <delete dir="${tmp.dir}/${dist.name}" />
+ <mkdir dir="${tmp.dir}/${dist.name}" />
+ <copy todir="${tmp.dir}/${dist.name}">
+ <fileset dir="${basedir}" excludes="**/.settings/**,**/.svn/*,
**/*~, tmp/**, build/**" />
+ </copy>
+
+ <!-- Create the zip distribution of this system, and then delete the
tmp dir. -->
+ <mkdir dir="${dist.dir}" />
+ <zip zipfile="${dist.dir}/${dist.name}.zip" basedir="${tmp.dir}" />
+ <delete dir="${tmp.dir}" />
+ </target>
+
+</project>
+
Added: trunk/doc/History.html
==============================================================================
--- (empty file)
+++ trunk/doc/History.html Mon Oct 6 01:47:16 2008
@@ -0,0 +1,183 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+ <head>
+ <title>Stack Release History</title>
+ </head>
+
+ <body>
+ <h1 align="center">Stack Release History</h1>
+ <p align="center"><a href="http://csdl.ics.hawaii.edu/~johnson/">Philip
+ Johnson</a><br>
+ <a href="http://csdl.ics.hawaii.edu/">Collaborative Software
Development
+ Laboratory</a><br>
+ <a href="http://www.hawaii.edu/">University of Hawaii </a></p>
+
+
+ <p align="center">$Id: History.html,v 1.5 2004/10/27 02:41:57 johnson
Exp $</p>
+
+<p
+<p>
+This page provides a history of releases in reverse chronological order.
+
+<p
+<p>
+
+<table width="100%" border="1">
+<tr><th valign="top">Date<th valign="top">Release<th valign="top">Major
Enhancements
+<tr>
+<td valign="top"> 11-Sept-2008
+<td valign="top"> 6.0.911
+<td valign="top">
+<ul>
+ <li>Updates to use latest version of Ant, FindBugs, PMD, Checkstyle, and
JUnit.</li>
+ <li>Requires Java 5, Ant 1.7.x.</li>
+</ul>
+</tr>
+<tr><tr>
+<td valign="top"> 06-Sept-2006
+<td valign="top"> 4.0.906
+<td valign="top">
+<ul>
+ <li>Brand new version, which provides modularized build.xml files.
Initial
+ tool support includes: javac, jar, javadoc, junit, pmd, checkstyle,
findbugs,
+ sclc. Tools omitted for now: Emma, JBlanket, DependencyFinder,
and all
+ Hackystat sensor targets. </li>
+ <li>Requires Java 5, Ant 1.7.x.</li>
+</ul>
+</tr>
+<tr>
+<td valign="top"> 11-Feb-2005
+<td valign="top"> 3.4.211
+<td valign="top">
+<ul>
+ <li>Refactored Hackystat sensors into new package 'StackyHack'. No
Hackystat stuff here.</li>
+ <li>Ant call to DependencyFinder now included.</li>
+</ul>
+</tr>
+
+<tr>
+<td valign="top"> 10/27/2004
+<td valign="top"> 3.3.1027
+<td valign="top">
+<ul>
+ <li>Added JUnit, LOCC, Build, and JBlanket sensors.</li>
+</ul>
+</tr>
+
+<tr>
+<td valign="top"> 09/21/2004
+<td valign="top"> 3.2.921
+<td valign="top">
+<ul>
+ <li>Removed duplicate junit taskdef to remove warning.</li>
+ <li>Removed extraneous constructor(String) from unit test class.</li>
+ <li>Improved documentation. </li>
+</ul>
+</tr>
+<tr>
+<td valign="top"> 09/20/2004
+<td valign="top"> 3.2.920
+<td valign="top">
+<ul>
+ <li>Updated to Ant 1.6, removed JBlanket support to simplify build
system for
+ beginning of semester.</li>
+</ul>
+</tr>
+<tr>
+<td valign="top"> 09/29/2003
+<td valign="top"> 3.1.929
+<td valign="top">
+<ul>
+ <li>Fixes to JBlanket coverage in Ant task.</li>
+</ul>
+</tr>
+<tr>
+<td valign="top"> 09/24/2003
+<td valign="top"> 3.1.924
+<td valign="top">
+<ul>
+ <li>Added JBlanket coverage.</li>
+</ul>
+</tr>
+<tr>
+<td valign="top"> 09/10/2003
+<td valign="top"> 3.0.910
+<td valign="top">
+<ul>
+ <li>Updated the package to conform to latest Ant version and new JOSSE
+ conventions.</li>
+ <li>Deleted Debug class in preparation for conversion to logging
class.</li>
+</ul>
+</tr>
+<tr>
+<td valign="top"> 03/30/2002
+<td valign="top"> 2.0330
+<td valign="top">
+<ul>
+ <li>Made the Stack and ClearStack classes serializable to support
StackMVCdb.</li>
+ <li>Added a toString() method to Stack to simplify debugging.
+</ul>
+</tr>
+
+<tr>
+<td valign="top"> 3/08/2002
+<td valign="top"> 2.0308
+<td valign="top">
+<ul>
+ <li>Deleted Assert.java from project. Not used.
+ <li>Added subclass ClearStack with iterator() method. This subclass
supports
+ the display of stack contents in StackMVC better than the toArray()
method,
+ which required copying the entire stack.
+</ul>
+</tr>
+
+<tr>
+<td valign="top"> 2/11/2002
+<td valign="top"> 2.0211
+<td valign="top">
+<ul>
+ <li>Improved test cases to call assertSame rather than assertTrue.</li>
+ <li>Improved naming of test methods.</li>
+ <li>Improved build.xml to use ${java.class.path} in junit and javadoc
tasks.</li>
+</ul>
+</tr>
+
+<tr>
+<td valign="top"> 1/22/2002
+<td valign="top"> 2.0122
+<td valign="top">
+<ul>
+ <li>Restructured with improved internal file and directory
structure.</li>
+</ul>
+</tr>
+
+<tr>
+<td valign="top"> 11/25/2001
+<td valign="top"> 1.1125
+<td valign="top">
+<ul>
+<li> Added taskdefs for LOCC and j2h and jar files to Ant1.3\lib
+<li> Updated build.xml with dist, j2h, and locc tasks.
+</ul>
+
+<tr>
+<td valign="top"> 10/15/2001
+<td valign="top"> 1.1015
+<td valign="top">
+<ul>
+<li> Removed build.bat, added setenv.bat and Ant1.3.
+</ul>
+
+<tr>
+<td valign="top"> 9/5/2001
+<td valign="top"> 1.0905
+<td valign="top">
+<ul>
+<li> Initial release to class.
+</ul>
+
+</tr>
+
+</table>
+</body>
+</html>
Added: trunk/emma.build.xml
==============================================================================
--- (empty file)
+++ trunk/emma.build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,82 @@
+<project name="emma" default="emma">
+ <description>
+ Generates coverage data for JUnit tests. Cleans, compiles, instruments,
runs JUnit, cleans.
+ Invocation: ant -f emma.build.xml
+ </description>
+
+ <import file="build.xml" />
+ <property name="emma.dir" location="${build.dir}/emma" />
+ <property name="junit.dir" location="${build.dir}/junit" />
+
+ <target name="emma" depends="emma.tool, emma.echo" description="Runs
Emma." />
+
+ <target name="emma.tool" depends="clean, compile" description="Cleans,
compiles, instruments byte codes, runs unit tests, generates Emma report.">
+ <!-- Verify that Emma is installed. -->
+ <available file="${env.EMMA_HOME}/lib/emma.jar"
property="emma.available" />
+ <fail unless="emma.available" message="Error: EMMA_HOME not set or
emma.jar not found, indicating Emma is not installed." />
+
+ <!-- Define the path and taskdef containing the emma binaries. -->
+ <property name="emma.lib.dir" value="${env.EMMA_HOME}/lib" />
+ <path id="emma.lib.dir">
+ <pathelement location="${emma.lib.dir}/emma.jar" />
+ <pathelement location="${emma.lib.dir}/emma_ant.jar" />
+ </path>
+ <taskdef resource="emma_ant.properties" classpathref="emma.lib.dir" />
+
+ <!-- Instrument the .class files. -->
+ <mkdir dir="${emma.dir}" />
+ <emma enabled="true">
+ <instr instrpath="${build.dir}/classes"
destdir="${build.dir}/classes" metadatafile="${emma.dir}/metadata.emma"
merge="true" mode="overwrite">
+ <filter excludes="edu.hawaii.*.Test*" />
+ </instr>
+ </emma>
+
+ <!-- Run JUnit with the instrumented class files. -->
+ <mkdir dir="${junit.dir}" />
+ <junit printsummary="withOutAndErr" fork="yes">
+ <classpath path="${build.dir}/classes;${java.class.path}">
+ <path refid="emma.lib.dir" />
+ <path refid="compile.classpath" />
+ </classpath>
+ <sysproperty key="emma.coverage.out.file"
value="${build.dir}/emma/coverage.emma" />
+ <sysproperty key="emma.coverage.out.merge" value="true" />
+ <formatter type="xml" />
+ <batchtest todir="${junit.dir}">
+ <fileset dir="${src.dir}">
+ <include name="**/Test*.java" />
+ </fileset>
+ </batchtest>
+ </junit>
+
+ <!-- Generate Emma reports. -->
+ <emma enabled="true">
+ <report sourcepath="${src.dir}" sort="+name"
metrics="method:100,block:100,line:100,class:100">
+ <fileset dir="${emma.dir}">
+ <include name="*.emma" />
+ </fileset>
+ <xml outfile="${emma.dir}/coverage.xml" depth="method" />
+ <html outfile="${emma.dir}/coverage.html" depth="method"
columns="name,class,method,block,line" />
+ </report>
+ </emma>
+
+ <!-- Now delete the instrumented .class files. -->
+ <delete dir="${build.dir}/classes" />
+ </target>
+
+ <target name="emma.echo" description="Sends summary of Emma results to
console">
+ <!-- It's ridiculous what we have to do to get a decent summary. -->
+ <xslt style="${basedir}/lib/emma/echo.emma.xsl"
in="${emma.dir}/coverage.xml" out="${emma.dir}/coverage.brief.txt" />
+ <replace file="${emma.dir}/coverage.brief.txt" token="class, %"
value="class: " />
+ <replace file="${emma.dir}/coverage.brief.txt" token="method, %"
value="method:" />
+ <replace file="${emma.dir}/coverage.brief.txt" token="block, %"
value="block: " />
+ <replace file="${emma.dir}/coverage.brief.txt" token="line, %"
value="line: " />
+ <concat>
+ <header>Emma Coverage summary
+</header>
+ <fileset file="${emma.dir}/coverage.brief.txt" />
+ </concat>
+ </target>
+</project>
+
+
+
Added: trunk/findbugs.build.xml
==============================================================================
--- (empty file)
+++ trunk/findbugs.build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,42 @@
+<project name="findbugs" default="findbugs">
+ <description>
+ Runs findbugs on system, using rules in:
lib/findbugs/findbugs.filter.xml
+ Invocation: ant -f findbugs.build.xml
+ </description>
+
+ <property environment="env" />
+ <import file="build.xml" />
+ <property name="findbugs.dir" location="${build.dir}/findbugs" />
+ <property name="findbugs.failOnError" value="true" />
+
+ <target name="findbugs" depends="findbugs.tool, findbugs.report"
description="Runs the FindBugs tool, report, and sensor." />
+
+ <target name="findbugs.tool" depends="compile" description="Runs
FindBugs over the byte code to check for problems.">
+ <!-- Fail this target if FindBugs is not installed. -->
+ <available file="${env.FINDBUGS_HOME}/lib/findbugs.jar"
property="findbugs.available" />
+ <fail unless="findbugs.available" message="Error: FINDBUGS_HOME not
set or findbugs.jar not found." />
+ <taskdef name="findbugs"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
classpath="${env.FINDBUGS_HOME}/lib/findbugs-ant.jar" />
+
+ <!-- Run FindBugs. -->
+ <mkdir dir="${findbugs.dir}" />
+ <findbugs home="${env.FINDBUGS_HOME}"
failOnError="${findbugs.failOnError}"
warningsProperty="findbugs.warningsfound" output="xml:withMessages"
outputFile="${findbugs.dir}/findbugs.xml"
excludeFilter="${basedir}/lib/findbugs/findbugs.filter.xml">
+ <auxClasspath>
+ <path refid="compile.classpath" />
+ </auxClasspath>
+ <sourcePath>
+ <fileset dir="${src.dir}">
+ <include name="**/*.java" />
+ </fileset>
+ </sourcePath>
+ <class location="${build.dir}/classes" />
+ </findbugs>
+ </target>
+
+ <target name="findbugs.report" description="Generate an HTML report on
FindBugs.">
+ <xslt in="${findbugs.dir}/findbugs.xml"
style="${env.FINDBUGS_HOME}/src/xsl/default.xsl"
out="${findbugs.dir}/findbugs-default.html" />
+ </target>
+
+</project>
+
+
+
Added: trunk/javadoc.build.xml
==============================================================================
--- (empty file)
+++ trunk/javadoc.build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,25 @@
+<project name="javadoc" default="javadoc">
+ <description>
+ Provides JavaDoc.
+ </description>
+
+ <import file="build.xml" />
+ <property name="javadoc.dir" location="${build.dir}/javadoc" />
+ <property name="javadoc.failonerror" value="false" />
+
+ <target name="javadoc" depends="compile" description="Generate JavaDoc.">
+ <mkdir dir="${javadoc.dir}" />
+ <javadoc classpathref="compile.classpath"
+ sourcepath="${src.dir}"
+ destdir="${javadoc.dir}"
+ author="true"
+ version="true"
+ use="true"
+ package="true"
+ overview="${src.dir}/edu/hawaii/stack/overview.html"
+ windowtitle="${system.name} API"
+ doctitle="${system.name} API"
+ failonerror="${javadoc.failonerror}"
+ linksource="true" />
+ </target>
+</project>
Added: trunk/junit.build.xml
==============================================================================
--- (empty file)
+++ trunk/junit.build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,41 @@
+<project name="junit" default="junit">
+ <description>
+ Runs junit on system, using tests in classes whose names start with
Test*.
+ Invocation: ant -f junit.build.xml
+ </description>
+
+ <import file="build.xml" />
+ <property name="junit.dir" location="${build.dir}/junit" />
+ <property name="junit.haltonfailure" value="false" />
+
+ <target name="junit"
+ depends="junit.tool, junit.report"
+ description="Runs JUnit, JunitReport" />
+
+ <target name="junit.tool" depends="compile" description="Run JUnit
tests.">
+ <mkdir dir="${junit.dir}" />
+ <!-- Run the tests, which are all classes whose name starts
with 'Test'. -->
+ <junit printsummary="withOutAndErr"
haltonfailure="${junit.haltonfailure}">
+ <classpath>
+ <pathelement location="${build.dir}/classes" />
+ <path refid="compile.classpath" />
+ </classpath>
+ <formatter type="xml" />
+ <batchtest todir="${junit.dir}">
+ <fileset dir="${src.dir}" includes="**/Test*.java" />
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="junit.report" description="Generates an HTML report for
JUnit.">
+ <taskdef name="junitreport"
+
classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator"
/>
+ <junitreport todir="${junit.dir}">
+ <fileset dir="${junit.dir}" includes="TEST-*.xml" />
+ <report format="frames" todir="${junit.dir}" />
+ </junitreport>
+ </target>
+</project>
+
+
+
Added: trunk/lib/checkstyle/checkstyle.modules.xml
==============================================================================
--- (empty file)
+++ trunk/lib/checkstyle/checkstyle.modules.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration
1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!-- For info on these checks, see
http://checkstyle.sourceforge.net/config.html -->
+<!-- Uppercase comments indicate the 'section' in the checkstyle
documentation. -->
+
+<module name="Checker">
+ <module name="JavadocPackage">
+ <property name="allowLegacy" value="true"/>
+ </module>
+
+ <module name="TreeWalker">
+ <property name="charset" value="UTF-8"/>
+
+ <!-- JAVADOC COMMENTS -->
+ <module name="JavadocType">
+ <property name="authorFormat" value="\S"/>
+ </module>
+
+ <!-- Suppress violations when can't find ServletException class etc.
-->
+ <module name="JavadocMethod">
+ <property name="allowUndeclaredRTE" value="true"/>
+ </module>
+
+ <module name="JavadocVariable">
+ <property name="scope" value="public"/>
+ </module>
+
+ <module name="JavadocStyle"/>
+
+ <!-- IMPORTS -->
+ <module name="AvoidStarImport"/>
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+
+ <!-- NAMING CONVENTIONS -->
+ <module name="ConstantName">
+ <property name="format" value="^[a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$"/>
+ </module>
+ <module name="MethodName"/>
+ <module name="ParameterName"/>
+ <module name="TypeName"/>
+
+ <!-- SIZE VIOLATIONS -->
+ <module name="LineLength">
+ <property name="max" value="100"/>
+ </module>
+
+ <!-- WHITESPACE -->
+ <module name="WhitespaceAround">
+ <!-- Don't require whitespace around generic tokens like '<', '>',
and '?' -->
+ <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR,
BOR_ASSIGN, BAND_ASSIGN,
+ BOR,BOR_ASSIGN, BSR, BSR_ASSIGN,
BXOR, BXOR_ASSIGN, COLON,
+ DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND,
LCURLY, LE, LITERAL_ASSERT,
+ LITERAL_CATCH, LITERAL_DO,
LITERAL_ELSE, LITERAL_FINALLY,
+ LITERAL_FOR, LITERAL_IF,
LITERAL_RETURN, LITERAL_SYNCHRONIZED,
+ LITERAL_TRY, LITERAL_WHILE, LOR, LT,
MINUS, MINUS_ASSIGN,
+ MOD, MOD_ASSIGN, NOT_EQUAL, PLUS,
PLUS_ASSIGN, QUESTION,
+ RCURLY, SL, SLIST, SL_ASSIGN, SR,
SR_ASSIGN, STAR, STAR_ASSIGN"/>
+ </module>
+
+ <module name="TabCharacter"/>
+
+ <!-- MODIFIERS -->
+ <module name="ModifierOrder"/>
+
+ <!-- BLOCK CHECKS -->
+ <module name="EmptyBlock">
+ <property name="option" value="text"/>
+ </module>
+
+ <!-- CODING -->
+ <module name="EqualsHashCode"/>
+ <module name="LeftCurly"/>
+ <module name="NeedBraces"/>
+ <module name="RightCurly">
+ <property name="option" value="alone"/>
+ </module>
+ <module name="AvoidNestedBlocks"/>
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+ </module>
+</module>
Added: trunk/lib/emma/echo.emma.xsl
==============================================================================
--- (empty file)
+++ trunk/lib/emma/echo.emma.xsl Mon Oct 6 01:47:16 2008
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="text" indent="yes"/>
+
+<xsl:template match="/">
+ <xmldata>
+ <xsl:apply-templates select="report/data/all/coverage"/>
+ </xmldata>
+</xsl:template>
+
+<xsl:template match="coverage">
+ <xsl:value-of select="@type"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@value"/>
+ <xsl:text> </xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
Added: trunk/lib/findbugs/findbugs.filter.xml
==============================================================================
--- (empty file)
+++ trunk/lib/findbugs/findbugs.filter.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,7 @@
+<!-- Used in findbugs.build.xml to exclude false positives. -->
+<FindBugsFilter>
+ <!-- Match all occurrences of these bugcodes. -->
+ <Match classregex=".*" >
+ <BugCode name="J2EE" />
+ </Match>
+</FindBugsFilter>
Added: trunk/lib/pmd/pmd.rulesets.xml
==============================================================================
--- (empty file)
+++ trunk/lib/pmd/pmd.rulesets.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<ruleset name="ICS 413-613 Rules"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+ <description>
+ Contains PMD rules to be used in ICS 413-613.
+ </description>
+
+ <rule ref="rulesets/basic.xml"/>
+ <rule ref="rulesets/braces.xml"/>
+ <rule ref="rulesets/coupling.xml"/>
+ <rule ref="rulesets/design.xml"/>
+ <rule ref="rulesets/imports.xml"/>
+ <rule ref="rulesets/junit.xml"/>
+ <rule ref="rulesets/strings.xml"/>
+
+</ruleset>
+
Added: trunk/pmd.build.xml
==============================================================================
--- (empty file)
+++ trunk/pmd.build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,52 @@
+<project name="pmd" default="pmd">
+ <description>
+ Runs pmd on system, using rules in: lib/pmd/pmd.rulesets.xml
+ Invocation: ant -f pmd.build.xml
+ </description>
+
+ <property environment="env" />
+ <import file="build.xml" />
+ <property name="pmd.version" value="4.2.3" />
+ <property name="pmd.jar" value="pmd-${pmd.version}.jar" />
+ <property name="pmd.dir" location="${build.dir}/pmd" />
+ <property name="pmd.failonerror" value="false" />
+
+ <target name="pmd"
+ depends="pmd.tool, pmd.report"
+ description="Runs the PMD tool, report" />
+
+ <target name="pmd.tool"
+ description="Runs PMD over the source code to check for
problems.">
+ <!-- Fail this target if PMD is not installed. -->
+ <available file="${env.PMD_HOME}/lib/${pmd.jar}"
property="pmd.available" />
+ <fail unless="pmd.available"
+ message="Error: PMD_HOME not set or ${pmd.jar} not found." />
+ <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
+ <classpath>
+ <fileset dir="${env.PMD_HOME}/lib" includes="*.jar" />
+ </classpath>
+ </taskdef>
+
+ <!-- Run PMD -->
+ <mkdir dir="${pmd.dir}" />
+ <pmd rulesetfiles="${basedir}/lib/pmd/pmd.rulesets.xml"
+ shortFilenames="true"
+ targetjdk="1.5"
+ failuresPropertyName="pmd.failure.count"
+ failonerror="${pmd.failonerror}"
+ failOnRuleViolation="${pmd.failonerror}">
+ <formatter type="xml" toFile="${pmd.dir}/pmd.xml" />
+ <fileset dir="${src.dir}" includes="**/*.java" />
+ </pmd>
+ <echo message="PMD found ${pmd.failure.count} problem(s)." />
+ </target>
+
+ <target name="pmd.report"
+ description="Generates HTML reports on the PMD output.">
+ <xslt in="${pmd.dir}/pmd.xml"
+ style="${env.PMD_HOME}/etc/xslt/pmd-report-per-class.xslt"
+ out="${pmd.dir}/pmd-report-per-class.html" />
+ </target>
+
+</project>
+
Added: trunk/sclc.build.xml
==============================================================================
--- (empty file)
+++ trunk/sclc.build.xml Mon Oct 6 01:47:16 2008
@@ -0,0 +1,27 @@
+<project name="sclc" default="sclc">
+ <description>
+ Runs sclc on system to generate information on size.
+ Invocation: ant -f sclc.build.xml
+ </description>
+
+ <import file="build.xml" />
+ <property name="sclc.dir" location="${build.dir}/sclc" />
+
+ <target name="sclc" depends="sclc.tool" description="Runs SCLC." />
+
+ <target name="sclc.tool"
+ depends="compile, clean"
+ description="Compute size data on the source code using SCLC.">
+ <!-- Check for the SCLC_HOME environment variable, failing the build
if it can't be found. -->
+ <available file="${env.SCLC_HOME}/src/sclc" property="sclc.available"
/>
+ <fail unless="sclc.available"
+ message="Error: SCLC_HOME not set or file 'sclc' not found,
indicating SCLC is not installed." />
+ <mkdir dir="${sclc.dir}" />
+
+ <!-- Run size data using SCLC. Invoke Perl via the exec task to run
SCLC. -->
+ <exec executable="perl" dir="${build.dir}">
+ <arg line="${env.SCLC_HOME}/src/sclc -default_exclude -ignore
-xml_output ${sclc.dir}/size.xml -recurse ${basedir}" />
+ </exec>
+ </target>
+</project>
+