2002-02-14 21:11:36 -05:00
|
|
|
<?xml version="1.0"?>
|
2002-04-03 12:06:10 -05:00
|
|
|
<?xml-stylesheet type="text/xsl" href="tools/antipede/resources/stylesheets/layout.xsl"?>
|
2002-02-14 21:11:36 -05:00
|
|
|
<!DOCTYPE project [
|
2002-04-03 12:06:10 -05:00
|
|
|
<!-- antipede -->
|
|
|
|
<!ENTITY import-antipede SYSTEM "./tools/antipede/build.xtarget">
|
2002-04-06 12:36:35 -05:00
|
|
|
|
|
|
|
<!ELEMENT project ANY>
|
|
|
|
<!ATTLIST project default CDATA #REQUIRED
|
|
|
|
basedir CDATA #IMPLIED
|
|
|
|
name CDATA #IMPLIED>
|
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
]>
|
|
|
|
<project default="interactive" basedir="." name="project build file">
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
<description>
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-02-14 21:11:36 -05:00
|
|
|
* ===================================== *
|
|
|
|
| Krysalis Centipede Build System |
|
|
|
|
* ===================================== *
|
2002-01-30 21:22:28 -05:00
|
|
|
by
|
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
Nicola Ken Barozzi (nicolaken@apache.org)
|
|
|
|
Marc Johnson (mjohnson@apache.org)
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
started as an extension of the
|
|
|
|
the Apache Cocoon Build System
|
|
|
|
(http://xml.apache.org/cocoon/)
|
2002-01-30 21:22:28 -05:00
|
|
|
by
|
2002-04-03 12:06:10 -05:00
|
|
|
Stefano Mazzocchi (stefano@apache.org)
|
|
|
|
Carsten Ziegeler (cziegeler@apache.org)
|
2002-02-14 21:11:36 -05:00
|
|
|
|
2002-01-30 21:22:28 -05:00
|
|
|
|
|
|
|
Installing the build tools
|
|
|
|
==========================
|
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
The Krysalis Centipede build system is based on Apache Ant,
|
|
|
|
which is a Java building tool originally developed for the Tomcat
|
|
|
|
project but now used in many other Apache projects and extended
|
|
|
|
by many developers.
|
2002-01-30 21:22:28 -05:00
|
|
|
|
|
|
|
Ant is a little but very handy tool that uses a build file written in XML
|
|
|
|
(this file) as building instructions. For more information refer to
|
|
|
|
"http://jakarta.apache.org/ant/".
|
|
|
|
|
2002-02-14 21:11:36 -05:00
|
|
|
To make things easier for you, this distribution contains a precompiled
|
2002-01-30 21:22:28 -05:00
|
|
|
version of Ant and the build scripts take care of running it.
|
|
|
|
|
|
|
|
The only thing that you have to make sure, is the "JAVA_HOME" environment
|
|
|
|
property should be set to match the JVM you want to use.
|
|
|
|
|
|
|
|
That's all you have to do to be ready to go.
|
|
|
|
|
|
|
|
|
|
|
|
Building instructions
|
|
|
|
=====================
|
|
|
|
|
2002-02-14 21:11:36 -05:00
|
|
|
First, make sure your current working directory is where this very file
|
|
|
|
is located. Then type
|
2002-01-30 21:22:28 -05:00
|
|
|
|
|
|
|
./build.sh (unix)
|
|
|
|
.\build.bat (win32)
|
|
|
|
|
|
|
|
if everything is right and all the required packages are visible, this action
|
2002-02-14 21:11:36 -05:00
|
|
|
will start the build and prompt you with options.
|
2002-01-30 21:22:28 -05:00
|
|
|
Note, that if you do further development, compilation time is reduced since
|
|
|
|
Ant is able of detecting which files have changed and to recompile them at need.
|
|
|
|
|
|
|
|
Also, you'll note that reusing a single JVM instance for each task, increases
|
|
|
|
tremendously the performance of the whole build system, compared to other
|
|
|
|
tools (i.e. make or shell scripts) where a new JVM is started for each task.
|
|
|
|
|
|
|
|
Build targets
|
|
|
|
=============
|
|
|
|
|
|
|
|
The build system is not only responsible of compiling the project into a jar
|
|
|
|
file, but is also responsible for creating the HTML documentation, javadocs,
|
|
|
|
distributions and web site. In fact, the file you have here is _exactly_ what
|
|
|
|
is used by project maintainers to take care of everything in the project,
|
|
|
|
no less and no more.
|
|
|
|
|
|
|
|
To know more about the available targets take a look at this file, which is
|
2002-04-03 12:06:10 -05:00
|
|
|
pretty self-explanatory, or run the build with "-projecthelp".
|
2002-01-30 21:22:28 -05:00
|
|
|
|
|
|
|
Build Dependencies
|
|
|
|
==================
|
|
|
|
Some components are optional and require special jar files to be compiled
|
2002-02-14 21:11:36 -05:00
|
|
|
and added to the application. Some of these jars are already included
|
2002-01-30 21:22:28 -05:00
|
|
|
in the distribution while others not.
|
2002-02-14 21:11:36 -05:00
|
|
|
For each optional package which is not available, a warning can be
|
2002-04-03 12:06:10 -05:00
|
|
|
printed.
|
2002-01-30 21:22:28 -05:00
|
|
|
|
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
Happy hacking :)
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
============================================================================
|
|
|
|
</description>
|
|
|
|
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- Basic build targets for the project -->
|
|
|
|
<!-- =================================================================== -->
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-04 09:43:45 -05:00
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- Interactive build -->
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<target name="interactive" description="Interactive Build" depends="-init">
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message=" ${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor} [${YEAR}] "/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message="Building with ${ant.version}"/>
|
|
|
|
<echo message="using build file ${ant.file}"/>
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message=" These are the most common build targets."/>
|
|
|
|
<echo message=" You can also invoke them directly; see build.xml for more info. "/>
|
|
|
|
<echo message=" Builds will be in /build directory, distributions in /dist."/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message=" compile ---------- compiles the source code "/>
|
|
|
|
<echo message=" docs ------------- generates the html docs"/>
|
|
|
|
<echo message=" cleandocs -------- cleans the build docs directory"/>
|
|
|
|
<echo message=" javadocs --------- generates the API documentation"/>
|
|
|
|
<echo message=" test ------------- performs the jUnit tests"/>
|
|
|
|
<echo message=" clean ------------ cleans the build directory"/>
|
|
|
|
<echo message=" dist ------------- creates src and bin distributions"/>
|
|
|
|
<echo message=" scratchpad ------- build-run scratchpad code"/>
|
|
|
|
<echo message=" contrib ---------- build-run contributed code"/>
|
|
|
|
<echo message=" generate-records - generate excel records"/>
|
|
|
|
<echo message=" generate-types --- generate word types"/>
|
|
|
|
|
|
|
|
<property name="input.selection" value="compile"/>
|
|
|
|
<centipede-user-input name="input.selection">Please select a target </centipede-user-input>
|
|
|
|
|
2002-04-06 12:36:35 -05:00
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="centipede"/>
|
|
|
|
<param name="cent-target" value="splash"/>
|
|
|
|
</antcall>
|
2002-04-04 09:43:45 -05:00
|
|
|
|
|
|
|
<antcall target="${input.selection}"/>
|
|
|
|
|
|
|
|
</target>
|
2002-04-03 12:06:10 -05:00
|
|
|
|
2002-04-06 12:36:35 -05:00
|
|
|
|
|
|
|
|
2002-04-04 09:43:45 -05:00
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- Interactive scratchpad builds -->
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<target name="scratchpad" depends="-init" description="Interactive Scratchpad Build">
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message=" ${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor} SCRATCHPAD "/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message="Building with ${ant.version}"/>
|
|
|
|
<echo message="using build file ${ant.file}"/>
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message=" These are SCRATCHPAD BUILDS. They are not guaranteed to work."/>
|
|
|
|
<echo message=" You have been warned. "/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" "/>
|
|
|
|
|
|
|
|
<property name="input.selection" value=""/>
|
|
|
|
<centipede-user-input name="input.selection">Please select a target </centipede-user-input>
|
|
|
|
|
|
|
|
<ant antfile="${xlayout.source.scratchpad.targets.dir}/${input.selection}/xbuild.xml"/>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<!-- Interactive contrib builds -->
|
|
|
|
<!-- =================================================================== -->
|
|
|
|
<target name="contrib" depends="-init" description="Interactive Contributors' Build">
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message=" ${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor} CONTRIB"/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message="Building with ${ant.version}"/>
|
|
|
|
<echo message="using build file ${ant.file}"/>
|
|
|
|
<echo message="--------------------------------------------------------------"/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message=" These are CONTRIB BUILDS. They are not guaranteed to work."/>
|
|
|
|
<echo message=" You have been warned. "/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<echo message=" poibrowser - POIBrowser 0.10 GUI POI Viewer"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" -"/>
|
|
|
|
<echo message=" "/>
|
|
|
|
<property name="input.selection" value="poibrowser"/>
|
|
|
|
<centipede-user-input name="input.selection">Please select a target </centipede-user-input>
|
|
|
|
|
|
|
|
<ant antfile="${xlayout.source.contributions.targets.dir}/${input.selection}/xbuild.xml"/>
|
|
|
|
|
|
|
|
</target>
|
2002-04-03 12:06:10 -05:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Compile -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="compile" depends="-init"
|
|
|
|
description="Compile java source code">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="centipede"/>
|
|
|
|
<param name="cent-target" value="compile"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-06 12:36:35 -05:00
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Run build gui -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="gui" depends="-init"
|
|
|
|
description="Run build gui">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="antidote"/>
|
|
|
|
<param name="cent-target" value="run"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Build jars -->
|
|
|
|
<!-- ================================== -->
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
<target name="jar" depends="-init"
|
|
|
|
description="Compile java source code">
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="centipede"/>
|
|
|
|
<param name="cent-target" value="package"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Build distributions -->
|
|
|
|
<!-- ================================== -->
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
<target name="dist" depends="-init"
|
|
|
|
description="Compile java source code">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="centipede"/>
|
|
|
|
<param name="cent-target" value="dist"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
2002-01-30 21:22:28 -05:00
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Clean build dir -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="clean" depends="-init"
|
|
|
|
description="Compile java source code">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="centipede"/>
|
|
|
|
<param name="cent-target" value="clean"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Run Junit tests -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="test" depends="-init"
|
|
|
|
description="Compile java source code">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="junit"/>
|
|
|
|
<param name="cent-target" value="test"/>
|
|
|
|
</antcall>
|
2002-02-14 21:11:36 -05:00
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="junit"/>
|
|
|
|
<param name="cent-target" value="report"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
2002-04-06 04:35:38 -05:00
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Generate project metrics -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="metrics" depends="-init"
|
|
|
|
description="Generate project metrics">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="jdepend"/>
|
|
|
|
<param name="cent-target" value="jdepend-html"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Generates the documentation -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="docs" depends="-init"
|
|
|
|
description="Compile java source code">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="forrest"/>
|
|
|
|
<param name="cent-target" value="docs"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Generates the javadocs -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="javadocs" depends="-init"
|
|
|
|
description="Compile java source code">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="centipede"/>
|
|
|
|
<param name="cent-target" value="javadocs"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2002-04-06 04:35:38 -05:00
|
|
|
<!-- ================================== -->
|
2002-04-06 12:36:35 -05:00
|
|
|
<!-- Generate UML -WIP- -->
|
2002-04-06 04:35:38 -05:00
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="uml" depends="-init"
|
|
|
|
description="generate-uml">
|
|
|
|
|
2002-04-06 12:36:35 -05:00
|
|
|
<javadoc packagenames="${xgump.module.project.package}.*"
|
2002-04-06 04:35:38 -05:00
|
|
|
sourcepath="${xlayout.build.java.dir}"
|
|
|
|
destdir="${xlayout.build.documentation.javadocs.dir}"
|
2002-04-06 12:36:35 -05:00
|
|
|
failonerror="true">
|
2002-04-06 04:35:38 -05:00
|
|
|
|
|
|
|
<classpath>
|
|
|
|
<path>
|
|
|
|
<fileset dir="${xlayout.library.dir}" casesensitive="yes">
|
|
|
|
<patternset>
|
|
|
|
<include name="*/*.jar"/>
|
|
|
|
<include name="*/*.zip"/>
|
|
|
|
</patternset>
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
</classpath>
|
2002-04-06 12:36:35 -05:00
|
|
|
|
2002-04-06 04:35:38 -05:00
|
|
|
<doclet name="JP.co.esm.caddies.doclets.UMLDoclet"
|
|
|
|
path="./tools/antipede/lib/UMLDoclet.jar">
|
|
|
|
<param name="-d" value="docs/metrics"/>
|
|
|
|
</doclet>
|
|
|
|
|
|
|
|
</javadoc>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2002-04-04 09:43:45 -05:00
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Generate records -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="generate-records" depends="-init"
|
|
|
|
description="generate-records">
|
|
|
|
|
|
|
|
<ant antfile="${xlayout.source.targets.dir}/record-generation/xbuild.xml"
|
|
|
|
target="generate-records"/>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Generate types -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="generate-types" depends="-init"
|
|
|
|
description="generate-types">
|
|
|
|
|
|
|
|
<ant antfile="${xlayout.source.targets.dir}/record-generation/xbuild.xml"
|
|
|
|
target="generate-types"/>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2002-04-03 12:06:10 -05:00
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Test the main module stuff -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
2002-04-04 09:43:45 -05:00
|
|
|
<target name="testmodule"
|
2002-04-06 04:35:38 -05:00
|
|
|
depends="clean, compile, test, jar, docs"
|
2002-04-03 12:06:10 -05:00
|
|
|
description="Testing that all major targets work; useful before a commit"/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Target used by Gump -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="gump"
|
2002-04-06 04:35:38 -05:00
|
|
|
depends="clean, compile, test, jar, docs, javadocs, metrics"
|
2002-04-03 12:06:10 -05:00
|
|
|
description="Target used by Gump"/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Generate all -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="all"
|
|
|
|
depends="gump"
|
|
|
|
description="Generate all"/>
|
|
|
|
|
|
|
|
<!-- ================================== -->
|
|
|
|
<!-- Create a cent.jar package -->
|
|
|
|
<!-- using an already deployed cent -->
|
|
|
|
<!-- ================================== -->
|
|
|
|
|
|
|
|
<target name="jar-cent" depends="-init"
|
|
|
|
description="Compile java source code">
|
|
|
|
|
|
|
|
<antcall target="call-cent">
|
|
|
|
<param name="cent-name" value="centipede"/>
|
|
|
|
<param name="cent-target" value="jar-cent"/>
|
|
|
|
</antcall>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2002-01-30 21:22:28 -05:00
|
|
|
<!-- =================================================================== -->
|
2002-04-03 12:06:10 -05:00
|
|
|
<!-- Import Ant-Centipede -init targets - sets up basic build stuff -->
|
2002-01-30 21:22:28 -05:00
|
|
|
<!-- =================================================================== -->
|
2002-04-03 12:06:10 -05:00
|
|
|
<!--
|
|
|
|
This is the target that initializes tasks and properties used
|
|
|
|
commonly in every other target.
|
|
|
|
|
|
|
|
Remember to add depends="-init" to every target, so that this
|
|
|
|
target is called before any other.
|
|
|
|
|
|
|
|
This target is internal; to make it unusable from the commandline,
|
|
|
|
its name starts with a hyphen. To make it invisible when
|
|
|
|
using -projecthelp, it lacks a description.
|
|
|
|
-->
|
|
|
|
|
|
|
|
&import-antipede;
|
|
|
|
|
2002-01-30 21:22:28 -05:00
|
|
|
</project>
|