poi/build.xml

274 lines
9.1 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="tools/antipede/resources/stylesheets/layout.xsl"?>
<!DOCTYPE project [
<!-- antipede -->
<!ENTITY import-antipede SYSTEM "./tools/antipede/build.xtarget">
]>
<project default="interactive" basedir="." name="project build file">
<description>
* ===================================== *
| Krysalis Centipede Build System |
* ===================================== *
by
Nicola Ken Barozzi (nicolaken@apache.org)
Marc Johnson (mjohnson@apache.org)
started as an extension of the
the Apache Cocoon Build System
(http://xml.apache.org/cocoon/)
by
Stefano Mazzocchi (stefano@apache.org)
Carsten Ziegeler (cziegeler@apache.org)
Installing the build tools
==========================
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.
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/".
To make things easier for you, this distribution contains a precompiled
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
=====================
First, make sure your current working directory is where this very file
is located. Then type
./build.sh (unix)
.\build.bat (win32)
if everything is right and all the required packages are visible, this action
will start the build and prompt you with options.
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
pretty self-explanatory, or run the build with "-projecthelp".
Build Dependencies
==================
Some components are optional and require special jar files to be compiled
and added to the application. Some of these jars are already included
in the distribution while others not.
For each optional package which is not available, a warning can be
printed.
Happy hacking :)
============================================================================
</description>
<!-- =================================================================== -->
<!-- Basic build targets for the project -->
<!-- =================================================================== -->
<!-- ================================== -->
<!-- Interactive -->
<!-- ================================== -->
<target name="interactive" depends="-init"
description="Interactive target">
<splash/>
<antcall target="call-cent">
<param name="cent-name" value="centipede"/>
<param name="cent-target" value="compile"/>
</antcall>
</target>
<!-- ================================== -->
<!-- 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>
<!-- ================================== -->
<!-- Build jars -->
<!-- ================================== -->
<target name="jar" depends="-init"
description="Compile java source code">
<antcall target="call-cent">
<param name="cent-name" value="centipede"/>
<param name="cent-target" value="package"/>
</antcall>
</target>
<!-- ================================== -->
<!-- Build distributions -->
<!-- ================================== -->
<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>
<!-- ================================== -->
<!-- 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>
<antcall target="call-cent">
<param name="cent-name" value="junit"/>
<param name="cent-target" value="report"/>
</antcall>
</target>
<!-- ================================== -->
<!-- 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>
<!-- ================================== -->
<!-- Test the main module stuff -->
<!-- ================================== -->
<target name="test-module"
depends="clean, compile, test, jar, docs"
description="Testing that all major targets work; useful before a commit"/>
<!-- ================================== -->
<!-- Target used by Gump -->
<!-- ================================== -->
<target name="gump"
depends="clean, compile, test, jar, docs, javadocs"
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>
<!-- =================================================================== -->
<!-- Import Ant-Centipede -init targets - sets up basic build stuff -->
<!-- =================================================================== -->
<!--
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;
</project>