2002-12-30 01:01:46 +08:00
<?xml version="1.0"?>
2004-02-14 09:20:53 +08:00
<!--
$Header$
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
2000-06-30 04:44:37 +08:00
<project name= "JMeter" default= "all" basedir= "." >
2002-12-30 01:01:46 +08:00
<description >
To build JMeter from source and install:
2003-10-18 12:40:58 +08:00
ant [all]
2002-12-30 01:01:46 +08:00
To rebuild and install:
2003-10-18 12:40:58 +08:00
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]
2002-12-30 01:01:46 +08:00
For more info:
2003-10-18 12:40:58 +08:00
ant -projecthelp
2003-01-11 08:15:36 +08:00
To diagnose usage of deprecated APIs:
2003-10-18 12:40:58 +08:00
ant -Ddeprecation=on clean compile
2003-10-19 08:08:30 +08:00
2003-10-18 12:40:58 +08:00
Version: $Revision$ Last Updated: $Date$
2002-12-30 01:01:46 +08:00
</description>
2003-06-04 22:31:45 +08:00
2003-10-19 08:08:30 +08:00
<!--
Note
====
As with most other Jakarta projects, Gump (http://jakarta.apache.org/gump/) is used to
perform automated builds and tests on JMeter.
Gump uses its project/jakarta-jmeter.xml file to determine which target to use.
The current setting is: <ant target= "dist" >
Any changes to the dependency list for dist may affect Gump.
Now the dist target depends on "assume-libs-present", so if additional libraries are added to that,
the Gump project file for JMeter must also be updated.
Jars that are not required by the dist target do not need to be added to the Gump project file.
-->
2003-11-14 02:55:07 +08:00
2003-11-30 11:28:47 +08:00
<!-- Are we running under Gump? -->
<property name= "gump.run" value= "false" />
2003-12-10 18:42:50 +08:00
<!-- The version of this file -->
2003-12-10 18:43:58 +08:00
<property name= "version.build" value= "$Revision$" />
2003-12-10 18:42:50 +08:00
2003-10-18 12:40:58 +08:00
<!-- Renamed targets -->
<target name= "all-docs" >
<echo message= "Target has been renamed to docs-all" />
<antcall target= "docs-all" />
</target>
2004-02-06 22:09:57 +08:00
2003-10-18 12:40:58 +08:00
<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>
2003-10-19 08:08:30 +08:00
<!-- Findbugs task and target -->
<!--
Findbugs is licensed under the Lesser GNU Public License
HomePage: http://www.cs.umd.edu/~pugh/java/bugs/
To use the findbugs target, download and install the findbugs binary distribution
Set the value of findbugs.home according to where you installed findbugs, for example:
2004-02-17 07:58:48 +08:00
ant findbugs -Dfindbugs.home=/etc/findbugs -Dfindbugs.level=medium
[The defaults are /findbugs and high]
2003-10-19 08:08:30 +08:00
-->
<property name= "findbugs.home" value= "/findbugs" />
2004-03-08 07:40:38 +08:00
<property name= "findbugs.level" value= "medium" />
<property name= "findbugs.outName" value= "reports/jmeter-fb" />
2003-10-19 08:08:30 +08:00
<target name= "findbugs" >
<taskdef name= "findbugs"
classpath="${findbugs.home}/lib/findbugs-ant.jar"
classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
<findbugs home= "${findbugs.home}"
output="xml"
2004-02-17 07:58:48 +08:00
reportlevel="${findbugs.level}"
2003-10-19 08:08:30 +08:00
excludeFilter="fb-excludes.xml"
2004-03-08 07:40:38 +08:00
outputFile="${findbugs.outName}.xml" >
2003-10-19 08:08:30 +08:00
<class location= "${dest.jar}/*.jar" />
<class location= "${dest.jar.jmeter}/*.jar" />
<sourcePath path= "${src.core}" />
<sourcePath path= "${src.http}" />
<sourcePath path= "${src.ftp}" />
<sourcePath path= "${src.java}" />
<sourcePath path= "${src.jdbc}" />
<sourcePath path= "${src.ldap}" />
<sourcePath path= "${src.components}" />
<sourcePath path= "${src.functions}" />
<class location= "${lib.dir}/jorphan.jar" />
<sourcePath path= "${src.jorphan}" />
2003-11-17 03:23:05 +08:00
<sourcePath path= "${src.tcp}" />
2003-10-19 08:08:30 +08:00
<!--
<class location= "${lib.dir}/htmlparser.jar" />
<sourcePath path= "${src.htmlparser}" />
-->
2003-11-17 03:23:05 +08:00
<!--
Uncomment the previous lines and comment the following line
to do a source analysis of htmlparser
-->
<auxClasspath path= "${lib.dir}/htmlparser.jar" />
2003-10-19 08:08:30 +08:00
<auxClasspath path= "${jakarta-oro.jar}" />
<auxClasspath path= "${junit.jar}" />
<auxClasspath path= "${soap.jar}" />
<auxClasspath path= "${jdom.jar}" />
<auxClasspath path= "${tidy.jar}" />
<auxClasspath path= "${logkit.jar}" />
2004-03-22 10:19:40 +08:00
<auxClasspath path= "${excalibur-logger.jar}" />
2004-03-22 23:05:56 +08:00
<auxClasspath path= "${excalibur-compatibility.jar}" />
<auxClasspath path= "${excalibur-i18n.jar}" />
2003-10-19 08:08:30 +08:00
<auxClasspath path= "${avalon-excalibur.jar}" />
<auxClasspath path= "${avalon-framework.jar}" />
<auxClasspath path= "${commons-collections.jar}" />
2004-03-15 10:06:23 +08:00
<auxClasspath path= "${commons-logging.jar}" />
<auxClasspath path= "${commons-httpclient.jar}" />
2003-11-17 03:23:05 +08:00
<auxClasspath path= "${lib.dir}/${bsf.jar}" />
<auxClasspath path= "${lib.dir}/${bsh.jar}" />
<auxClasspath path= "${lib.opt}/${bsf.jar}" />
<auxClasspath path= "${lib.opt}/${bsh.jar}" />
2004-02-17 07:58:48 +08:00
<auxClasspath path= "${lib.dir}/activation.jar" />
<auxClasspath path= "${lib.dir}/mail.jar" />
<auxClasspath path= "${lib.opt}/activation.jar" />
<auxClasspath path= "${lib.opt}/mail.jar" />
2003-10-20 05:39:23 +08:00
<auxClasspath path= "${js.jar}" />
2003-10-19 08:08:30 +08:00
</findbugs>
2004-03-08 07:40:38 +08:00
<antcall target= "findbugs-style" />
2003-10-19 08:08:30 +08:00
</target>
2004-03-08 07:40:38 +08:00
2004-03-08 07:50:38 +08:00
<!-- Convert findbugs XML output to CSV -->
2004-03-08 07:40:38 +08:00
<target name= "findbugs-style" >
2004-03-08 07:50:38 +08:00
<xslt style= "fb-csv.xsl"
force="true"
in="${findbugs.outName}.xml"
out="${findbugs.outName}.csv">
</xslt>
2004-03-08 07:40:38 +08:00
</target>
2001-03-13 07:57:42 +08:00
<!-- Where the Sources live -->
2002-08-12 06:10:06 +08:00
<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" />
2002-10-18 03:47:20 +08:00
<property name= "src.jorphan" value= "src/jorphan" />
2003-06-04 22:31:45 +08:00
<property name= "src.ldap" value= "src/protocol/ldap" />
2003-10-18 11:15:22 +08:00
<property name= "src.htmlparser" value= "src/htmlparser" />
2003-11-16 11:14:18 +08:00
<property name= "src.tcp" value= "src/protocol/tcp" />
2004-02-26 06:34:20 +08:00
<property name= "src.examples" value= "src/examples" />
2004-03-13 22:45:28 +08:00
<property name= "src.monitor.components" value= "src/monitor/components" />
<property name= "src.monitor.model" value= "src/monitor/model" />
2002-12-30 01:01:46 +08:00
2003-10-18 12:40:58 +08:00
<!-- 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 -->
2003-01-10 22:09:27 +08:00
<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}" />
2003-06-04 22:31:45 +08:00
<pathelement location= "${src.ldap}" />
2003-10-18 11:15:22 +08:00
<pathelement location= "${src.htmlparser}" />
2003-11-16 11:14:18 +08:00
<pathelement location= "${src.tcp}" />
2004-02-26 06:34:20 +08:00
<pathelement location= "${src.examples}" />
2004-03-13 22:45:28 +08:00
<pathelement location= "${src.monitor.components}" />
<pathelement location= "${src.monitor.model}" />
2003-01-10 22:09:27 +08:00
</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" />
2003-06-04 22:31:45 +08:00
<property name= "build.ldap" location= "build/protocol/ldap" />
2003-10-18 11:15:22 +08:00
<property name= "build.htmlparser" location= "build/htmlparser" />
2003-11-16 11:14:18 +08:00
<property name= "build.tcp" location= "build/protocol/tcp" />
2004-02-26 06:34:20 +08:00
<property name= "build.examples" location= "build/examples" />
2004-03-13 22:45:28 +08:00
<property name= "build.monitor.components" location= "build/monitor/components" />
<property name= "build.monitor.model" location= "build/monitor/model" />
2003-06-06 22:23:59 +08:00
<!-- Path prefix to allow Anakia to find stylesheets if running under Eclipse -->
<!--
Anakia looks for stylesheets relative to the java launch directory.
2003-11-14 02:55:07 +08:00
Use the External Tools properties page to define the variable
2003-06-06 22:23:59 +08:00
as the relative path to the directory where this build file is found.
2003-11-14 02:55:07 +08:00
For example:
eclipse.anakia=workspace/jmeter
An alternative is to define it as a command-line argument on the Main page;
this allows one to use a macro name, so is more portable.
For example:
-Declipse.anakia=workspace/${project_name}
WARNING: you must ensure that you have selected a file or directory in
the Navigator pane before attempting to run the build, or Eclipse will
complain that it cannot resolve the variable name, and it can mark the
launch configuration as having failed.
2003-06-06 22:23:59 +08:00
-->
<property name= "eclipse.anakia" value= "." />
2003-01-10 22:09:27 +08:00
<!-- Where the build result .jars will be placed -->
2003-10-18 12:40:58 +08:00
<property name= "dest.jar" value= "lib/ext" />
<property name= "dest.jar.jmeter" value= "bin" />
2003-01-10 22:09:27 +08:00
2001-03-13 07:57:42 +08:00
<!-- Where the API documentation lives -->
2003-10-18 12:40:58 +08:00
<property name= "dest.docs.api" value= "docs/api" />
2003-01-10 22:09:27 +08:00
2003-10-18 12:40:58 +08:00
<!-- 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 -->
<property name= "lib.dir" value= "lib" />
2003-11-14 02:55:07 +08:00
<!-- Directory where Optional 3rd party libraries will live -->
<property name= "lib.opt" value= "lib/opt" />
2003-10-18 12:40:58 +08:00
<!-- Other stuff -->
<property name= "extras.dir" value= "extras" />
2001-03-13 07:57:42 +08:00
2003-01-10 22:09:27 +08:00
<!-- Where the distribution packages will be created -->
2003-01-09 09:50:02 +08:00
<property name= "dist.dir" value= "dist" />
2003-10-18 12:40:58 +08:00
<!-- Where the web - site packages will be created -->
<property name= "site.dir" value= "site" />
2003-01-10 22:09:27 +08:00
<!-- Compilation parameters -->
<property name= "optimize" value= "on" />
2003-01-11 08:15:36 +08:00
<property name= "deprecation" value= "off" />
2003-01-15 08:45:45 +08:00
<property name= "target.java.version" value= "1.2" />
2003-03-13 20:03:08 +08:00
<property name= "encoding" value= "UTF-8" />
2003-01-10 22:09:27 +08:00
<!-- 3rd party libraries to be included in the binary distribution -->
2003-10-18 12:40:58 +08:00
<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" />
2004-01-07 06:38:36 +08:00
<property name= "jakarta-oro.jar" value= "${lib.dir}/jakarta-oro-2.0.8.jar" />
2003-10-18 12:40:58 +08:00
<property name= "commons-collections.jar" value= "${lib.dir}/commons-collections.jar" />
2004-03-15 10:06:23 +08:00
<property name= "commons-httpclient.jar" value= "${lib.dir}/commons-httpclient-2.0.jar" />
<property name= "commons-logging.jar" value= "${lib.dir}/commons-logging.jar" />
2004-03-22 10:07:06 +08:00
<property name= "excalibur-logger.jar" value= "${lib.dir}/excalibur-logger-1.1.jar" />
2004-03-22 23:05:56 +08:00
<property name= "excalibur-i18n.jar" value= "${lib.dir}/excalibur-i18n-1.1.jar" />
<property name= "excalibur-compatibility.jar" value= "${lib.dir}/excalibur-compatibility-1.1.jar" />
2003-10-18 12:40:58 +08:00
<property name= "junit.jar" value= "${lib.dir}/junit.jar" />
<property name= "logkit.jar" value= "${lib.dir}/logkit-1.2.jar" />
2004-01-08 21:55:04 +08:00
<!-- The following 3 jars are probably optional for JDK1.4 -->
2003-10-18 12:40:58 +08:00
<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" />
2004-01-08 21:55:04 +08:00
2004-01-15 06:32:36 +08:00
<property name= "jdom.jar" value= "${lib.dir}/jdom-b9.jar" />
2003-10-18 12:40:58 +08:00
<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" >
2004-03-15 10:06:23 +08:00
<include name= "LICENSE" />
<include name= "NOTICE" />
<include name= "README" />
<include name= "INSTALL" />
2004-02-13 11:48:46 +08:00
<include name= "${lib.dir}/*.html" />
2004-02-13 11:50:04 +08:00
<include name= "${lib.dir}/LICENSE*.*" />
2003-01-10 22:09:27 +08:00
<include name= "${avalon-excalibur.jar}" />
<include name= "${avalon-framework.jar}" />
<include name= "${jakarta-oro.jar}" />
2003-11-14 02:55:07 +08:00
<include name= "${commons-collections.jar}" />
2004-03-15 10:06:23 +08:00
<include name= "${commons-httpclient.jar}" />
<include name= "${commons-logging.jar}" />
2004-03-22 10:07:06 +08:00
<include name= "${excalibur-logger.jar}" />
2004-03-22 23:05:56 +08:00
<include name= "${excalibur-i18n.jar}" />
<include name= "${excalibur-compatibility.jar}" />
2003-01-12 09:53:07 +08:00
<include name= "${junit.jar}" />
2003-01-10 22:09:27 +08:00
<include name= "${logkit.jar}" />
<include name= "${xalan.jar}" />
<include name= "${xerces.jar}" />
<include name= "${xml-apis.jar}" />
2003-11-14 02:55:07 +08:00
<include name= "${jdom.jar}" />
2003-10-18 12:40:58 +08:00
<include name= "${js.jar}" />
<include name= "${soap.jar}" />
<include name= "${tidy.jar}" />
</patternset>
2003-01-10 22:09:27 +08:00
2003-11-17 03:23:05 +08:00
<!--
Optional jars, not included in distribution.
Any such jars need to be downloaded separately.
These can be put into ${lib.dir} or ${lib.opt}
- both of these are included in the build classpath
Any jars put into ${lib.dir} will be included in
the classpath used by JMeter to load classes.
Jars in ${lib.opt} are NOT normally included by JMeter.
Placing an optional jar in ${lib.opt} means that it
will be included in the build classpath, but it will
not be included in the runtime classpath. This is intended
for testing JMeter without the optional Jar file(s).
-->
<property name= "bsf.jar" value= "bsfasf.jar" />
<property name= "bsh.jar" value= "bsh-1.3.0.jar" />
2003-10-19 08:08:30 +08:00
2003-11-17 03:23:05 +08:00
<!-- Build classpath (includes the optional jar directory) -->
2001-03-13 07:57:42 +08:00
<path id= "classpath" >
2004-03-22 10:19:40 +08:00
<!--
Temporary hack because avalon-excalibur includes an old version of excalibur-logger
-->
2004-03-22 23:05:56 +08:00
<fileset dir= "${lib.dir}" includes= "*.jar" excludes= "avalon-excalibur*.jar" />
2003-11-17 03:23:05 +08:00
<fileset dir= "${lib.opt}" includes= "*.jar" />
2002-08-13 03:14:08 +08:00
</path>
2003-11-14 02:55:07 +08:00
2003-10-18 12:40:58 +08:00
<!-- 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>
2002-12-30 01:01:46 +08:00
2003-10-18 12:40:58 +08:00
<target name= "init-version" >
2003-06-04 22:31:45 +08:00
<tstamp />
<!-- JMeter version -->
2004-03-19 08:05:58 +08:00
<property name= "jmeter.version" value= "1.9.${DSTAMP}" />
2003-06-04 22:31:45 +08:00
</target>
2003-10-18 12:40:58 +08:00
2003-11-17 09:34:17 +08:00
<target name= "init" depends= "check-libs,report-missing-libs,init-version" >
<!-- Create the optional directory (fileset complains if it is missing) -->
<mkdir dir= "${lib.opt}" />
</target>
2003-10-18 12:40:58 +08:00
<!-- JMeter Javadoc version (own variable is used so can be overriden independently) -->
2004-03-19 08:05:58 +08:00
<property name= "docversion" value= "${jmeter.version}" />
2003-06-04 22:31:45 +08:00
2002-12-30 01:01:46 +08:00
<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" >
2003-11-17 03:23:05 +08:00
<!-- Create the optional directory (fileset complains if it is missing) -->
<mkdir dir= "${lib.opt}" />
2002-12-30 01:01:46 +08:00
<available classname= "com.sun.net.ssl.internal.ssl.Provider" property= "jsse.present" >
<classpath refid= "classpath" />
</available>
2003-10-18 12:40:58 +08:00
<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" >
2002-12-30 13:08:29 +08:00
<classpath refid= "classpath" />
</available>
2003-10-18 12:40:58 +08:00
<available classname= "bsh.Interpreter" property= "beanshell.present" >
2002-12-30 01:01:46 +08:00
<classpath refid= "classpath" />
</available>
2003-10-18 12:40:58 +08:00
<available classname= "org.apache.bsf.BSFManager" property= "bsf.present" >
2003-10-15 18:05:30 +08:00
<classpath refid= "classpath" />
</available>
2002-12-30 01:01:46 +08:00
</target>
2003-10-18 12:40:58 +08:00
2002-12-30 01:01:46 +08:00
<!--
- 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>
2003-10-18 12:40:58 +08:00
<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"
/>
2002-12-30 01:01:46 +08:00
<!--
- Check for anakia task
-->
<target name= "check-anakia" >
2003-10-18 12:40:58 +08:00
<available classpathref= "anakia.classpath" classname= "org.apache.velocity.anakia.AnakiaTask" property= "AnakiaTask.present" />
2002-12-30 01:01:46 +08:00
</target>
<target name= "report-anakia-missing" depends= "check-anakia" unless= "AnakiaTask.present" >
<echo >
AnakiaTask is not present, documentation will not be generated.
</echo>
</target>
2003-10-18 12:40:58 +08:00
<target name= "compile-core" depends= "compile-jorphan,update-version" description= "Compile JMeter core classes." >
2002-12-30 01:01:46 +08:00
<mkdir dir= "${build.core}" />
2003-03-13 20:03:08 +08:00
<javac srcdir= "${src.core}" destdir= "${build.core}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
2002-12-30 01:01:46 +08:00
<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>
2003-10-18 12:40:58 +08:00
<target name= "update-version" unless= "version.noupdate" >
<echo > Updating version string</echo>
<replaceregexp file= "${src.core}/org/apache/jmeter/util/JMeterVersion.java"
match="VERSION = " .*?" "
2004-03-19 08:05:58 +08:00
replace="VERSION = " ${jmeter.version}" "/>
2003-10-18 12:40:58 +08:00
</target>
2002-12-30 01:01:46 +08:00
<target name= "compile-components" depends= "compile-jorphan,compile-core" description= "Compile generic (protocol-independent) components." >
<mkdir dir= "${build.components}" />
2003-03-13 20:03:08 +08:00
<javac srcdir= "${src.components}" destdir= "${build.components}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
2002-12-30 01:01:46 +08:00
<include name= "**/*.java" />
<exclude name= "org/apache/jmeter/visualizers/MailerVisualizer.java" unless= "javamail.complete" />
2003-06-01 23:18:37 +08:00
<exclude name= "org/apache/jmeter/reporters/MailerModel.java" unless= "javamail.complete" />
2002-12-30 01:01:46 +08:00
<exclude name= "org/apache/jmeter/reporters/MailerResultCollector.java" unless= "javamail.complete" />
2003-12-08 01:41:06 +08:00
<exclude name= "org/apache/jmeter/assertions/**/BeanShell*.java" unless= "beanshell.present" />
2002-12-30 01:01:46 +08:00
<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}" />
2003-03-13 20:03:08 +08:00
<javac srcdir= "${src.functions}" destdir= "${build.functions}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
2002-12-30 01:01:46 +08:00
<include name= "**/*.java" />
<classpath >
<path refid= "classpath" />
<pathelement location= "${build.jorphan}" />
<pathelement location= "${build.core}" />
</classpath>
</javac>
</target>
2003-10-22 20:24:49 +08:00
<target name= "compile-http" depends= "compile-jorphan,compile-core,compile-htmlparser" description= "Compile components specific to HTTP sampling." >
2002-12-30 01:01:46 +08:00
<mkdir dir= "${build.http}" />
2003-03-13 20:03:08 +08:00
<javac srcdir= "${src.http}" destdir= "${build.http}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
2002-12-30 01:01:46 +08:00
<include name= "**/*.java" />
2003-10-18 12:40:58 +08:00
<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" />
2002-12-30 01:01:46 +08:00
<classpath >
<path refid= "classpath" />
<pathelement location= "${build.jorphan}" />
<pathelement location= "${build.core}" />
2003-11-15 10:15:31 +08:00
<pathelement location= "${build.components}" />
2003-10-22 20:24:49 +08:00
<pathelement location= "${build.htmlparser}" />
2002-12-30 01:01:46 +08:00
</classpath>
</javac>
</target>
<target name= "compile-ftp" depends= "compile-jorphan,compile-core" description= "Compile components specific to FTP sampling." >
<mkdir dir= "${build.ftp}" />
2003-03-13 20:03:08 +08:00
<javac srcdir= "${src.ftp}" destdir= "${build.ftp}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
2002-12-30 01:01:46 +08:00
<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}" />
2003-03-13 20:03:08 +08:00
<javac srcdir= "${src.jdbc}" destdir= "${build.jdbc}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
2002-12-30 01:01:46 +08:00
<include name= "**/*.java" />
<classpath >
<path refid= "classpath" />
<pathelement location= "${build.jorphan}" />
<pathelement location= "${build.core}" />
</classpath>
</javac>
</target>
2003-06-04 22:31:45 +08:00
<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>
2002-12-30 01:01:46 +08:00
<target name= "compile-java" depends= "compile-jorphan,compile-core" description= "Compile components specific to Java sampling." >
<mkdir dir= "${build.java}" />
2003-03-13 20:03:08 +08:00
<javac srcdir= "${src.java}" destdir= "${build.java}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
2002-12-30 01:01:46 +08:00
<include name= "**/*.java" />
2003-10-18 12:40:58 +08:00
<exclude name= "org/apache/jmeter/protocol/java/**/BeanShell*.java" unless= "beanshell.present" />
<exclude name= "org/apache/jmeter/protocol/java/**/BSF*.java" unless= "bsf.present" />
2002-12-30 01:01:46 +08:00
<classpath >
<path refid= "classpath" />
<pathelement location= "${build.jorphan}" />
<pathelement location= "${build.core}" />
</classpath>
</javac>
</target>
2004-02-26 06:34:20 +08:00
<target name= "compile-tcp" depends= "compile-jorphan,compile-core" description= "Compile components specific to TCP sampling." >
2003-11-16 11:14:18 +08:00
<mkdir dir= "${build.tcp}" />
<javac srcdir= "${src.tcp}" destdir= "${build.tcp}" 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-protocols" depends= "compile-http,compile-ftp,compile-jdbc,compile-java,compile-ldap,compile-tcp" description= "Compile all protocol-specific components." />
2002-12-30 01:01:46 +08:00
2004-02-26 06:34:20 +08:00
<target name= "compile-examples" depends= "compile-jorphan,compile-core" description= "Compile example components." >
<mkdir dir= "${build.examples}" />
<javac srcdir= "${src.examples}" destdir= "${build.examples}" 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>
2004-03-19 08:05:58 +08:00
<target name= "compile-monitor" depends= "compile-monitor-model,compile-monitor-components" />
<target name= "compile-monitor-components"
depends="compile-jorphan,compile-core,compile-components,compile-monitor-model">
2004-03-13 22:45:28 +08:00
<mkdir dir= "${build.monitor.components}" />
<javac srcdir= "${src.monitor.components}" destdir= "${build.monitor.components}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
<include name= "**/*.java" />
<classpath >
<path refid= "classpath" />
2004-03-14 00:46:22 +08:00
<pathelement location= "${build.monitor.model}" />
<pathelement location= "${build.http}" />
2004-03-13 22:45:28 +08:00
<pathelement location= "${build.jorphan}" />
<pathelement location= "${build.core}" />
2004-03-14 00:46:22 +08:00
<pathelement location= "${build.components}" />
2004-03-13 22:45:28 +08:00
</classpath>
</javac>
</target>
<target name= "compile-monitor-model" depends= "compile-jorphan,compile-core" >
<mkdir dir= "${build.monitor.model}" />
<javac srcdir= "${src.monitor.model}" destdir= "${build.monitor.model}" 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>
2002-12-30 01:01:46 +08:00
<target name= "compile-jorphan" depends= "init" description= "Compile JOrphan utility classes." >
<mkdir dir= "${build.jorphan}" />
2003-03-13 20:03:08 +08:00
<javac srcdir= "${src.jorphan}" destdir= "${build.jorphan}" optimize= "${optimize}" debug= "on" target= "${target.java.version}" deprecation= "${deprecation}" encoding= "${encoding}" >
2002-12-30 01:01:46 +08:00
<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 >
2003-01-02 21:56:10 +08:00
<path refid= "classpath" />
2002-12-30 01:01:46 +08:00
<pathelement location= "${build.jorphan}" />
<pathelement path= "${build.core}" />
</classpath>
</rmic>
2003-01-02 21:56:10 +08:00
<rmic base= "${build.core}" classname= "org.apache.jmeter.samplers.RemoteSampleListenerImpl" >
<classpath >
<path refid= "classpath" />
<pathelement path= "${build.core}" />
</classpath>
</rmic>
2002-12-30 01:01:46 +08:00
</target>
2003-10-18 11:15:22 +08:00
<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>
2004-03-19 08:05:58 +08:00
<target name= "compile" depends= "compile-core,compile-components,compile-functions,compile-protocols,compile-rmi,compile-htmlparser,compile-monitor"
description="Compile everything."/>
2003-10-18 11:15:22 +08:00
2003-11-27 20:06:20 +08:00
<target name= "package" depends= "compile, package-only" />
2003-11-17 03:23:05 +08:00
<!--
N.B. Eclipse (and perhaps other Java IDEs) copies all files to the build directory, unless
told otherwise. This means that there might be copies of property and image files in the
build directory. To avoid including the files twice in the jar file, we include only .class
files in the list of files to be processed.
An alternative solution is to copy the extra resources to the build tree, and then
include everything from the build tree.
This has the disadvantage that there are then two copies of each
properties file visible in Eclipse, and it is easy to pick the wrong one to edit,
especially as the build directory appears first ...
The advantage would be that JMeter could theoretically be run from the classes, without
needing to create jar files first. However, this would mean changing the way JMeter loads
some of its classes - at present JMeter can only run from jar files.
-->
2003-11-27 20:06:20 +08:00
<target name= "package-only" description= "Package already-compiled classes (shortcut for IDE users)" >
2003-10-18 12:40:58 +08:00
<mkdir dir= "${dest.jar}" />
2004-01-21 23:54:07 +08:00
<!-- 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 -->
<!-- JMeter launch jar -->
<jar jarfile= "${dest.jar.jmeter}/ApacheJMeter.jar" includes= "**/NewDriver*"
manifest="${src.core}/MANIFEST"
basedir="${build.core}"/>
<!-- core -->
<jar jarfile= "${dest.jar}/ApacheJMeter_core.jar" excludes= "**/NewDriver*" >
<!-- Only include class files from build tree - see above -->
2003-11-17 03:23:05 +08:00
<fileset dir= "${build.core}" includes= "**/*.class" />
2002-12-30 01:01:46 +08:00
<fileset dir= "${src.core}" includes= "org/apache/jmeter/images/" />
2004-01-21 23:54:07 +08:00
<fileset dir= "${src.core}" includes= "**/*.properties" >
2002-12-30 01:01:46 +08:00
<exclude name= "*eucJP*" />
</fileset>
2003-11-22 11:22:25 +08:00
<!-- This file is used by the jmeter - h option -->
2002-12-30 01:01:46 +08:00
<fileset dir= "${src.core}" includes= "org/apache/jmeter/help.txt" />
</jar>
2004-01-21 23:54:07 +08:00
<!-- components -->
<jar jarfile= "${dest.jar}/ApacheJMeter_components.jar" >
<fileset dir= "${build.components}" includes= "**/*.class" />
<fileset dir= "${src.components}" includes= "**/*.properties" />
</jar>
<!-- functions -->
<jar jarfile= "${dest.jar}/ApacheJMeter_functions.jar" >
<fileset dir= "${build.functions}" includes= "**/*.class" />
<fileset dir= "${src.functions}" includes= "**/*.properties" />
</jar>
<!-- http -->
<jar jarfile= "${dest.jar}/ApacheJMeter_http.jar" >
<fileset dir= "${build.http}" includes= "**/*.class" />
<fileset dir= "${src.http}" includes= "**/*.properties" />
</jar>
<!-- ftp -->
<jar jarfile= "${dest.jar}/ApacheJMeter_ftp.jar" >
<fileset dir= "${build.ftp}" includes= "**/*.class" />
<fileset dir= "${src.ftp}" includes= "**/*.properties" />
</jar>
<!-- jdbc -->
<jar jarfile= "${dest.jar}/ApacheJMeter_jdbc.jar" >
<fileset dir= "${build.jdbc}" includes= "**/*.class" />
<fileset dir= "${src.jdbc}" includes= "**/*.properties" />
</jar>
<!-- java -->
<jar jarfile= "${dest.jar}/ApacheJMeter_java.jar" >
<fileset dir= "${build.java}" includes= "**/*.class" />
<fileset dir= "${src.java}" includes= "**/*.properties" />
</jar>
<!-- ldap -->
<jar jarfile= "${dest.jar}/ApacheJMeter_ldap.jar" >
<fileset dir= "${build.ldap}" includes= "**/*.class" />
<fileset dir= "${src.ldap}" includes= "**/*.properties" />
</jar>
<!-- tcp -->
<jar jarfile= "${dest.jar}/ApacheJMeter_tcp.jar" >
<fileset dir= "${build.tcp}" includes= "**/*.class" />
<fileset dir= "${src.tcp}" includes= "**/*.properties" />
</jar>
2004-03-19 08:05:58 +08:00
<!-- monitor -->
<jar jarfile= "${dest.jar}/ApacheJMeter_monitors.jar" >
<fileset dir= "${build.monitor.model}" includes= "**/*.class" />
<fileset dir= "${build.monitor.components}" includes= "**/*.class" />
</jar>
2003-10-20 18:26:53 +08:00
<jar jarfile= "${lib.dir}/htmlparser.jar" basedir= "${build.htmlparser}" />
<jar jarfile= "${lib.dir}/jorphan.jar" basedir= "${build.jorphan}" />
2003-10-18 12:40:58 +08:00
</target>
<target name= "install" depends= "package" description= "Install JMeter. (Compiles code and creates jars)" >
2002-12-30 01:01:46 +08:00
<fixcrlf srcdir= "." eol= "lf" includes= "**/jmeter,**/jmeter-server" />
2002-08-12 06:10:06 +08:00
</target>
2001-06-17 23:21:07 +08:00
2003-10-18 12:40:58 +08:00
<target name= "all" depends= "clean,install"
description="Default: build from source and install. Does not create docs."
/>
2001-06-17 23:21:07 +08:00
2004-02-26 06:34:20 +08:00
<target name= "install-examples" depends= "compile-examples" description= "Build and installs the example components." >
<jar jarfile= "${dest.jar}/ApacheJMeter_examples.jar" >
<fileset dir= "${build.examples}" includes= "**/*.class" />
<fileset dir= "${src.examples}" includes= "**/*.properties" />
</jar>
</target>
2003-10-18 12:40:58 +08:00
<!--
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
-->
2002-12-30 01:01:46 +08:00
<target name= "assume-libs-present" >
2003-12-07 10:16:24 +08:00
<!-- Show the build version in gump logs -->
<echo > Version $Revision$ Last updated: $Date$</echo>
2003-12-06 03:42:29 +08:00
<!-- try to avoid Gump classpath complaint -->
<mkdir dir= "${lib.opt}" />
2002-12-30 01:01:46 +08:00
<property name= "assuming.libs.present" value= "true" />
<property name= "jsse.present" value= "assume" />
<property name= "javamail.complete" value= "assume" />
2003-11-26 01:17:15 +08:00
<!-- Test: while Gump builds are being sorted out
2003-10-18 12:40:58 +08:00
<property name= "beanshell.present" value= "assume" />
2003-11-26 01:17:15 +08:00
-->
2003-11-30 11:28:47 +08:00
<!-- Check for Gump option depends -->
<available classname= "bsh.Interpreter" property= "beanshell.present" >
<classpath refid= "classpath" />
</available>
<available classname= "org.apache.bsf.BSFManager" property= "bsf.present" >
<classpath refid= "classpath" />
</available>
2002-12-30 01:01:46 +08:00
</target>
2003-10-18 12:40:58 +08:00
<!-- list of files needed for a binary distribution -->
2002-12-30 01:01:46 +08:00
<patternset id= "dist.binaries" >
2004-02-13 11:48:46 +08:00
<include name= "LICENSE" />
<include name= "NOTICE" />
<include name= "README" />
<include name= "INSTALL" />
2003-10-18 12:40:58 +08:00
<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.*" />
2003-10-20 07:14:50 +08:00
<include name= "${dest.jar.jmeter}/testfiles/**" />
2003-10-18 12:40:58 +08:00
<include name= "${dest.jar}/" />
<include name= "${dest.printable_docs}/**" />
<include name= "${extras.dir}/**" />
<include name= "${lib.dir}/jorphan.jar" />
2003-10-20 18:26:53 +08:00
<include name= "${lib.dir}/htmlparser.jar" />
2002-12-30 01:01:46 +08:00
</patternset>
2003-10-18 12:40:58 +08:00
<!--
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" />
2003-02-04 00:08:36 +08:00
<patternset id= "dist.sources" >
2004-02-13 11:48:46 +08:00
<include name= "LICENSE" />
<include name= "NOTICE" />
<include name= "README" />
<include name= "INSTALL" />
2003-10-18 12:40:58 +08:00
<include name= "${src.dir}/**" />
<include name= "${src.docs}/**" />
<include name= "build.*" />
<include name= "lcp.bat" />
<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*" />
2003-02-04 00:08:36 +08:00
</patternset>
2002-12-30 01:01:46 +08:00
2003-10-18 12:40:58 +08:00
<!-- 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." >
2004-03-19 08:05:58 +08:00
<property name= "dist.name" value= "jakarta-jmeter-${jmeter.version}" />
2003-10-18 12:40:58 +08:00
<antcall target= "_pack-binaries" />
<antcall target= "_pack-libraries" />
<antcall target= "_pack-javadoc" />
<antcall target= "_pack-source" />
</target>
2003-12-19 02:18:47 +08:00
<!--
2004-03-20 20:39:24 +08:00
Gump targets.
There are separate build, test and documentation projects for the jmeter module.
2003-12-19 02:18:47 +08:00
-->
2004-03-20 20:39:24 +08:00
<!-- Used by project jakarta - jmeter - cvs -->
<target name= "gump-build"
depends="_gump_properties,assume-libs-present,clean,install,docs-printable"
description="Build JMeter">
2004-03-19 08:05:58 +08:00
<property name= "dist.name" value= "jakarta-jmeter-${jmeter.version}" />
2003-12-19 02:18:47 +08:00
<antcall target= "_pack-binaries" />
<antcall target= "_pack-libraries" />
<antcall target= "_pack-source" />
</target>
2004-03-20 20:39:24 +08:00
<!-- Used by project jakarta - jmeter -->
<target name= "gump-compile"
depends="_gump_properties,assume-libs-present,clean,compile"
description="Compile JMeter only">
2004-01-03 20:19:38 +08:00
</target>
2004-03-20 20:39:24 +08:00
<!-- Used by project jakarta - jmeter - test -->
<target name= "gump-test"
depends="_gump_properties,_test"
description="Test JMeter">
2004-01-08 21:55:04 +08:00
<!-- Show the log file -->
<concat >
<filelist dir= "bin" files= "jmeter-test.log" />
</concat>
2003-12-19 02:18:47 +08:00
</target>
2004-03-20 20:39:24 +08:00
<!-- Used by project jakarta - jmeter - javadoc -->
<target name= "gump-javadoc"
depends="_gump_properties,docs-api"
description="Create JMeter javadocs">
2004-03-19 08:05:58 +08:00
<property name= "dist.name" value= "jakarta-jmeter-${jmeter.version}" />
2003-12-19 02:18:47 +08:00
<antcall target= "_pack-javadoc" />
</target>
2004-03-20 20:39:24 +08:00
<target name= "_gump_properties" >
<echo >
Gump properties for this run
jmeter.version = ${jmeter.version}
gump.run = ${gump.run}
date.projectfile = ${date.projectfile}
version.projectfile = ${version.projectfile}
</echo>
</target>
2003-10-18 12:40:58 +08:00
<target name= "dist-src" depends= "init-version" description= "Create the source distribution packages." >
2004-03-19 08:05:58 +08:00
<property name= "dist.name" value= "jakarta-jmeter-${jmeter.version}" />
2003-10-18 12:40:58 +08:00
<antcall target= "_pack-source" />
</target>
<target name= "pack-dist" depends= "init-version" description= "Create the distribution packages with no rebuild." >
2004-03-19 08:05:58 +08:00
<property name= "dist.name" value= "jakarta-jmeter-${jmeter.version}" />
2003-10-18 12:40:58 +08:00
<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" />
2003-10-12 09:42:00 +08:00
<mkdir dir= "${dist.dir}" />
2003-10-18 12:40:58 +08:00
<tar destfile= "${dist.dir}/${pack.name}.tar" longfile= "gnu" >
2003-02-01 22:41:11 +08:00
<tarfileset dir= "." prefix= "${dist.name}" excludes= "${dist.executables}" defaultexcludes= "yes" >
2002-12-30 01:01:46 +08:00
<patternset refid= "dist.binaries" />
</tarfileset>
2003-02-01 22:41:11 +08:00
<tarfileset mode= "755" includes= "${dist.executables}" dir= "." prefix= "${dist.name}" defaultexcludes= "yes" />
2002-12-30 01:01:46 +08:00
</tar>
2003-10-18 12:40:58 +08:00
<gzip zipfile= "${dist.dir}/${pack.name}.tgz" src= "${dist.dir}/${pack.name}.tar" />
<zip zipfile= "${dist.dir}/${pack.name}.zip" >
2003-02-01 22:41:11 +08:00
<zipfileset dir= "." prefix= "${dist.name}" defaultexcludes= "yes" >
2003-01-09 09:50:02 +08:00
<patternset refid= "dist.binaries" />
2003-10-12 09:42:00 +08:00
</zipfileset>
</zip>
2003-10-18 12:40:58 +08:00
</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>
2003-10-12 09:42:00 +08:00
</tar>
2003-10-18 12:40:58 +08:00
<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>
2003-01-09 09:50:02 +08:00
</zip>
2003-10-18 12:40:58 +08:00
</target>
<target name= "_pack-javadoc" >
<property name= "pack.name" value= "${dist.name}_api" />
2003-12-20 20:21:34 +08:00
<mkdir dir= "${dist.dir}" />
2003-10-18 12:40:58 +08:00
<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" />
2003-10-12 09:42:00 +08:00
<mkdir dir= "${dist.dir}" />
2003-10-18 12:40:58 +08:00
<tar destfile= "${dist.dir}/${pack.name}.tar" longfile= "gnu" >
2003-02-04 00:08:36 +08:00
<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>
2003-10-18 12:40:58 +08:00
<gzip zipfile= "${dist.dir}/${pack.name}.tgz" src= "${dist.dir}/${pack.name}.tar" />
<zip zipfile= "${dist.dir}/${pack.name}.zip" >
2003-02-04 00:08:36 +08:00
<zipfileset dir= "." prefix= "${dist.name}" defaultexcludes= "yes" >
<patternset refid= "dist.sources" />
</zipfileset>
</zip>
2003-10-18 12:40:58 +08:00
</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." >
2004-03-19 08:05:58 +08:00
<property name= "dist.name" value= "jakarta-jmeter-${jmeter.version}" />
2003-10-18 12:40:58 +08:00
<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>
2002-12-30 01:01:46 +08:00
<target name= "clean" description= "Clean up to force a build from source." >
2003-10-18 12:40:58 +08:00
<delete file= "${dest.jar.jmeter}/ApacheJMeter.jar" />
2003-10-20 18:26:53 +08:00
<delete quiet= "true" file= "${lib.dir}/jorphan.jar" />
<delete quiet= "true" file= "${lib.dir}/htmlparser.jar" />
2003-10-18 12:40:58 +08:00
<delete quiet= "true" >
<fileset dir= "${dest.jar}" excludes= ".cvsignore" />
</delete>
2002-12-30 01:01:46 +08:00
<delete dir= "${build.dir}" />
2003-10-18 12:40:58 +08:00
<delete dir= "${dest.docs.api}" />
<delete quiet= "true" >
<fileset dir= "${dest.docs}" excludes= ".cvsignore" />
</delete>
<delete dir= "${dest.printable_docs}" />
2003-01-09 09:50:02 +08:00
<delete dir= "${dist.dir}" />
2003-10-18 12:40:58 +08:00
<delete dir= "${site.dir}" />
2003-10-12 09:42:00 +08:00
</target>
2004-02-15 03:59:49 +08:00
<target name= "docs-api" depends= "init-version" description= "Generate the API documentation." >
<tstamp >
<!-- Used to ensure end - year is up to date -->
<format property= "THISYEAR" pattern= "yyyy" />
</tstamp>
2003-10-18 12:40:58 +08:00
<mkdir dir= "${dest.docs.api}" />
<javadoc sourcepathref= "srcpaths"
additionalparam="-breakiterator"
destdir="${dest.docs.api}"
2004-02-15 03:59:49 +08:00
protected="yes" author="yes" version="yes"
2003-10-18 12:40:58 +08:00
doctitle="Apache JMeter API Specification"
windowtitle="Apache JMeter API Specification"
2004-02-15 03:59:49 +08:00
header="< b> Apache JMeter< /b> < br> < font size='-1'> ${docversion}< /font> " bottom="Copyright © 1998-${THISYEAR} Apache Software Foundation. All Rights Reserved."
packagenames="org.apache.jmeter.*,org.apache.jorphan.*"
excludepackagenames="org.apache.jmeter.util.keystore,org.apache.jorphan.timer">
2003-10-18 12:40:58 +08:00
<classpath refid= "classpath" />
<link href= "http://java.sun.com/products/jdk/1.3/docs/api/" />
</javadoc>
2001-11-01 01:32:33 +08:00
</target>
2001-06-17 23:21:07 +08:00
2004-02-15 03:59:49 +08:00
<!--
Run Doccheck: See http://java.sun.com/j2se/javadoc/doccheck/docs/DocCheck.html
Download the doclet, and put the jar in lib/opt.
Output is in reports/ directory
-->
<target name= "docs-check" >
<javadoc sourcepathref= "srcpaths"
destdir="reports"
docletpath="${lib.opt}/doccheck.jar"
packagenames="org.apache.jmeter.*,org.apache.jorphan.*"
excludepackagenames="org.apache.jmeter.util.keystore,org.apache.jorphan.timer">
<classpath refid= "classpath" />
<doclet name= "com.sun.tools.doclets.doccheck.DocCheck" >
<!--
-execDepth: 1=org.* 2=org.apache.* 3+=org.apache.jmeter.*
-evident does not seem to work
-->
<param name= "-execDepth" value= "3" />
<param name= "-evident" value= "4" />
</doclet>
</javadoc>
</target>
2003-10-18 12:40:58 +08:00
<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}" />
2003-10-12 09:42:00 +08:00
</copy>
2002-12-30 01:01:46 +08:00
</target>
2003-10-18 12:40:58 +08:00
<target name= "docs-all" depends= "docs-site,docs-printable,docs-api" description= "Generate documentation." />
2002-12-30 01:01:46 +08:00
2003-12-06 03:42:29 +08:00
<target name= "test" depends= "install,_test" description= "Run tests" />
2003-12-03 20:40:31 +08:00
2003-12-06 03:42:29 +08:00
<target name= "test-both" depends= "test-headless,test-headed" />
2003-12-03 20:40:31 +08:00
<target name= "test-headless" >
2003-12-06 03:42:29 +08:00
<antcall target= "_test" >
<param name= "test.headless" value= "true" />
</antcall>
</target>
<target name= "test-headed" >
<antcall target= "_test" >
<param name= "test.headless" value= "false" />
</antcall>
</target>
<!-- Generic test target, not intended to be called directly -->
<target name= "_test" >
<!--
The property java.awt.headless is not automatically passed on,
because the tests are run in a separate JVM from the build.
It is assumed that Gump sets java.awt.headless if required.
Set test.headless from the java.awt property, if that
is defined, otherwise it us set to "".
N.B. if test.headless is already set, it will not be changed
This allows the property to be over-ridden by test-headless etc.
-->
<condition property= "test.headless" value= "${java.awt.headless}" >
<isset property= "java.awt.headless" />
</condition>
<!-- make sure test.headless is set to something -->
<condition property= "test.headless" value= "" >
<not > <isset property= "java.awt.headless" /> </not>
</condition>
<echo >
2003-12-03 20:13:07 +08:00
gump.run = ${gump.run}
2003-12-06 03:42:29 +08:00
java.awt.headless = ${java.awt.headless}
test.headless = ${test.headless}
2004-03-13 22:45:28 +08:00
user.dir = ${user.dir}
basedir = ${basedir}
2003-12-03 20:13:07 +08:00
</echo>
2003-12-03 09:06:06 +08:00
<java classname= "org.apache.jorphan.test.AllTests" fork= "yes" dir= "${basedir}/bin" >
<classpath >
<path refid= "classpath" />
<fileset dir= "${dest.jar}" includes= "*.jar" />
</classpath>
2003-12-06 03:42:29 +08:00
<sysproperty key= "java.awt.headless" value= "${test.headless}" />
2003-12-03 09:06:06 +08:00
<arg value= "../lib/ext" />
<arg value= "./jmetertest.properties" />
<arg value= "org.apache.jmeter.util.JMeterUtils" />
2002-12-30 01:01:46 +08:00
</java>
</target>
2003-12-06 03:42:29 +08:00
2003-12-07 04:40:54 +08:00
<!--
In order to run JUnit, both junit.jar and optional.jar need to be on the Ant classpath
optional.jar is normally found in ANT_HOME/lib
-->
<target name= "junit" description= "Run individual JUnit test" >
2003-12-15 09:09:37 +08:00
<mkdir dir= "reports" />
2003-12-17 22:07:55 +08:00
<property name= "test.format" value= "brief" />
2003-12-15 09:09:37 +08:00
<property name= "test.case1" value= "org.apache.jmeter.junit.JMeterTest" />
<property name= "test.case" value= "org.apache.jorphan.test.AllTests" />
2003-12-07 04:40:54 +08:00
<junit fork= "true"
dir="${basedir}/bin"
showoutput="true"
printsummary="withOutAndErr">
2003-12-17 22:07:55 +08:00
<formatter type= "${test.format}" usefile= "no" />
2003-12-15 09:09:37 +08:00
<formatter type= "xml" />
2003-12-07 04:40:54 +08:00
<classpath >
<path refid= "classpath" />
<fileset dir= "${dest.jar}" includes= "*.jar" />
<fileset dir= "${lib.opt}" includes= "optional.jar" />
</classpath>
2003-12-15 09:09:37 +08:00
<test name= "${test.case}" todir= "reports" />
2003-12-07 04:40:54 +08:00
</junit>
</target>
2003-12-15 09:09:37 +08:00
<!-- Utility target to collate reports -->
<target name= "junitreport" >
<mkdir dir= "reports" />
<junitreport todir= "reports" >
<fileset dir= "reports" >
<include name= "TEST-*.xml" />
</fileset>
<report format= "frames" todir= "reports" />
</junitreport>
</target>
2003-11-12 23:38:55 +08:00
<!-- Run the HTML Parser unit tests -->
<target name= "testparser" description= "run the JUnit tests" >
<echo message= "**********************************" />
<echo message= "* Running unit tests.... *" />
<echo message= "**********************************" />
<!--
<javac srcdir= "${src}" includes= "org/htmlparser/tests/**" debug= "on" >
<classpath >
<pathelement location= "src" />
<pathelement location= "${junit.jar}" />
<pathelement location= "${commons-logging.jar}" />
</classpath>
</javac>
-->
<java classname= "org.htmlparser.tests.AllTests" fork= "yes" failonerror= "yes" >
<classpath >
<pathelement location= "${lib.dir}/htmlparser.jar" />
<!-- <pathelement location="${src}"/ -->
<pathelement location= "${junit.jar}" />
<pathelement location= "${log-kit.jar}" />
</classpath>
<arg value= "-text" />
</java>
</target>
2004-02-06 22:09:57 +08:00
<target name= "get-beanshell" >
<get src= "http://www.beanshell.org/bsh-1.3.0.jar"
dest="lib/bsh-1.3.0.jar"
verbose="true" usetimestamp="true"/>
</target>
<target name= "get-bsf" >
<get src= "http://cvs.apache.org/dist/jakarta/bsf/v2.3.0rc1/bin/bsf-bin-2.3.0.zip"
dest="bsf-bin-2.3.0.zip"
verbose="true" usetimestamp="true"/>
<!--
Does not appear to be possible to junk the path names in unzip,
so use a temporary directory and delete it.
-->
<unzip src= "bsf-bin-2.3.0.zip" dest= "tmp" />
<move file= "tmp/bsf-2.3.0/lib/bsf.jar" todir= "lib" > </move>
<delete dir= "tmp" > </delete>
</target>
2003-11-12 23:38:55 +08:00
2000-03-29 05:12:51 +08:00
</project>