build.xml revision 84
0N/A<!--
0N/A ! CDDL HEADER START
0N/A !
0N/A ! The contents of this file are subject to the terms of the
0N/A ! Common Development and Distribution License, Version 1.0 only
0N/A ! (the "License"). You may not use this file except in compliance
0N/A ! with the License.
0N/A !
0N/A ! You can obtain a copy of the license at
0N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/A ! See the License for the specific language governing permissions
0N/A ! and limitations under the License.
0N/A !
0N/A ! When distributing Covered Code, include this CDDL HEADER in each
0N/A ! file and include the License file at
0N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/A ! add the following below this CDDL HEADER, with the fields enclosed
0N/A ! by brackets "[]" replaced with your own identifying * information:
0N/A ! Portions Copyright [yyyy] [name of copyright owner]
0N/A !
0N/A ! CDDL HEADER END
0N/A !
0N/A !
0N/A ! Portions Copyright 2006 Sun Microsystems, Inc.
0N/A ! -->
0N/A
0N/A<project name="Directory Server" basedir="." default="package">
0N/A <description>
0N/A This is the build script for the OpenDS Directory Server. See the BUILDING
0N/A file in this directory for build instructions.
0N/A </description>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- General server-wide properties -->
0N/A <property name="src.dir" location="src/server" />
0N/A <property name="build.dir" location="build" />
0N/A <property name="classes.dir" location="${build.dir}/classes" />
0N/A <property name="lib.dir" location="lib" />
0N/A <property name="ext.dir" location="ext" />
0N/A <property name="package.dir" location="${build.dir}/package" />
0N/A <property name="javadoc.dir" location="${build.dir}/javadoc" />
0N/A <property name="resource.dir" location="resource" />
0N/A <property name="scripts.dir" location="${resource.dir}/bin" />
0N/A <property name="config.dir" location="${resource.dir}/config" />
0N/A
0N/A <!-- Properties for use in unit testing. -->
0N/A <property name="unittest.testng.dir" location="tests/unit-tests-testng"/>
0N/A <property name="unittest.testng.src.dir"
0N/A location="${unittest.testng.dir}/src"/>
0N/A
0N/A <property name="unittest.classes.dir"
0N/A location="${build.dir}/unit-tests/classes" />
0N/A <property name="unittest.report.dir"
0N/A location="${build.dir}/unit-tests/report"/>
0N/A
0N/A <!-- Properties for use with the DSML component. -->
0N/A <property name="dsml.dir" location="resource/dsml" />
0N/A <property name="dsml.src.dir" location="src/dsml" />
0N/A <property name="dsml.lib.dir" location="${dsml.dir}/lib" />
0N/A <property name="dsml.gen.dir" location="${build.dir}/dsml/gen" />
0N/A <property name="dsml.classes.dir" location="${build.dir}/dsml/classes" />
0N/A
0N/A <!-- Properties for code coverage testing. -->
0N/A <property name="coverage.dir" location="build/coverage" />
0N/A <property name="coverage.report.dir" location="${coverage.dir}/report" />
0N/A <property name="coverage.instr.dir"
0N/A location="${coverage.dir}/instrumentedcode" />
0N/A <property name="coverage.data.dir"
0N/A location="${coverage.dir}/gathereddata" />
0N/A
0N/A <!-- Properties for the EMMA code coverage tool. -->
0N/A <property name="emma.dir" location="${ext.dir}/emma/lib" />
0N/A
0N/A <!-- Properties for the TestNG unit testing tool. -->
0N/A <property name="testng.dir" location="${ext.dir}/testng" />
0N/A <property name="testng.lib.dir" location="${testng.dir}/lib" />
0N/A
0N/A <!-- Properties for the checkstyle tool. -->
0N/A <property name="checkstyle.dir" location="${ext.dir}/checkstyle" />
0N/A
0N/A <!-- Properties for Directory Server version information. -->
0N/A <property name="dynconstants.file"
0N/A location="${src.dir}/org/opends/server/util/DynamicConstants.java" />
0N/A <property file="PRODUCT" />
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Create a package bundle containing the DSML library. -->
0N/A <target name="dsml" depends="predsml,package"
0N/A description="Build a Directory Server package bundle with DSML.">
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- The build target that should be used before committing code. -->
0N/A <target name="precommit" depends="checkstyle,dsml,javadoc,test"
0N/A description="Perform all processing needed before committing code." />
0N/A
0N/A
0N/A
0N/A
0N/A <!-- The build target that should be used for nightly builds. -->
0N/A <target name="nightly"
0N/A depends="checkstyle,dsml,javadoc,coverage,test"
0N/A description="Perform all processing needed for nightly builds." />
0N/A
0N/A
0N/A
0N/A
0N/A <!-- The build target that should be used for weekly builds. -->
0N/A <target name="weekly" depends="nightly"
0N/A description="Perform all processing needed for weekly builds." />
0N/A
0N/A
0N/A
0N/A
0N/A <!-- The build target that should be used to build everything. -->
0N/A <target name="all"
0N/A depends="checkstyle,dsml,javadoc,coverage,test"
0N/A description="Build using all defined targets." />
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Remove all dynamically-generated build files. -->
0N/A <target name="clean"
0N/A description="Clean up any files generated during the build process">
0N/A
0N/A <delete dir="${build.dir}" />
0N/A <delete file="${dynconstants.file}" />
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Perform common initialization common to several targets. -->
0N/A <target name="init" depends="clean">
0N/A
0N/A <tstamp>
0N/A <format property="timestamp" pattern="yyyyMMddHHmmss" />
0N/A </tstamp>
0N/A
0N/A <condition property="DEBUG_BUILD" value="false">
0N/A <not>
0N/A <isset property="DEBUG_BUILD" />
0N/A </not>
0N/A </condition>
0N/A
0N/A <condition property="MEM" value="128M">
0N/A <not>
0N/A <isset property="MEM" />
0N/A </not>
0N/A </condition>
0N/A
0N/A
0N/A <!--
0N/A ! For some reason, some Apple VMs put quotes around the value of the
0N/A ! java.vm.vendor property, which wreaks havoc with DynamicConstants. This
0N/A ! pair of conditions attempts to work around that by detecting the quote
0N/A ! and surrounding the value with backslashes.
0N/A ! -->
0N/A <condition property="JVM_VENDOR" value="Apple Computer">
0N/A <contains string="${java.vm.vendor}" substring="Apple Computer"
0N/A casesensitive="false" />
0N/A </condition>
0N/A
0N/A <condition property="JVM_VENDOR" value="${java.vm.vendor}">
0N/A <not>
0N/A <isset property="JVM_VENDOR" />
0N/A </not>
0N/A </condition>
0N/A
0N/A
0N/A <!-- Generate the DynamicConstants.java file. -->
0N/A <echo file="${dynconstants.file}">/*
0N/A * CDDL HEADER START
0N/A *
0N/A * The contents of this file are subject to the terms of the
0N/A * Common Development and Distribution License, Version 1.0 only
0N/A * (the "License"). You may not use this file except in compliance
0N/A * with the License.
0N/A *
0N/A * You can obtain a copy of the license at
0N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/A * See the License for the specific language governing permissions
0N/A * and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL HEADER in each
0N/A * file and include the License file at
0N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/A * add the following below this CDDL HEADER, with the fields enclosed
0N/A * by brackets "[]" replaced with your own identifying * information:
0N/A * Portions Copyright [yyyy] [name of copyright owner]
0N/A *
0N/A * CDDL HEADER END
0N/A *
0N/A *
0N/A * Portions Copyright 2006 Sun Microsystems, Inc.
0N/A */
0N/Apackage org.opends.server.util;
0N/A
0N/A/**
0N/A * This file contains a number of constants that are used throughout the
0N/A * Directory Server source. It was dynamically generated as part of the
0N/A * Directory Server build process and should not be edited directly.
0N/A */
0N/Apublic class DynamicConstants
0N/A{
0N/A /**
0N/A * The official full product name for the Directory Server.
0N/A */
0N/A public static final String PRODUCT_NAME = "${PRODUCT_NAME}";
0N/A
0N/A /**
0N/A * The short product name for the Directory Server.
0N/A */
0N/A public static final String SHORT_NAME = "${SHORT_NAME}";
0N/A
0N/A /**
0N/A * The major version number for the Directory Server.
0N/A */
0N/A public static final int MAJOR_VERSION = ${MAJOR_VERSION};
0N/A
0N/A /**
0N/A * The minor version number for the Directory Server.
0N/A */
0N/A public static final int MINOR_VERSION = ${MINOR_VERSION};
0N/A
0N/A /**
0N/A * The point version number for the Directory Server.
0N/A */
0N/A public static final int POINT_VERSION = ${POINT_VERSION};
0N/A
0N/A /**
0N/A * The version qualifier string for the Directory Server.
0N/A */
0N/A public static final String VERSION_QUALIFIER = "${VERSION_QUALIFIER}";
0N/A
0N/A /**
0N/A * The set of bug IDs for fixes included in this build of the Directory
0N/A * Server.
0N/A */
0N/A public static final String FIX_IDS = "${FIX_IDS}";
0N/A
0N/A /**
0N/A * The build ID for the generated build of the Directory Server.
0N/A */
0N/A public static final String BUILD_ID = "${timestamp}";
0N/A
0N/A /**
0N/A * The username of the user that created this build.
0N/A */
0N/A public static final String BUILD_USER = "${user.name}";
0N/A
0N/A /**
0N/A * The Java version used to generate this build.
0N/A */
0N/A public static final String BUILD_JAVA_VERSION = "${java.version}";
0N/A
0N/A /**
0N/A * The vendor for the Java version used to generate this build.
0N/A */
0N/A public static final String BUILD_JAVA_VENDOR = "${java.vendor}";
0N/A
0N/A /**
0N/A * The JVM version used to generate this build.
0N/A */
0N/A public static final String BUILD_JVM_VERSION = "${java.vm.version}";
0N/A
0N/A /**
0N/A * The vendor for the JVM used to generate this build.
0N/A */
0N/A public static final String BUILD_JVM_VENDOR = "${JVM_VENDOR}";
0N/A
0N/A /**
0N/A * The operating system on which this build was generated.
0N/A */
0N/A public static final String BUILD_OS = "${os.name} ${os.version} ${os.arch}";
0N/A
0N/A /**
0N/A * Indicates whether this is a debug build of the Directory Server that may
0N/A * include additional debugging facilities not available in standard release
0N/A * versions.
0N/A */
0N/A public static final boolean DEBUG_BUILD = ${DEBUG_BUILD};
0N/A}
0N/A
0N/A</echo>
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Ensure that the source code meets basic style requirements. -->
0N/A <target name="checkstyle" description="Perform basic source style checks">
0N/A
0N/A <taskdef resource="checkstyletask.properties"
0N/A classpath="${checkstyle.dir}/checkstyle-all-4.1.jar" />
0N/A
0N/A <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
0N/A failOnViolation="true">
0N/A <fileset dir="${src.dir}" includes="**/*.java" />
0N/A <formatter type="plain" />
0N/A </checkstyle>
0N/A
0N/A <checkstyle config="${checkstyle.dir}/opends-doctarget-checkstyle.xml"
0N/A failOnViolation="true">
0N/A <fileset dir="${src.dir}/org/opends/server/api" includes="**/*.java" />
0N/A <fileset dir="${src.dir}/org/opends/server/protocols/internal"
0N/A includes="**/*.java" />
0N/A <fileset dir="${src.dir}/org/opends/server/types"
0N/A includes="**/*.java" />
0N/A <formatter type="plain" />
0N/A </checkstyle>
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Compile the Directory Server source files. -->
0N/A <target name="compile" depends="init"
0N/A description="Compile the Directory Server source files.">
0N/A
0N/A <mkdir dir="${classes.dir}" />
0N/A
0N/A <javac srcdir="${src.dir}" destdir="${classes.dir}" optimize="true"
0N/A debug="on" debuglevel="lines,source" source="1.5" target="1.5"
0N/A deprecation="true" fork="true" memoryInitialSize="${MEM}"
0N/A memoryMaximumSize="${MEM}">
0N/A <compilerarg value="-Xlint:all" />
0N/A
0N/A <classpath>
0N/A <fileset dir="${lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A </classpath>
0N/A </javac>
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!--
0N/A ! Rebuild the Directory Server without destorying any existing configuration
0N/A ! or data. It will only overwrite the libraries, classes, and scripts, and
0N/A ! it will not re-package. It will also not do a complete initialization, so
0N/A ! DynamicConstants.java won't be regenerated.
0N/A ! -->
0N/A <target name="rebuild"
0N/A description="Rebuild the server without destroying config or data.">
0N/A
0N/A <!-- Set the amount of memory to use for the build -->
0N/A <condition property="MEM" value="128M">
0N/A <not>
0N/A <isset property="MEM" />
0N/A </not>
0N/A </condition>
0N/A
0N/A <!-- Set properties needed to find the packaged files -->
0N/A <property name="pkgversion"
0N/A value="${MAJOR_VERSION}.${MINOR_VERSION}${VERSION_QUALIFIER}" />
0N/A <property name="pdir"
0N/A location="${package.dir}/OpenDS-${pkgversion}" />
0N/A
0N/A <!-- Clean up a minimal set of files/directories for the rebuild. -->
0N/A <delete dir="${classes.dir}" />
0N/A <delete file="${package.dir}/lib/OpenDS.jar" />
0N/A <delete file="${pdir}.zip" />
0N/A
0N/A <!-- Recreate the classes directory and recompile into it. -->
0N/A <mkdir dir="${classes.dir}" />
0N/A <javac srcdir="${src.dir}" destdir="${classes.dir}" optimize="true"
0N/A debug="on" debuglevel="lines,source" source="1.5" target="1.5"
0N/A deprecation="true" fork="true" memoryInitialSize="${MEM}"
0N/A memoryMaximumSize="${MEM}">
0N/A <compilerarg value="-Xlint:all" />
0N/A
0N/A <classpath>
0N/A <fileset dir="${lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A </classpath>
0N/A </javac>
0N/A
0N/A <!-- Generate the OpenDS.jar file -->
0N/A <jar jarfile="${pdir}/lib/OpenDS.jar"
0N/A basedir="${classes.dir}" compress="true" index="true" />
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Populate the Directory Server package, but don't zip it up. -->
0N/A <target name="prepackage" depends="compile"
0N/A description="Prepare the Directory Server package structure.">
0N/A
0N/A <property name="pkgversion"
0N/A value="${MAJOR_VERSION}.${MINOR_VERSION}${VERSION_QUALIFIER}" />
0N/A <property name="pdir"
0N/A location="${package.dir}/OpenDS-${pkgversion}" />
0N/A
0N/A <mkdir dir="${pdir}" />
0N/A <mkdir dir="${pdir}/bak" />
0N/A <mkdir dir="${pdir}/bin" />
0N/A <mkdir dir="${pdir}/classes" />
0N/A <mkdir dir="${pdir}/config" />
0N/A <mkdir dir="${pdir}/config/schema" />
0N/A <mkdir dir="${pdir}/config/messages" />
0N/A <mkdir dir="${pdir}/db" />
0N/A <mkdir dir="${pdir}/changelogDb" />
0N/A <mkdir dir="${pdir}/ldif" />
29N/A <mkdir dir="${pdir}/legal-notices" />
0N/A <mkdir dir="${pdir}/lib" />
0N/A <mkdir dir="${pdir}/locks" />
0N/A <mkdir dir="${pdir}/logs" />
0N/A <mkdir dir="${pdir}/war" />
0N/A
0N/A <jar jarfile="${pdir}/lib/OpenDS.jar"
0N/A basedir="${classes.dir}" compress="true" index="true" />
0N/A
0N/A <copy todir="${pdir}/lib">
0N/A <fileset file="${lib.dir}/*.jar" />
0N/A </copy>
0N/A
0N/A <copy todir="${pdir}/bin">
0N/A <fileset file="${scripts.dir}/*" />
0N/A </copy>
0N/A
0N/A <copy todir="${pdir}/config">
0N/A <fileset file="${config.dir}/*" />
0N/A </copy>
0N/A
0N/A <copy todir="${pdir}/config/schema">
0N/A <fileset dir="${resource.dir}/schema" />
0N/A </copy>
0N/A
0N/A <copy todir="${pdir}/config/messages">
0N/A <fileset dir="${resource.dir}/messages" />
0N/A </copy>
0N/A
29N/A <copy todir="${pdir}/legal-notices">
29N/A <fileset dir="${resource.dir}/legal-notices" />
29N/A </copy>
29N/A
29N/A <copy todir="${pdir}">
29N/A <fileset file="${resource.dir}/README" />
29N/A </copy>
29N/A
84N/A <copy todir="${pdir}">
84N/A <fileset file="${resource.dir}/setup.sh" />
84N/A </copy>
84N/A
84N/A <copy todir="${pdir}">
84N/A <fileset file="${resource.dir}/setup.bat" />
84N/A </copy>
84N/A
84N/A <chmod file="${pdir}/*.sh" perm="755" />
0N/A <chmod file="${pdir}/bin/*.sh" perm="755" />
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Package the Directory Server for distribution. -->
0N/A <target name="package" depends="prepackage"
0N/A description="Package the Directory Server for distribution.">
0N/A
0N/A <zip destfile="${package.dir}/OpenDS-${pkgversion}.zip">
0N/A <zipfileset dir="${package.dir}" includes="**/*" excludes="**/*.sh"
0N/A filemode="644" dirmode="755" />
0N/A <zipfileset dir="${package.dir}" includes="**/*.sh" filemode="755"
0N/A dirmode="755" />
0N/A </zip>
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Prepare the Directory Server DSML library. -->
0N/A <target name="predsml" depends="prepackage"
0N/A description="Prepare the Directory Server DSML library.">
0N/A
0N/A <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
0N/A <classpath>
0N/A <fileset dir="${dsml.lib.dir}">
0N/A <include name="**/*.jar" />
0N/A </fileset>
0N/A </classpath>
0N/A </taskdef>
0N/A
0N/A <mkdir dir="${dsml.gen.dir}/org/opends/dsml/protocol" />
0N/A <xjc target="${dsml.gen.dir}" schema="${dsml.dir}/schema/DSMLv2.xsd"
0N/A removeOldOutput="yes" package="org.opends.dsml.protocol">
0N/A <produces dir="${dsml.gen.dir}/org/opends/dsml/protocol"
0N/A includes="* impl/*" />
0N/A </xjc>
0N/A
0N/A <mkdir dir="${dsml.classes.dir}" />
0N/A
0N/A <javac srcdir="${dsml.gen.dir}" destdir="${dsml.classes.dir}"
0N/A optimize="true" debug="on" debuglevel="lines,source" source="1.5"
0N/A target="1.5" deprecation="true" fork="true" memoryInitialSize="${MEM}"
0N/A memoryMaximumSize="${MEM}">
0N/A <compilerarg value="-Xlint:all" />
0N/A
0N/A <classpath>
0N/A <fileset dir="${dsml.lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A </classpath>
0N/A </javac>
0N/A
0N/A <javac srcdir="${dsml.src.dir}" destdir="${dsml.classes.dir}"
0N/A optimize="true" debug="on" debuglevel="lines,source" source="1.5"
0N/A target="1.5" deprecation="true" fork="true" memoryInitialSize="${MEM}"
0N/A memoryMaximumSize="${MEM}">
0N/A <compilerarg value="-Xlint:all" />
0N/A
0N/A <classpath>
0N/A <fileset dir="${dsml.lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A
0N/A <dirset dir="${classes.dir}" />
0N/A </classpath>
0N/A </javac>
0N/A
0N/A <war destfile="${classes.dir}/dsml.war"
0N/A webxml="${dsml.dir}/webapp/web.xml">
0N/A <fileset file="${dsml.dir}/webapp/server.properties" />
0N/A
0N/A <webinf dir="${dsml.dir}/webapp" includes="**/*"
0N/A excludes="web.xml, **/*.jar, **/*.properties" />
0N/A
0N/A <classes dir="${dsml.classes.dir}" />
0N/A
0N/A <lib dir="${dsml.lib.dir}">
0N/A <exclude name="j2ee.jar" />
0N/A </lib>
0N/A
0N/A <lib dir="${pdir}/lib">
0N/A <exclude name="activation.jar" />
0N/A <exclude name="je.jar" />
0N/A </lib>
0N/A </war>
0N/A
0N/A <copy todir="${pdir}/war">
0N/A <fileset file="${classes.dir}/*.war" />
0N/A </copy>
0N/A </target>
0N/A
0N/A
0N/A
0N/A
0N/A <!-- Generate JavaDoc documentation from the source files -->
1N/A <target name="javadoc" depends="dsml"
0N/A description="Generate JavaDoc documentation.">
0N/A
0N/A <mkdir dir="${javadoc.dir}" />
0N/A
0N/A <javadoc destdir="${javadoc.dir}" source="1.5" additionalparam="-quiet"
0N/A linksource="yes" windowtitle="${PRODUCT_NAME} API Documentation"
0N/A maxmemory="${MEM}">
0N/A <classpath>
0N/A <fileset dir="${lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A
0N/A <fileset dir="${dsml.lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A
0N/A <dirset dir="${classes.dir}" />
0N/A <dirset dir="${dsml.classes.dir}" />
0N/A </classpath>
0N/A
0N/A <packageset dir="${src.dir}" />
0N/A <packageset dir="${dsml.src.dir}" />
0N/A </javadoc>
0N/A </target>
0N/A
0N/A
0N/A
0N/A <!-- Prepare to generate a code coverage report. -->
0N/A <target name="coverage" description="Generate a code coverage report.">
0N/A
0N/A <property name="coverage.enabled" value="true" />
0N/A
0N/A <mkdir dir="${coverage.dir}" />
0N/A <mkdir dir="${coverage.data.dir}" />
0N/A <mkdir dir="${coverage.instr.dir}" />
0N/A <mkdir dir="${coverage.report.dir}" />
0N/A
0N/A <path id="run.classpath">
0N/A <pathelement location="${classes.dir}" />
0N/A </path>
0N/A </target>
0N/A
0N/A
0N/A
21N/A <!-- Prepare to execute the Directory Server TestNG unit tests. -->
0N/A <target name="testinit" depends="compile"
0N/A description="Prepare to execute the Directory Server TestNG unit tests.">
0N/A
0N/A <!-- If we are to perform coverage tests, then set that up. -->
0N/A <path id="emma.lib">
0N/A <pathelement location="${emma.dir}/emma.jar" />
0N/A <pathelement location="${emma.dir}/emma_ant.jar" />
0N/A </path>
0N/A
0N/A <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
0N/A
0N/A <emma enabled="${coverage.enabled}">
0N/A <instr instrpathref="run.classpath" destdir="${coverage.instr.dir}"
0N/A metadatafile="${coverage.data.dir}/metadata.emma" merge="true" />
0N/A </emma>
0N/A
0N/A <!-- Compile the test cases -->
0N/A <mkdir dir="${unittest.classes.dir}" />
0N/A <javac srcdir="${unittest.testng.src.dir}" destdir="${unittest.classes.dir}"
0N/A optimize="true" debug="on" debuglevel="lines,source" source="1.5"
0N/A target="1.5" deprecation="true" fork="true" memoryInitialSize="${MEM}"
0N/A memoryMaximumSize="${MEM}">
0N/A <compilerarg value="-Xlint:all" />
0N/A
0N/A <classpath>
0N/A <fileset dir="${lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A
0N/A <fileset dir="${testng.lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A
0N/A <path refid="run.classpath" />
0N/A </classpath>
0N/A </javac>
0N/A </target>
0N/A
21N/A
21N/A
0N/A <!-- Execute the Directory Server TestNG unit tests in text mode. -->
21N/A <target name="test"
21N/A depends="testinit"
0N/A description="Execute the Directory Server TestNG unit tests in text mode.">
0N/A <mkdir dir="${unittest.report.dir}" />
0N/A
0N/A <taskdef resource="testngtasks">
0N/A <classpath>
0N/A <fileset dir="${testng.lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A </classpath>
0N/A </taskdef>
0N/A
0N/A <testng outputdir="${unittest.report.dir}" haltonfailure="true"
0N/A enableAssert="false">
0N/A <classpath>
0N/A <pathelement location="${coverage.instr.dir}" />
0N/A
0N/A <path refid="run.classpath" />
42N/A <path refid="emma.lib" />
0N/A
0N/A <fileset dir="${lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A
0N/A <fileset dir="${testng.lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A
0N/A <pathelement location="${unittest.classes.dir}" />
0N/A </classpath>
42N/A <jvmarg value="-Demma.coverage.out.file=${coverage.data.dir}/coverage.emma" />
42N/A <jvmarg value="-Demma.coverage.out.merge=false" />
0N/A <xmlfileset dir="${testng.dir}" includes="testng.xml" />
0N/A </testng>
42N/A
42N/A <emma enabled="${coverage.enabled}" >
42N/A <report sourcepath="${srcdir}" >
42N/A <!-- <property name="verbosity.level" value="verbose" /> -->
42N/A <fileset dir="${coverage.data.dir}" >
42N/A <include name="*.emma" />
42N/A </fileset>
42N/A
42N/A <txt outfile="${coverage.report.dir}/coverage.txt" />
42N/A <html outfile="${coverage.report.dir}/index.html" />
42N/A </report>
42N/A </emma>
42N/A
0N/A </target>
0N/A
21N/A
21N/A
21N/A <target name="testreport"
21N/A depends="test"
0N/A description="Takes testng results and convert them into JUnit compatible xml">
0N/A <junitreport todir="${unittest.report.dir}">
0N/A <fileset dir="${unittest.report.dir}">
0N/A <include name="*.xml"/>
0N/A </fileset>
0N/A
0N/A <report format="noframes" todir="${unittest.report.dir}"/>
0N/A </junitreport>
0N/A </target>
0N/A
51N/A
51N/A <target name="integration-tests"
51N/A description="Builds the integration tests">
51N/A <ant dir="${basedir}/tests/integration-tests-testng">
51N/A </ant>
51N/A </target>
51N/A
0N/A</project>
0N/A