Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<?xml version="1.0" encoding="utf-8"?>
<!--
Rapla builds are based on the ANT-tool from apache.org.
Ant is a build tool written in java that uses a build-file, like this one.
Ant does all the nasty work like compiling,building and testing the different distributions.
For more information visit "http://jakarata.apache.org".
The rapla-source distribution comes with a copy of ANT located in the lib directory:
ant.jar,optional.jar
You will also find junit.jar
junit.jar is a testing-framework for automated testing used for most of our tests
(currently there are'nt many).
Building instructions
(shamelessly taken from the Apache Cocoon-build-file and replaced cocoon with rapla)
=====================
Ok, let's build the baby. 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 generate a file called "rapla.jar" in the "./build" directory.
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.
Building on another directory
=============================
Sometimes you might want to build on an external directory to keep the
distribution clean: no worries, this is just an environment property away.
Suppose you want to use the "../build" directory instead, you simply tipe
[unix] ./build.sh -Dbuild.dir=../build
[win32] .\build.bat -Dbuild.dir=..\build
By using the -Dxxx=yyy argument, you are setting environments in the JVM: Ant
is designed to give higher priority to system environments to allow you to
modify _any_ <property> that you can find in the building instructions below,
so it's just a matter of understanding what property you want to change
and you don't have to touch this file (which you shouldn't need to do).
Build targets
=============
The build system is not only responsible of compiling Rapla 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 rapla maintainers to take care of everything in the Rapla
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 type
[unix] ./build.sh -projecthelp
[win32] .\build.bat -projecthelp
and concentrate on the target descriptions that start with a star '*': these
are the one you should call, the others are internal targets that are called
by the main ones.
Many thanks to Stefano Mazzocchi
-->
<!-- Rapla build-file
Copyright (C) 2001-2002 Christopher Kohlhaas
This programm is free software; you can redistribute it and/or modify
it under the terns of the GNU General Public License as published by the
Free Software Foundation. A copy of the license has been included with
these distribution in the COPYING file, if not go to www.fsf.org .
As a special exception, you are granted the permission to link this
program with every library, of wich license fullfills the Open Source
Definition as published by the Open Source Initiative (OSI).
-->
<project name="Rapla" default="choose-target" basedir=".">
<!-- set global properties for this build -->
<property name="build.compiler.emacs" value="on" />
<property name="build.compiler.warnings" value="true" />
<property name="build.compiler.pedantic" value="true" />
<property name="build.compiler.depend" value="true" />
<property name="build.compiler.fulldepend" value="true" />
<!-- This is for the crlf-fix -->
<patternset id="text-files">
<include name="**.java" />
<include name="**.txt" />
</patternset>
<property name="main.dir" value="${basedir}" />
<target name="properties" if="eclipse.running">
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
</target>
<target name="init" depends="properties">
<!-- Create the time stamp -->
<tstamp />
<tstamp>
<format property="BUILD_TIME" pattern="yyyy-MM-dd HH:mm" locale="en" />
</tstamp>
<property name="doc.properties" value="doc.properties" />
<property name="build.properties" value="build.properties" />
<available file="${main.dir}/${build.properties}" property="build.properties.present" />
<copy todir="${main.dir}">
<fileset dir="${main.dir}">
<include name="build.properties.template" unless="build.properties.present" />
</fileset>
<mapper type="glob" from="*.template" to="*" />
</copy>
<property file="${main.dir}/${build.properties}" />
<property file="${main.dir}/${doc.properties}" />
<!-- All the libraries are used for compilation by default-->
<patternset id="default-compile-libraries">
<include name="client/*.jar" />
<include name="common/*.jar" />
<include name="server/*.jar" />
<include name="*.jar" />
</patternset>
<!-- Information about the compiler -->
<!-- property name="build.compiler" value="javac1.3"/-->
<property name="debug" value="on" />
<property name="optimize" value="off" />
<property name="deprecation" value="on" />
<property name="verbose" value="no" />
<property name="target_vm" value="1.5" />
<property name="packages" value="org.*" />
<!-- The rapla-directories -->
<property name="doc.dir" value="${main.dir}/xdocs" />
<property name="src.dir" value="${main.dir}/src" />
<property name="lib.dir" value="${main.dir}/lib" />
<property name="build.dir" value="${main.dir}/build" />
<property name="dist.dir" value="${main.dir}/dist" />
<property name="temp.dir" value="${main.dir}/temp" />
<property name="testsrc.dir" value="${main.dir}/test-src" />
<property name="generated.dir" value="${main.dir}/generated-src" />
<property name="test.dir" value="${basedir}/test" />
<property name="test-dist-src.dir" value="${test.dir}/rapla-source-test" />
<property name="build.src" value="${build.dir}/src" />
<property name="build.javadocs" value="${build.dir}/javadocs" />
<property name="build.dest" value="${build.dir}/classes" />
<property name="build.test" value="${build.dir}/test/classes" />
<property name="dist-src.dir" value="${dist.dir}/rapla-source-${doc.version}" />
<property name="dist-bin.dir" value="${dist.dir}/rapla-binary-${doc.version}" />
<property name="webapp.dir" value="${build.dir}/webapp" />
<property name="keystore.file" value="${main.dir}/testkeystore" />
<property name="keystore.password" value="secret" />
<property name="main.lib" value="rapla.jar" />
<!-- The class and properties file to start rapla from the command-line.
This poperties are necessary for the start scripts-->
<property name="start.class" value="org.rapla.Main" />
<property name="target" value="dist-bin" />
<available file="${lib.dir}/test-only/hsqldb.jar" property="hsqldb.present" />
<available file="${keystore.file}" property="keystore.present" />
<!-- filters will replace tokens in source files with the values in doc.properties -->
<filterset id="docfilter">
<filter token="doc.name" value="${doc.name}" />
<filter token="doc.date" value="${doc.date}" />
<filter token="doc.version" value="${doc.version}" />
<filter token="doc.buildtime" value="${BUILD_TIME}" />
<filter token="doc.year" value="${doc.year}" />
<filter token="doc.copyright" value="${doc.copyright}" />
<filter token="doc.developer-list-link" value="${doc.developer-list-link}" />
<filter token="doc.developer-list" value="${doc.developer-list}" />
<filter token="doc.homepage" value="${doc.homepage}" />
</filterset>
</target>
<target name="choose-target" depends="init" description="Executes the target specified in build.properties. Default is dist-bin.">
<antcall target="${target}" />
</target>
<!-- =================================================================== -->
<!-- The Targets prepare,compile,compile-resources and build are for -->
<!-- creating the ${main.lib} -->
<!-- =================================================================== -->
<target name="prepare" depends="init">
<mkdir dir="${temp.dir}" />
<mkdir dir="${generated.dir}" />
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dest}" />
<mkdir dir="${build.dest}/META-INF" />
</target>
<target name="compile" depends="prepare">
<!-- Compile the java code from ${src} into ${build.dir} -->
<javac srcdir="${src.dir}" destdir="${build.dest}" debug="${debug}" source="${target_vm}" target="${target_vm}" optimize="${optimize}" deprecation="${deprecation}" verbose="${verbose}">
<classpath>
<fileset dir="${lib.dir}">
<patternset refid="default-compile-libraries" />
</fileset>
</classpath>
</javac>
<!-- The png,license,xsl and rng files must be in the correct classpath -->
<copy todir="${build.dest}">
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
<exclude name="**/*Resources.xml" />
<exclude name="**/package.html" />
</fileset>
</copy>
</target>
<!-- Set a variable if plugin meta is already up-to-date. -->
<target name="pluginmeta-check" depends="prepare">
<condition property="pluginmeta.notrequired">
<and>
<uptodate>
<srcfiles dir="${build.dest}" includes="**/*Plugin.class" />
<mapper type="merge" to="${build.dest}/META-INF/rapla-plugin.list" />
</uptodate>
</and>
</condition>
</target>
<target name="generate-plugin-meta" unless="pluginmeta.notrequired" description="Generate the rapla-plugin.list" depends="pluginmeta-check,compile">
<echo message="generating Plugin Metainfo" />
<mkdir dir="${generated.dir}/META-INF" />
<java classname="org.rapla.framework.ServiceListCreator" failonerror="true" fork="yes">
<arg value="${build.dest}" />
<arg value="${generated.dir}/META-INF/rapla-plugin.list" />
<classpath>
<pathelement path="${build.dest}" />
<fileset dir="${lib.dir}">
<patternset refid="default-compile-libraries" />
</fileset>
</classpath>
</java>
<copy file="${generated.dir}/META-INF/rapla-plugin.list" tofile="${build.dest}/META-INF/rapla-plugin.list" />
</target>
<!-- Set a variable if resources are already up-to-date. -->
<target name="resources-check" depends="init">
<condition property="resources.notrequired">
<and>
<uptodate>
<srcfiles dir="${src.dir}">
<include name="**/*Resources.xml" />
</srcfiles>
<mapper type="glob" from="*Resources.xml" to="${build.dest}/*Resources.class" />
</uptodate>
<uptodate property="test" srcfile="${main.dir}/${doc.properties}" targetfile="${build.dest}/org/rapla/RaplaResources.class" />
</and>
</condition>
</target>
<target name="compile-resources" unless="resources.notrequired" description="Generate and compile the RaplaResources" depends="resources-check,compile">
<echo message="generating Resourcefiles" />
<java classname="org.rapla.components.xmlbundle.impl.TranslationParser" failonerror="true" fork="yes">
<arg value="${src.dir}" />
<arg value="${temp.dir}/unfiltered-resources" />
<classpath>
<pathelement path="${build.dest}" />
<fileset dir="${lib.dir}">
<patternset refid="default-compile-libraries" />
</fileset>
</classpath>
</java>
<uptodate property="resources.rebuild">
<srcfiles dir="${build.dest}" includes="**/*Resources*.class" />
<mapper type="merge" to="{$main.dir}/${doc.properties}" />
</uptodate>
<echo message="Applying filter to ResourceFiles" />
<copy todir="${generated.dir}">
<fileset dir="${temp.dir}/unfiltered-resources">
<include name="**/*.java" />
</fileset>
<filterset refid="docfilter" />
</copy>
<fixcrlf srcdir="${generated.dir}">
<include name="**/*.java" />
</fixcrlf>
<javac srcdir="${generated.dir}" destdir="${build.dest}" source="${target_vm}" target="${target_vm}" verbose="${verbose}">
<include name="**/*.java" />
</javac>
<!-- <delete dir="${temp.dir}/languages" /> -->
</target>
<target name="build" depends="compile,compile-resources,generate-plugin-meta">
<mkdir dir="${build.src}" />
<jar jarfile="${build.dir}/${main.lib}">
<fileset dir="${build.dest}">
<exclude name="org/rapla/bootstrap/*"/>
</fileset>
<manifest>
<attribute name="Created-By" value="${user.name}" />
<!-- TODO replace it with an automated generated jar list -->
<!-- The class-path is helpfull when starting with the java -jar command or double-clicking on the jar.-->
<attribute name="Class-Path" value="picollo.jar avalon-framework-4.2.0.jar .. ../.." />
<attribute name="Main-Class" value="org.rapla.Main" />
<section name="common">
<attribute name="Implementation-Title" value="common" />
<attribute name="Implementation-Version" value="${doc.version} ${TODAY}" />
</section>
</manifest>
</jar>
<jar jarfile="${build.dir}/raplabootstrap.jar">
<fileset dir="${build.dest}">
<include name="org/rapla/bootstrap/*" />
</fileset>
<manifest>
<attribute name="Created-By" value="${user.name}" />
<attribute name="Main-Class" value="org.rapla.bootstrap.RaplaStandaloneLoader" />
<section name="common">
<attribute name="Implementation-Title" value="common" />
<attribute name="Implementation-Version" value="${doc.version} ${TODAY}" />
</section>
</manifest>
</jar>
<patternset id="client-libraries">
<include name="common/**" />
<include name="client/**" />
</patternset>
</target>
<target name="start" depends="compile,compile-resources,generate-plugin-meta,compile-tests" description="Use this during development to quick-launch rapla.">
<copy todir="${temp.dir}/start">
<fileset dir="${main.dir}/webapp">
<include name="rapla.xconf" />
<include name="raplaclient.xlog" />
<include name="*data.xml" />
</fileset>
</copy>
<java classname="${start.class}" failonerror="yes" fork="yes" dir="${main.dir}">
<classpath>
<pathelement path="${build.dest}" />
<pathelement path="${build.test}" />
<fileset dir="${lib.dir}">
<patternset refid="default-compile-libraries" />
</fileset>
</classpath>
<arg value="-c" />
<arg value="${temp.dir}/start/rapla.xconf" />
<arg value="build-script" />
</java>
</target>
<target name="run" depends="dist-bin" description="build and run binary-distribution">
<java classname="${start.class}" fork="yes" dir="${dist-bin.dir}">
<classpath>
<fileset dir="${dist-bin.dir}/webapp/WEB-INF/lib">
</fileset>
</classpath>
<arg value="-c" />
<arg value="webapp/WEB-INF/rapla.xconf" />
</java>
</target>
<!-- =================================================================== -->
<!-- Build the webapps folder -->
<!-- =================================================================== -->
<target name="webapp" depends="build" description="Build the rapla web-application">
<mkdir dir="${webapp.dir}" />
<mkdir dir="${webapp.dir}/WEB-INF" />
<mkdir dir="${webapp.dir}/WEB-INF/lib" />
<mkdir dir="${webapp.dir}/WEB-INF/classes" />
<copy todir="${webapp.dir}">
<fileset dir="${main.dir}/webapp">
<include name="*.*" />
<include name="webclient/**" />
<include name="images/**" />
</fileset>
</copy>
<copy todir="${webapp.dir}/webclient">
<fileset dir="${lib.dir}/common">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}/client">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${webapp.dir}/WEB-INF/lib">
<fileset dir="${lib.dir}">
<include name="${build.dir}/${main.lib}" />
</fileset>
<fileset dir="${lib.dir}/common">
<include name="*.jar" />
</fileset>
<fileset dir="${lib.dir}/server">
<include name="*.jar" />
</fileset>
<fileset dir="${build.dir}">
<include name="${main.lib}" />
</fileset>
</copy>
<copy todir="${webapp.dir}/WEB-INF/">
<fileset dir="${main.dir}/webapp/WEB-INF">
<include name="raplaserver.xlog" />
<include name="raplaserver.xconf" />
<include name="rapla.xconf" />
<include name="raplaclient.xlog" />
<include name="data.xml" />
<include name="simpsons-data.xml" />
<include name="rapla-hsqldb.*" />
<include name="rapla-*.sql" />
<include name="web.xml" />
</fileset>
</copy>
</target>
<target name="sign" if="keystore.present">
<signjar
alias="rapla" keystore="${keystore.file}"
storepass="${keystore.password}"
lazy="true"
>
<path>
<fileset dir="${webapp.dir}/webclient" includes="**/*.jar" />
<fileset dir="${webapp.dir}/WEB-INF/lib" includes="**/*.jar" />
</path>
</signjar>
</target>
<!-- =================================================================== -->
<!-- Create the basic binary distribution that can run Rapla -->
<!-- =================================================================== -->
<target name="dist-bin" depends="webapp,sign" description="Build the binary distribution">
<mkdir dir="${dist-bin.dir}" />
<copy todir="${dist-bin.dir}/webapp">
<fileset dir="${webapp.dir}" />
</copy>
<mkdir dir="${dist-bin.dir}/service" />
<copy todir="${dist-bin.dir}/service">
<fileset dir="${main.dir}/service" >
<include name="**" />
</fileset>
</copy>
<mkdir dir="${dist-bin.dir}/jetty" />
<copy todir="${dist-bin.dir}/jetty/lib">
<fileset dir="${lib.dir}">
<include name="servlet*.jar" />
<include name="jetty*.jar" />
</fileset>
</copy>
<copy todir="${dist-bin.dir}/jetty">
<fileset dir="${main.dir}/jetty" >
<include name="jetty.xml" />
<include name="webdefault.xml" />
</fileset>
</copy>
<copy todir="${dist-bin.dir}">
<fileset dir="${build.dir}">
<include name="raplabootstrap.jar" />
</fileset>
<fileset dir="${main.dir}/templates">
<include name="rapla.exe" />
</fileset>
<fileset dir="${main.dir}">
<include name="README**" />
<include name="INSTALL**" />
<include name="legal/**" />
</fileset>
</copy>
<copy todir="${dist-bin.dir}">
<fileset dir="${main.dir}/templates/scripts">
<include name="raplaserver_*" />
</fileset>
<mapper type="glob" from="raplaserver_*" to="raplaserver.*" />
</copy>
<copy todir="${dist-bin.dir}">
<fileset dir="${main.dir}/templates/scripts">
<include name="raplaclient_*" />
</fileset>
<mapper type="glob" from="raplaclient_*" to="raplaclient.*" />
</copy>
<copy todir="${dist-bin.dir}">
<fileset dir="${main.dir}/templates/scripts">
<include name="rapla_*" />
</fileset>
<mapper type="glob" from="rapla_*" to="rapla.*" />
</copy>
<copy todir="${dist-bin.dir}">
<fileset dir="${main.dir}/templates/scripts">
<include name="raplaimport_*" />
</fileset>
<mapper type="glob" from="raplaimport_*" to="raplaimport.*" />
</copy>
<copy todir="${dist-bin.dir}">
<fileset dir="${main.dir}/templates/scripts">
<include name="raplaexport_*" />
</fileset>
<mapper type="glob" from="raplaexport_*" to="raplaexport.*" />
</copy>
<fixcrlf srcdir="${dist-bin.dir}" eol="crlf">
<include name="*.bat" />
</fixcrlf>
<fixcrlf srcdir="${dist-bin.dir}" eol="lf">
<include name="*.sh" />
</fixcrlf>
<chmod perm="u+x">
<fileset dir="${dist-bin.dir}">
<include name="*.sh" />
<include name="*.bat" />
</fileset>
</chmod>
</target>
<!-- =================================================================== -->
<!-- Create the source distribution -->
<!-- =================================================================== -->
<target name="dist-src" depends="prepare" description="Build the source distribution">
<mkdir dir="${dist-src.dir}" />
<copy todir="${dist-src.dir}/lib">
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="client/**" />
<include name="common/**" />
<include name="server/**" />
</fileset>
</copy>
<mkdir dir="${dist-src.dir}/lib/unused" />
<copy todir="${dist-src.dir}">
<fileset dir="${main.dir}">
<include name="src/**" />
<include name="generated-src/**" />
<include name="test-src/**" />
<include name="templates/**" />
<exclude name="**/*.el" />
<include name="legal/**" />
<include name="README**" />
<include name="INSTALL.txt" />
<include name="doc.properties" />
<include name=".project" />
<include name=".classpath" />
<include name="jetty/**" />
<include name="bin/*" />
<include name="build.xml" />
<include name="build.properties.template" />
<include name="build.sh" />
<include name="build.bat" />
<include name="webapp/**" />
<include name="service/**" />
<include name="webapp/webclient/**" />
<exclude name="webapp/logs/**" />
<exclude name="webapp/WEB-INF/logs/**" />
<exclude name="webapp/WEB-INF/data.xml.bak" />
<exclude name="webapp/webclient/rapla.jar" />
</fileset>
</copy>
<chmod perm="u+x">
<fileset dir="${dist-src.dir}">
<include name="**/*.bat" />
<include name="**/*.sh" />
<include name="bin/ant" />
<include name="bin/antRun" />
</fileset>
</chmod>
</target>
<!-- =================================================================== -->
<!-- Packages the distribution as .zip and tar.gz -->
<!-- =================================================================== -->
<target name="tarball">
<fixcrlf srcdir="${tarball.dir}" eol="lf" eof="remove">
<patternset refid="text-files" />
<exclude name="**/*.bat" />
</fixcrlf>
<tar tarfile="${temp.dir}/tarball.tar">
<tarfileset dir="${tarball.dir}/..">
<!-- This is a workaround until tarfileset supports the prefix-->
<include name="${tarball.name}/**" />
<exclude name="${tarball.name}/**/*.sh" />
<exclude name="${tarball.name}/**/*.bat" />
<exclude name="${tarball.name}/**/ant" />
<exclude name="${tarball.name}/**/antRun" />
</tarfileset>
<tarfileset dir="${tarball.dir}/.." mode="755">
<include name="${tarball.name}/**/*.sh" />
<include name="${tarball.name}/**/*.bat" />
<include name="${tarball.name}/**/ant" />
<include name="${tarball.name}/**/antRun" />
</tarfileset>
</tar>
<gzip zipfile="${dist.dir}/${tarball.name}.tar.gz" src="${temp.dir}/tarball.tar" />
<delete file="${temp.dir}/tarball.tar" />
<fixcrlf srcdir="${tarball.dir}" eol="crlf">
<patternset refid="text-files" />
<exclude name="**/*.sh" />
<exclude name="**/ant" />
<exclude name="**/antRun" />
</fixcrlf>
<zip zipfile="${dist.dir}/${tarball.name}.zip">
<!-- This is a workaround until tarfileset supports the prefix-->
<zipfileset dir="${tarball.dir}" prefix="${tarball.name}" />
</zip>
<fixcrlf srcdir="${tarball.dir}">
<patternset refid="text-files" />
</fixcrlf>
</target>
<target name="tarballs" description="Generate all tarballs for download" depends="init,dist-bin,dist-src">
<antcall target="tarball">
<param name="tarball.name" value="rapla-binary-${doc.version}" />
<param name="tarball.dir" value="${dist-bin.dir}" />
</antcall>
<antcall target="tarball">
<param name="tarball.name" value="rapla-source-${doc.version}" />
<param name="tarball.dir" value="${dist-src.dir}" />
</antcall>
</target>
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadocs" depends="prepare" description="Generate the API documentation">
<!-- Filter-Information for the java-doc generator and the rapla-language-files-->
<delete dir="${build.src}" />
<delete dir="${build.javadocs}" />
<mkdir dir="${build.src}" />
<mkdir dir="${build.javadocs}" />
<copy todir="${build.src}">
<fileset dir="${src.dir}">
<include name="**/*.java" />
<include name="**/package.html" />
<include name="**/overview.html" />
</fileset>
<filterset refid="docfilter" />
</copy>
<copy file="${main.dir}/templates/javadoc.css" tofile="${build.javadocs}/javadoc.css" />
<copy file="${src.dir}/org/rapla/gui/images/tafel.png" tofile="${build.javadocs}/logo.png" />
<javadoc packagenames="${packages}" destdir="${build.javadocs}" author="true" version="true" use="false" noindex="true" windowtitle="${doc.name} API (${doc.version})" bottom="Copyright &#169; ${doc.year} ${doc.copyright}. All Rights Reseserved." stylesheetfile="${build.javadocs}/javadoc.css" overview="${build.src}/org/rapla/overview.html">
<packageset dir="${build.src}" defaultexcludes="yes">
<include name="org/rapla" />
<include name="org/rapla/facade" />
<include name="org/rapla/entities" />
<include name="org/rapla/entities/domain" />
<include name="org/rapla/entities/dynamictype" />
<include name="org/rapla/entities/configuration" />
<include name="org/rapla/framework" />
<include name="org/rapla/examples" />
<include name="org/rapla/components/xmlbundle" />
<include name="org/rapla/components/util" />
<include name="org/rapla/components/util/iterator" />
<include name="org/rapla/components/calendar" />
<include name="org/rapla/components/iolayer" />
<include name="org/rapla/components/layout" />
<include name="org/rapla/components/tablesorter" />
<include name="org/rapla/plugin" />
<include name="org/rapla/plugin/mail" />
<include name="org/rapla/gui" />
<include name="org/rapla/gui/images" />
<include name="org/rapla/gui/toolkit" />
<include name="org/rapla/examples" />
<include name="org/rapla/entities" />
<include name="org/rapla/servletpages" />
<exclude name="**/rpc/**" />
<exclude name="**/internal/**" />
<exclude name="**/impl/**" />
<exclude name="**/print/**" />
</packageset>
<classpath>
<fileset dir="${lib.dir}">
<patternset refid="default-compile-libraries" />
</fileset>
</classpath>
<link href="http://java.sun.com/javase/6/docs/api/" />
<link href="http://excalibur.apache.org/apidocs/" />
</javadoc>
</target>
<!-- =================================================================== -->
<!-- Test -->
<!-- =================================================================== -->
<target name="compile-tests" depends="prepare,compile,compile-resources,generate-plugin-meta">
<mkdir dir="${build.test}" />
<javac srcdir="${testsrc.dir}" destdir="${build.test}" debug="${debug}" source="${target_vm}" target="${target_vm}" optimize="${optimize}" deprecation="${deprecation}">
<classpath>
<fileset dir="${lib.dir}">
<patternset refid="default-compile-libraries" />
</fileset>
<pathelement path="${build.dest}" />
</classpath>
</javac>
</target>
<target name="check-test" unless="test.class">
<echo message="You must specify a test.class. Example: build -Dtest.class=mypackage.MyTest test " />
</target>
<target name="test" if="test.class" description="Run one JUnit-Test" depends="compile-tests,check-test">
<junit printsummary="no" haltonfailure="yes" fork="yes" dir="${main.dir}">
<classpath>
<pathelement path="${build.dest}" />
<pathelement path="${build.test}" />
<fileset dir="${lib.dir}">
<patternset refid="default-compile-libraries" />
<include name="test-only/*" />
</fileset>
</classpath>
<formatter type="plain" usefile="no" />
<test name="${test.class}" />
</junit>
<echo message="Tests complete" />
</target>
<target name="test-all" description="Run all JUnit-Tests" depends="clean-test,compile-tests">
<junit printsummary="no" haltonfailure="yes" fork="yes" dir="${main.dir}">
<classpath>
<pathelement path="${build.dest}" />
<pathelement path="${build.test}" />
<fileset dir="${lib.dir}">
<patternset refid="default-compile-libraries" />
<include name="test-only/*" />
</fileset>
</classpath>
<formatter type="plain" usefile="no" />
<batchtest>
<fileset dir="${build.test}">
<include name="**/*Test.class" />
<exclude name="**/storage/dbsql/**/*.class" unless="hsqldb.present" />
<exclude name="**/*$$*Test.class" />
<exclude name="**/Abstract**.class" />
<exclude name="**/SunBugsTest.class" />
</fileset>
</batchtest>
</junit>
<echo message="Tests complete" />
</target>
<!-- ===================================================================
Tests the build-process of the binary and the source-distribution.
Performs the following steps:
1. clean the test directory
2. build a source-distribution in the test directory
3. start the test (target test-all)
4. build a binary-distribution out of the source-distribution
5. start the binary-distribution and test for exceptions
6. clean the test dir
=================================================================== -->
<target name="test-build" description="Tests the build-process of the binary and the source-distribution" depends="init">
<delete dir="${test.dir}" />
<mkdir dir="${test.dir}" />
<mkdir dir="${test-dist-src.dir}" />
<ant antfile="build.xml" target="dist-src">
<property name="dist-src.dir" value="${test-dist-src.dir}" />
</ant>
<ant antfile="${test-dist-src.dir}/build.xml" target="test-all" dir="${test-dist-src.dir}" inheritAll="false">
<property name="main.dir" value="${test-dist-src.dir}" />
</ant>
<ant antfile="${test-dist-src.dir}/build.xml" target="dist-bin" dir="${test-dist-src.dir}" inheritAll="false" />
<ant antfile="${test-dist-src.dir}/build.xml" target="run" dir="${test-dist-src.dir}" inheritAll="false" />
<!-- frees the space requiered by testing -->
<delete dir="${test.dir}" />
</target>
<!-- =================================================================== -->
<!-- Cleanup -->
<!-- =================================================================== -->
<target name="clean" description="Clean the build directory" depends="init">
<delete dir="${build.dir}" />
<delete dir="${temp.dir}" />
</target>
<target name="clean-dist" description="Clean the dist directory" depends="init">
<delete dir="${dist.dir}" />
</target>
<target name="clean-test" depends="init">
<delete dir="${test.dir}" />
</target>
</project>