jmeter/build.xml

682 lines
29 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
<project name="JMeter" default="all" basedir=".">
<description>
To build JMeter from source and install:
ant [all]
To rebuild and install:
ant install
To update documentation (requires Anakia to be present)
ant docs-site
ant docs-printable
To build API documentation (Javadoc)
ant docs-api
To build all the docs
ant docs-all
To create tar and tgz of the web-site documentation
ant pack-site
To package up the existing build files for distribution
ant pack-dist [-Dversion =vvvv]
For more info:
ant -projecthelp
To diagnose usage of deprecated APIs:
ant -Ddeprecation=on clean compile
Version: $Revision$ Last Updated: $Date$
</description>
<!-- Renamed targets -->
<target name="all-docs">
<echo message="Target has been renamed to docs-all"/>
<antcall target="docs-all"/>
</target>
<target name="api-docs">
<echo message="Target has been renamed to docs-api"/>
<antcall target="docs-api"/>
</target>
<target name="printable-docs">
<echo message="Target has been renamed to docs-printable"/>
<antcall target="docs-printable"/>
</target>
<target name="docs">
<echo message="Target has been renamed to docs-site"/>
<antcall target="docs-site"/>
</target>
<target name="src-dist">
<echo message="Target has been renamed to dist-src"/>
<antcall target="dist-src"/>
</target>
<!-- Where the Sources live -->
<property name="src.dir" value="src"/>
<property name="src.core" value="src/core"/>
<property name="src.http" value="src/protocol/http"/>
<property name="src.ftp" value="src/protocol/ftp"/>
<property name="src.jdbc" value="src/protocol/jdbc"/>
<property name="src.java" value="src/protocol/java"/>
<property name="src.components" value="src/components"/>
<property name="src.functions" value="src/functions"/>
<property name="src.jorphan" value="src/jorphan"/>
<property name="src.ldap" value="src/protocol/ldap"/>
<property name="src.htmlparser" value="src/htmlparser"/>
<!-- Where the documentation sources live -->
<property name="src.docs" value="xdocs"/>
<property name="src.images" value="xdocs/images"/>
<property name="src.demos" value="xdocs/demos"/>
<!-- Javadoc sources -->
<path id="srcpaths">
<pathelement location="${src.core}"/>
<pathelement location="${src.components}"/>
<pathelement location="${src.functions}"/>
<pathelement location="${src.http}"/>
<pathelement location="${src.ftp}"/>
<pathelement location="${src.jdbc}"/>
<pathelement location="${src.java}"/>
<pathelement location="${src.jorphan}"/>
<pathelement location="${src.ldap}"/>
<pathelement location="${src.htmlparser}"/>
</path>
<!-- Temporary build directories: where the .class live -->
<property name="build.dir" value="build"/>
<property name="build.core" value="build/core"/>
<property name="build.http" value="build/protocol/http"/>
<property name="build.ftp" value="build/protocol/ftp"/>
<property name="build.jdbc" value="build/protocol/jdbc"/>
<property name="build.java" value="build/protocol/java"/>
<property name="build.components" value="build/components"/>
<property name="build.functions" value="build/functions"/>
<property name="build.jorphan" value="build/jorphan"/>
<property name="build.ldap" location="build/protocol/ldap"/>
<property name="build.htmlparser" location="build/htmlparser"/>
<!-- Path prefix to allow Anakia to find stylesheets if running under Eclipse -->
<!--
Anakia looks for stylesheets relative to the java launch directory.
Use the External Tools properties page to define the variable
as the relative path to the directory where this build file is found.
-->
<property name="eclipse.anakia" value="."/>
<!-- Where the build result .jars will be placed -->
<property name="dest.jar" value="lib/ext"/>
<property name="dest.jar.jorphan" value="lib"/>
<property name="dest.jar.jmeter" value="bin"/>
<!-- Where the API documentation lives -->
<property name="dest.docs.api" value="docs/api"/>
<!-- Where the doc results live -->
<property name="dest.docs" value="docs"/>
<property name="dest.printable_docs" value="printable_docs"/>
<!-- Directory where these 3rd party libraries will live -->
<!-- probably has to be the same as dest.jar.jorphan -->
<property name="lib.dir" value="lib"/>
<!-- Other stuff -->
<property name="extras.dir" value="extras"/>
<!-- Where the distribution packages will be created -->
<property name="dist.dir" value="dist"/>
<!-- Where the web-site packages will be created -->
<property name="site.dir" value="site"/>
<!-- Compilation parameters -->
<property name="optimize" value="on"/>
<property name="deprecation" value="off"/>
<property name="target.java.version" value="1.2"/>
<property name="encoding" value="UTF-8"/>
<!-- 3rd party libraries to be included in the binary distribution -->
<property name="avalon-excalibur.jar" value="${lib.dir}/avalon-excalibur-4.1.jar"/>
<property name="avalon-framework.jar" value="${lib.dir}/avalon-framework-4.1.4.jar"/>
<property name="jakarta-oro.jar" value="${lib.dir}/jakarta-oro-2.0.7.jar"/>
<property name="commons-collections.jar" value="${lib.dir}/commons-collections.jar"/>
<property name="junit.jar" value="${lib.dir}/junit.jar"/>
<property name="logkit.jar" value="${lib.dir}/logkit-1.2.jar"/>
<property name="xalan.jar" value="${lib.dir}/xalan.jar"/>
<property name="xerces.jar" value="${lib.dir}/xercesImpl.jar"/>
<property name="xml-apis.jar" value="${lib.dir}/xml-apis.jar"/>
<property name="jdom.jar" value="${lib.dir}/jdom-b8.jar"/>
<property name="js.jar" value="${lib.dir}/js.jar"/>
<property name="soap.jar" value="${lib.dir}/soap.jar"/>
<property name="tidy.jar" value="${lib.dir}/Tidy.jar"/>
<patternset id="external.jars">
<include name="${avalon-excalibur.jar}"/>
<include name="${avalon-framework.jar}"/>
<include name="${jakarta-oro.jar}"/>
<include name="${junit.jar}"/>
<include name="${logkit.jar}"/>
<include name="${xalan.jar}"/>
<include name="${xerces.jar}"/>
<include name="${xml-apis.jar}"/>
<include name="${js.jar}"/>
<include name="${soap.jar}"/>
<include name="${tidy.jar}"/>
<include name="${commons-collections.jar}"/>
<include name="${lib.dir}/*.html"/>
<include name="${jdom.jar}"/>
</patternset>
<!-- Build classpath -->
<path id="classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<!-- Anakia classpath -->
<!--
N.B. On some OSes - e.g. VMS - multiple "." are converted to other characters
So replace the version part with "*" to match any version.
-->
<path id="anakia.classpath">
<fileset dir="${lib.dir}" includes="velocity*.jar"/>
<fileset dir="${lib.dir}" includes="jdom-*.jar"/>
<fileset dir="${lib.dir}" includes="commons-collections*.jar"/>
<fileset dir="${lib.dir}" includes="logkit-*.jar"/>
</path>
<target name="init-version">
<tstamp/>
<!-- JMeter version -->
<property name="version" value="1.9.${DSTAMP}"/>
</target>
<target name="init" depends="check-libs,report-missing-libs,init-version"/>
<!-- JMeter Javadoc version (own variable is used so can be overriden independently) -->
<property name="docversion" value="${version}"/>
<target name="init-docs" depends="check-anakia,report-anakia-missing"/>
<!--
- Check for optional libraries.
-->
<target name="check-libs" description="Check availability of optional libraries." unless="assuming.libs.present">
<available classname="com.sun.net.ssl.internal.ssl.Provider" property="jsse.present">
<classpath refid="classpath"/>
</available>
<condition property="javamail.complete">
<and>
<available classname="javax.mail.Transport" classpathref="classpath"/>
<available classname="javax.activation.DataHandler" classpathref="classpath"/>
</and>
</condition>
<available classname="iaik.protocol.https.Handler" property="isasilk.present">
<classpath refid="classpath"/>
</available>
<available classname="bsh.Interpreter" property="beanshell.present">
<classpath refid="classpath"/>
</available>
<available classname="org.apache.bsf.BSFManager" property="bsf.present">
<classpath refid="classpath"/>
</available>
</target>
<!--
- Messages for missing libraries
-->
<target name="ssl-message" depends="check-libs" unless="jsse.present">
<echo message="Classes for SSL not found in classpath"/>
</target>
<target name="iaik-message" depends="check-libs" unless="isasilk.present">
<echo message="Classes for IAIK iSaSiLk not found in classpath"/>
</target>
<target name="mail-message" depends="check-libs" unless="javamail.complete">
<echo message="Classes for Mail support not found in classpath"/>
</target>
<target name="beanshell-message" depends="check-libs" unless="beanshell.present">
<echo message="Classes for BeanShell support not found in classpath"/>
</target>
<target name="bsf-message" depends="check-libs" unless="bsf.present">
<echo message="Classes for BSF support not found in classpath"/>
</target>
<target name="report-missing-libs"
depends="ssl-message,iaik-message,mail-message,beanshell-message,bsf-message"
/>
<!--
- Check for anakia task
-->
<target name="check-anakia">
<available classpathref="anakia.classpath" classname="org.apache.velocity.anakia.AnakiaTask" property="AnakiaTask.present"/>
</target>
<target name="report-anakia-missing" depends="check-anakia" unless="AnakiaTask.present">
<echo>
AnakiaTask is not present, documentation will not be generated.
</echo>
</target>
<target name="compile-core" depends="compile-jorphan,update-version" description="Compile JMeter core classes.">
<mkdir dir="${build.core}"/>
<javac srcdir="${src.core}" destdir="${build.core}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<exclude name="org/apache/jmeter/util/JsseSSLManager.java" unless="jsse.present"/>
<exclude name="org/apache/jmeter/util/keystore/PKCS12KeyStore.java" unless="isasilk.present"/>
<exclude name="org/apache/jmeter/util/keystore/DefaultKeyStore.java" unless="jsse.present"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
</classpath>
</javac>
</target>
<target name="update-version" unless="version.noupdate">
<echo>Updating version string</echo>
<replaceregexp file="${src.core}/org/apache/jmeter/util/JMeterVersion.java"
match="VERSION = &quot;.*?&quot;"
replace="VERSION = &quot;${version}&quot;"/>
</target>
<target name="compile-components" depends="compile-jorphan,compile-core" description="Compile generic (protocol-independent) components.">
<mkdir dir="${build.components}"/>
<javac srcdir="${src.components}" destdir="${build.components}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<exclude name="org/apache/jmeter/visualizers/MailerVisualizer.java" unless="javamail.complete"/>
<exclude name="org/apache/jmeter/reporters/MailerModel.java" unless="javamail.complete"/>
<exclude name="org/apache/jmeter/reporters/MailerResultCollector.java" unless="javamail.complete"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
</classpath>
</javac>
</target>
<target name="compile-functions" depends="compile-jorphan,compile-core" description="Compile functions.">
<mkdir dir="${build.functions}"/>
<javac srcdir="${src.functions}" destdir="${build.functions}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
</classpath>
</javac>
</target>
<target name="compile-http" depends="compile-jorphan,compile-core" description="Compile components specific to HTTP sampling.">
<mkdir dir="${build.http}"/>
<javac srcdir="${src.http}" destdir="${build.http}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<exclude name="org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java" unless="javamail.complete"/>
<exclude name="org/apache/jmeter/protocol/http/control/gui/WebServiceSamplerGui.java" unless="javamail.complete"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
</classpath>
</javac>
</target>
<target name="compile-ftp" depends="compile-jorphan,compile-core" description="Compile components specific to FTP sampling.">
<mkdir dir="${build.ftp}"/>
<javac srcdir="${src.ftp}" destdir="${build.ftp}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
</classpath>
</javac>
</target>
<target name="compile-jdbc" depends="compile-jorphan,compile-core" description="Compile components specific to JDBC sampling.">
<mkdir dir="${build.jdbc}"/>
<javac srcdir="${src.jdbc}" destdir="${build.jdbc}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
</classpath>
</javac>
</target>
<target name="compile-ldap" depends="compile-jorphan,compile-core"
description="Compile components specific to LDAP sampling.">
<mkdir dir="${build.ldap}"/>
<javac srcdir="${src.ldap}" destdir="${build.ldap}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
</classpath>
</javac>
</target>
<target name="compile-java" depends="compile-jorphan,compile-core" description="Compile components specific to Java sampling.">
<mkdir dir="${build.java}"/>
<javac srcdir="${src.java}" destdir="${build.java}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<exclude name="org/apache/jmeter/protocol/java/**/BeanShell*.java" unless="beanshell.present"/>
<exclude name="org/apache/jmeter/protocol/java/**/BSF*.java" unless="bsf.present"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
</classpath>
</javac>
</target>
<target name="compile-protocols" depends="compile-http,compile-ftp,compile-jdbc,compile-java,compile-ldap" description="Compile all protocol-specific components."/>
<target name="compile-jorphan" depends="init" description="Compile JOrphan utility classes.">
<mkdir dir="${build.jorphan}"/>
<javac srcdir="${src.jorphan}" destdir="${build.jorphan}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<classpath>
<path refid="classpath"/>
</classpath>
</javac>
</target>
<target name="compile-rmi" depends="compile-jorphan,compile-core" description="Compile RMI stubs and skeletons.">
<rmic base="${build.core}" classname="org.apache.jmeter.engine.RemoteJMeterEngineImpl">
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement path="${build.core}"/>
</classpath>
</rmic>
<rmic base="${build.core}" classname="org.apache.jmeter.samplers.RemoteSampleListenerImpl">
<classpath>
<path refid="classpath"/>
<pathelement path="${build.core}"/>
</classpath>
</rmic>
</target>
<target name="compile-htmlparser" depends="" description="Compile htmlparser.">
<mkdir dir="${build.htmlparser}"/>
<javac srcdir="${src.htmlparser}" destdir="${build.htmlparser}" optimize="${optimize}" debug="on" target="${target.java.version}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<classpath>
<path refid="classpath"/>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
</classpath>
</javac>
</target>
<target name="compile" depends="compile-core,compile-components,compile-functions,compile-protocols,compile-rmi,compile-htmlparser" description="Compile everything."/>
<target name="package" depends="compile">
<mkdir dir="${dest.jar}"/>
<jar jarfile="${dest.jar}/ApacheJMeter_core.jar" excludes="**/NewDriver*" manifest="${src.core}/MANIFEST">
<fileset dir="${build.core}"/>
<fileset dir="${src.core}" includes="org/apache/jmeter/images/"/>
<fileset dir="${src.core}" includes="org/apache/jmeter/resources/">
<exclude name="*eucJP*"/>
</fileset>
<fileset dir="${src.core}" includes="org/apache/jmeter/help.txt"/>
</jar>
<jar jarfile="${dest.jar.jmeter}/ApacheJMeter.jar" includes="**/NewDriver*" manifest="${src.core}/MANIFEST" basedir="${build.core}"/>
<!-- perhaps ought to include a basic jmeter.properties file in one of the jars,
given that JMeterUtils looks for it if it cannot find the external one
- otherwise, change utils to ignore it -->
<jar jarfile="${dest.jar}/ApacheJMeter_components.jar" basedir="${build.components}"/>
<jar jarfile="${dest.jar}/ApacheJMeter_functions.jar" basedir="${build.functions}"/>
<jar jarfile="${dest.jar}/ApacheJMeter_http.jar" basedir="${build.http}"/>
<jar jarfile="${dest.jar}/ApacheJMeter_ftp.jar" basedir="${build.ftp}"/>
<jar jarfile="${dest.jar}/ApacheJMeter_jdbc.jar" basedir="${build.jdbc}"/>
<jar jarfile="${dest.jar}/ApacheJMeter_java.jar" basedir="${build.java}"/>
<jar jarfile="${dest.jar}/ApacheJMeter_ldap.jar" basedir="${build.ldap}"/>
<jar jarfile="${dest.jar.jorphan}/htmlparser.jar" basedir="${build.htmlparser}"/>
<jar jarfile="${dest.jar.jorphan}/jorphan.jar" basedir="${build.jorphan}"/>
</target>
<target name="install" depends="package" description="Install JMeter. (Compiles code and creates jars)">
<fixcrlf srcdir="." eol="lf" includes="**/jmeter,**/jmeter-server"/>
</target>
<target name="all" depends="clean,install"
description="Default: build from source and install. Does not create docs."
/>
<!--
N.B. This target is used by the "dist" target, which is set up as the Gump target.
Any libraries in this list need also to be set up in the Gump file:
projects/jakarta-jmeter.xml
-->
<target name="assume-libs-present">
<property name="assuming.libs.present" value="true"/>
<property name="jsse.present" value="assume"/>
<property name="javamail.complete" value="assume"/>
<property name="beanshell.present" value="assume"/>
</target>
<!-- list of files needed for a binary distribution -->
<patternset id="dist.binaries">
<include name="${dest.jar.jmeter}/ApacheJMeter.jar"/>
<include name="${dest.jar.jmeter}/jmeter*"/>
<include name="${dest.jar.jmeter}/upgrade.properties"/>
<include name="${dest.jar.jmeter}/users.*"/>
<include name="${dest.jar}/"/>
<include name="${dest.printable_docs}/**"/>
<include name="${extras.dir}/**"/>
<include name="${lib.dir}/jorphan.jar"/>
<include name="README"/>
<include name="LICENSE"/>
</patternset>
<!--
List of Unix executable files in the binary distribution
These need special handling to create the correct file mode
-->
<property name="dist.executables" value="${dest.jar.jmeter}/jmeter ${dest.jar.jmeter}/jmeter-server"/>
<patternset id="dist.sources">
<include name="${src.dir}/**"/>
<include name="${src.docs}/**"/>
<include name="build.*"/>
<include name="lcp.bat"/>
<include name="LICENSE"/>
<include name="README"/>
<include name="${dest.jar.jmeter}/jmeter*.bat"/>
<include name="${dest.jar.jmeter}/jmeter.properties"/>
<include name="${dest.jar.jmeter}/log4j.conf"/>
<include name="eclipse.classpath*"/>
</patternset>
<!-- N.B. this target is the one currently used by Gump -->
<target name="dist" depends="assume-libs-present,clean,install,docs-all,test" description="Rebuild all and create the distribution packages.">
<property name="dist.name" value="jakarta-jmeter-${version}"/>
<antcall target="_pack-binaries"/>
<antcall target="_pack-libraries"/>
<antcall target="_pack-javadoc"/>
<antcall target="_pack-source"/>
</target>
<target name="dist-src" depends="init-version" description="Create the source distribution packages.">
<property name="dist.name" value="jakarta-jmeter-${version}"/>
<antcall target="_pack-source"/>
</target>
<target name="pack-dist" depends="init-version" description="Create the distribution packages with no rebuild.">
<property name="dist.name" value="jakarta-jmeter-${version}"/>
<antcall target="_pack-binaries"/>
<antcall target="_pack-libraries"/>
<antcall target="_pack-javadoc"/>
<antcall target="_pack-source"/>
</target>
<target name="_pack-binaries">
<property name="pack.name" value="${dist.name}_bin"/>
<mkdir dir="${dist.dir}"/>
<tar destfile="${dist.dir}/${pack.name}.tar" longfile="gnu">
<tarfileset dir="." prefix="${dist.name}" excludes="${dist.executables}" defaultexcludes="yes">
<patternset refid="dist.binaries"/>
</tarfileset>
<tarfileset mode="755" includes="${dist.executables}" dir="." prefix="${dist.name}" defaultexcludes="yes"/>
</tar>
<gzip zipfile="${dist.dir}/${pack.name}.tgz" src="${dist.dir}/${pack.name}.tar" />
<zip zipfile="${dist.dir}/${pack.name}.zip">
<zipfileset dir="." prefix="${dist.name}" defaultexcludes="yes">
<patternset refid="dist.binaries"/>
</zipfileset>
</zip>
</target>
<target name="_pack-libraries">
<property name="pack.name" value="${dist.name}_lib"/>
<mkdir dir="${dist.dir}"/>
<tar destfile="${dist.dir}/${pack.name}.tar" longfile="gnu">
<tarfileset dir="." prefix="${dist.name}" defaultexcludes="yes">
<patternset refid="external.jars"/>
</tarfileset>
</tar>
<gzip zipfile="${dist.dir}/${pack.name}.tgz" src="${dist.dir}/${pack.name}.tar" />
<zip zipfile="${dist.dir}/${pack.name}.zip">
<zipfileset dir="." prefix="${dist.name}" defaultexcludes="yes">
<patternset refid="external.jars"/>
</zipfileset>
</zip>
</target>
<target name="_pack-javadoc">
<property name="pack.name" value="${dist.name}_api"/>
<tar destfile="${dist.dir}/${pack.name}.tar" longfile="gnu">
<tarfileset includes="${dest.docs.api}/" dir="." prefix="${dist.name}" defaultexcludes="yes"/>
</tar>
<gzip zipfile="${dist.dir}/${pack.name}.tgz" src="${dist.dir}/${pack.name}.tar" />
<zip zipfile="${dist.dir}/${pack.name}.zip">
<zipfileset includes="${dest.docs.api}/" dir="." prefix="${dist.name}" defaultexcludes="yes"/>
</zip>
</target>
<target name="_pack-source">
<property name="pack.name" value="${dist.name}_src"/>
<mkdir dir="${dist.dir}"/>
<tar destfile="${dist.dir}/${pack.name}.tar" longfile="gnu">
<tarfileset dir="." prefix="${dist.name}" excludes="${dist.executables}" defaultexcludes="yes">
<patternset refid="dist.sources"/>
</tarfileset>
<tarfileset mode="755" includes="${dist.executables}" dir="." prefix="${dist.name}" defaultexcludes="yes"/>
</tar>
<gzip zipfile="${dist.dir}/${pack.name}.tgz" src="${dist.dir}/${pack.name}.tar" />
<zip zipfile="${dist.dir}/${pack.name}.zip">
<zipfileset dir="." prefix="${dist.name}" defaultexcludes="yes">
<patternset refid="dist.sources"/>
</zipfileset>
</zip>
</target>
<!-- When creating the tars for the web-site, no version prefix directory is added -->
<target name="pack-site" depends="init-version" description="Create tarballs for the web-site from existing docs.">
<property name="dist.name" value="jakarta-jmeter-${version}"/>
<antcall target="_pack_site_api"/>
<antcall target="_pack_site_doc"/>
</target>
<target name="_pack_site_doc">
<property name="pack.name" value="${dist.name}_doc"/>
<mkdir dir="${site.dir}"/>
<tar destfile="${site.dir}/${pack.name}.tar" longfile="gnu">
<tarfileset dir="${dest.docs}" includes="**" excludes="api/**" prefix="" defaultexcludes="yes"/>
</tar>
<gzip zipfile="${site.dir}/${pack.name}.tgz" src="${site.dir}/${pack.name}.tar" />
<!-- no point in creating Zip version as well -->
</target>
<target name="_pack_site_api">
<property name="pack.name" value="${dist.name}_api"/>
<mkdir dir="${site.dir}"/>
<tar destfile="${site.dir}/${pack.name}.tar" longfile="gnu">
<tarfileset dir="${dest.docs.api}" includes="**" prefix="api" defaultexcludes="yes"/>
</tar>
<gzip zipfile="${site.dir}/${pack.name}.tgz" src="${site.dir}/${pack.name}.tar" />
<!-- no point in creating Zip version as well -->
</target>
<target name="clean" description="Clean up to force a build from source.">
<delete file="${dest.jar.jmeter}/ApacheJMeter.jar"/>
<delete quiet="true" file="${dest.jar.jorphan}/jorphan.jar"/>
<delete quiet="true">
<fileset dir="${dest.jar}" excludes=".cvsignore"/>
</delete>
<delete dir="${build.dir}"/>
<delete dir="${dest.docs.api}"/>
<delete quiet="true">
<fileset dir="${dest.docs}" excludes=".cvsignore"/>
</delete>
<delete dir="${dest.printable_docs}"/>
<delete dir="${dist.dir}"/>
<delete dir="${site.dir}"/>
</target>
<target name="docs-api" description="Generate the API documentation.">
<mkdir dir="${dest.docs.api}"/>
<javadoc sourcepathref="srcpaths"
additionalparam="-breakiterator"
destdir="${dest.docs.api}"
Protected="yes" author="yes" version="yes"
doctitle="Apache JMeter API Specification"
windowtitle="Apache JMeter API Specification"
header="&lt;b&gt;Apache JMeter&lt;/b&gt;&lt;br&gt;&lt;font size='-1'&gt;${docversion}&lt;/font&gt;" bottom="Copyright &#xA9; 1998-2003 Apache Software Foundation. All Rights Reserved."
packagenames="org.apache.jmeter.*">
<classpath refid="classpath"/>
<link href="http://java.sun.com/products/jdk/1.3/docs/api/"/>
</javadoc>
</target>
<target name="docs-site" depends="init-docs" if="AnakiaTask.present" description="Generate browsable HTML documentation in web-site format.">
<taskdef name="anakia" classpathref="anakia.classpath" classname="org.apache.velocity.anakia.AnakiaTask"/>
<anakia basedir="${src.docs}" destdir="${dest.docs}/" extension=".html" style="${eclipse.anakia}/xdocs/stylesheets/site.vsl" projectFile="./stylesheets/project.xml" excludes="**/stylesheets/**" includes="**/*.xml" lastModifiedCheck="true" velocityPropertiesFile="${src.docs}/velocity.properties"/>
<copy todir="${dest.docs}/images">
<fileset dir="${src.images}"/>
</copy>
<copy todir="${dest.docs}/demos">
<fileset dir="${src.demos}"/>
</copy>
</target>
<target name="docs-printable" depends="init-docs" if="AnakiaTask.present" description="Generate printable HTML documentation.">
<taskdef name="anakia" classpathref="anakia.classpath" classname="org.apache.velocity.anakia.AnakiaTask"/>
<anakia basedir="${src.docs}" destdir="${dest.printable_docs}/" extension=".html" style="${eclipse.anakia}/xdocs/stylesheets/site_printable.vsl" projectFile="./stylesheets/printable_project.xml" excludes="**/stylesheets/**" includes="**/*.xml" lastModifiedCheck="true" velocityPropertiesFile="${src.docs}/velocity.properties"/>
<copy todir="${dest.printable_docs}/images">
<fileset dir="${src.images}"/>
</copy>
<copy todir="${dest.printable_docs}/demos">
<fileset dir="${src.demos}"/>
</copy>
</target>
<target name="docs-all" depends="docs-site,docs-printable,docs-api" description="Generate documentation."/>
<target name="test" depends="install" description="Run tests">
<java classname="org.apache.jorphan.test.AllTests" fork="yes" dir="${basedir}/bin">
<classpath>
<path refid="classpath"/>
<fileset dir="${dest.jar}" includes="*.jar"/>
</classpath>
<arg value="../lib/ext"/>
<arg value="./jmeter.properties"/>
<arg value="org.apache.jmeter.util.JMeterUtils"/>
</java>
</target>
</project>