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 !
6983N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6983N/A ! or http://forgerock.org/license/CDDLv1.0.html.
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
6983N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6983N/A ! If applicable, add the following below this CDDL HEADER, with the
6983N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6983N/A ! information:
0N/A ! Portions Copyright [yyyy] [name of copyright owner]
0N/A !
0N/A ! CDDL HEADER END
0N/A !
0N/A !
5037N/A ! Copyright 2006-2010 Sun Microsystems, Inc.
7318N/A ! Portions Copyright 2011-2015 ForgeRock AS
6238N/A ! Portions Copyright 2012 Delta Victor Consultants
0N/A ! -->
0N/A
6133N/A<project name="Directory Server" basedir="." default="package"
6133N/A xmlns:ivy="antlib:org.apache.ivy.ant">
0N/A <description>
5422N/A This is the build script for OpenDJ. See the BUILDING
0N/A file in this directory for build instructions.
0N/A </description>
0N/A
3012N/A <!-- Build JVM properties -->
5040N/A <property name="MEM" value="512M"/>
3381N/A
3349N/A <!-- Build OpenDMK properties -->
3349N/A <property file="build.properties"/>
3012N/A
1083N/A <!-- General server-wide properties -->
1083N/A <property name="src.dir" location="src/server" />
1083N/A <property name="build.dir" location="build" />
1083N/A <property name="classes.dir" location="${build.dir}/classes" />
4156N/A <property name="build.lib.dir" location="${build.dir}/lib" />
1083N/A <property name="lib.dir" location="lib" />
1083N/A <property name="ext.dir" location="ext" />
1083N/A <property name="package.dir" location="${build.dir}/package" />
1083N/A <property name="javadoc.dir" location="${build.dir}/javadoc" />
3090N/A <property name="docgen.dir" location="${build.dir}/docgen" />
3090N/A <property name="configguide.dir" location="${docgen.dir}/configuration_guide" />
3214N/A <property name="configguideldap.dir" location="${docgen.dir}/configuration_guide_with_ldap_mapping" />
5481N/A <property name="wiki.home" value="https://wikis.forgerock.org/confluence/display/opendj/Home"/>
1083N/A <property name="resource.dir" location="resource" />
1083N/A <property name="scripts.dir" location="${resource.dir}/bin" />
1083N/A <property name="config.dir" location="${resource.dir}/config" />
1083N/A <property name="build.debuglevel" value="lines,vars,source" />
6133N/A <property name="ivy.install.version" value="2.3.0"/>
6133N/A <property name="ivy.jar.file" value="${ext.dir}/ivy.jar"/>
6157N/A <!-- example command line to invoke for building offline:
6157N/A ant resolve -Dbuild.offline=
6157N/A -->
6157N/A <condition property="ivy.checkmodified" value="false" else="true">
6157N/A <isset property="build.offline"/>
6157N/A </condition>
6157N/A <condition property="ivy.changingpattern" value="" else=".*-SNAPSHOT">
6157N/A <isset property="build.offline"/>
6157N/A </condition>
233N/A
712N/A <!-- Properties for build tools -->
1177N/A <property name="buildtools.src.dir" location="src/build-tools" />
564N/A <property name="buildtools.classes.dir" location="${build.dir}/build-tools/classes" />
6976N/A <property name="buildtools.jar" location="${build.dir}/build-tools/build-tools.jar" />
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"
712N/A location="${unittest.testng.dir}/src/server"/>
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"/>
233N/A <property name="unittest.resource.dir"
233N/A location="${build.dir}/unit-tests/resource"/>
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
567N/A <!-- Properties for use with the Quick Setup. -->
567N/A <property name="quicksetup.src.dir" location="src/quicksetup" />
567N/A <property name="quicksetup.classes.dir"
567N/A location="${build.dir}/quicksetup/classes" />
2046N/A <property name="quicksetup.globalcompile.classes.dir"
2046N/A location="${classes.dir}/org/opends/quicksetup" />
1210N/A <property name="ads.src.dir" location="src/ads" />
2033N/A <property name="ads.classes.dir" location="${classes.dir}/org/opends/admin/ads"/>
712N/A
5614N/A <!-- Properties for use with the GUI Tools that go in OpenDJ jar. -->
2046N/A <property name="guitools.src.dir" location="src/guitools" />
712N/A
675N/A <!-- Properties for coverage diff reports -->
5058N/A <property name="cvgdiff.dir" location="${build.dir}/diff" />
712N/A <property name="cvgdiff.report.dir"
675N/A location="${cvgdiff.dir}/report" />
567N/A
0N/A <!-- Properties for code coverage testing. -->
5058N/A <property name="coverage.dir" location="${build.dir}/coverage" />
712N/A <property name="coverage.report.dir"
422N/A location="${coverage.dir}/reports/unit" />
0N/A <property name="coverage.instr.dir"
422N/A location="${coverage.dir}/instrumentedcode" />
0N/A <property name="coverage.data.dir"
422N/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
902N/A <!-- Properties for the AspectJ tools -->
902N/A <property name="aj.dir" location="${ext.dir}/aspectj" />
902N/A <property name="aj.lib.dir" location="${aj.dir}/lib" />
902N/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
233N/A <!-- Properties for the ANT build tool. -->
233N/A <property name="ant.dir" location="${ext.dir}/ant" />
233N/A <property name="ant.lib.dir" location="${ant.dir}/lib" />
233N/A
730N/A <!-- Properties for the checkstyle tool. -->
730N/A <property name="checkstyle.dir" location="${ext.dir}/checkstyle" />
730N/A <property name="checkstyle.cache.dir" location=".checkstyle-cache" />
0N/A
729N/A <!-- Properties for the SVNKit tool. -->
729N/A <property name="svnkit.dir" location="${ext.dir}/svnkit" />
7302N/A <property name="svnkit.lib.dir" location="${ext.dir}/svnkit/lib" />
729N/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" />
110N/A <property name="dynconstants.stubfile"
110N/A location="${resource.dir}/DynamicConstants.java.stubs" />
121N/A
699N/A
0N/A <property file="PRODUCT" />
0N/A
1008N/A <!-- Properties for administration framework code generation. -->
1008N/A <property name="admin.defn.dir" location="src/admin/defn" />
1008N/A <property name="admin.src.dir" location="src/admin/generated" />
1008N/A <property name="admin.rules.dir" location="resource/admin" />
3214N/A <property name="configguide.resource.dir" location="resource/admin/config-guide" />
3381N/A
2086N/A <!-- Properties for generating messages. -->
3646N/A <property name="msg.dir" location="src/messages" />
3646N/A <property name="msg.prop.dir" location="${msg.dir}/messages" />
3646N/A <property name="msg.javagen.dir" location="${msg.dir}/generated" />
5947N/A <property name="msg.logref.dir" location="${docgen.dir}/logref" />
2086N/A <property name="msg.package.dir" location="${classes.dir}/messages" />
3646N/A <property name="msg.src.dir" location="${msg.dir}/src" />
1177N/A
3980N/A <!-- Properties for L10n for generating messages. -->
3980N/A <property name="msgl10n.prop.dir" location="src/admin/messages/" />
5058N/A <property name="msgl10n.diff.dir" location="${build.dir}/l10nmsg/" />
3980N/A
3980N/A
3349N/A <!-- Properties for SNMP extension. -->
3349N/A <property name="snmp.mib.dir" location="src/snmp/resource/mib" />
3349N/A <property name="snmp.security.dir" location="src/snmp/resource/security" />
3349N/A <property name="snmp.config.dir" location="src/snmp/resource/config" />
4686N/A <property name="snmp.resource.dir" location="src/snmp/resource" />
3349N/A <property name="snmp.gen.dir" location="src/snmp/generated" />
3349N/A <property name="snmp.src.dir" location="src/snmp/src" />
3381N/A <property name="snmp.classes.dir"
3349N/A location="${classes.dir}/org/opends/server/snmp" />
6608N/A
6374N/A
6374N/A <!-- Properties for license inclusion. -->
6374N/A <condition property="include.license.file">
6374N/A <available file="${license.file}" type="file" />
6374N/A </condition>
6374N/A <fail message="The license file '${license.file}' could not be found">
6374N/A <condition>
6374N/A <and>
6374N/A <isset property="license.file"/>
6374N/A <length string="${license.file}" trim="true" when="greater" length="0"/>
6374N/A <isfalse value="${include.license.file}"/>
6374N/A </and>
6374N/A </condition>
6374N/A </fail>
6158N/A
6571N/A <!-- Allow platform-specific checks. -->
6571N/A <condition property="build.windows">
6571N/A <os family="windows"/>
6571N/A </condition>
6571N/A
6917N/A <!-- sort-of Maven like properties for opendj dependencies -->
6917N/A <fileset id="opendj.runtime.jars" dir="${lib.dir}/compile" />
6917N/A <fileset id="opendj.test.jars" dir="${lib.dir}/test" />
6158N/A
5713N/A <!-- Prevent ant runtime from being included on classpath during
6162N/A compilation. -->
5713N/A <presetdef name="javac">
5902N/A <javac optimize="true" includeantruntime="false"
6280N/A source="1.6" target="1.6"
5902N/A debug="on" debuglevel="${build.debuglevel}"
5902N/A deprecation="true" fork="true"
5902N/A memoryInitialSize="${MEM}" memoryMaximumSize="${MEM}">
5902N/A <compilerarg value="-Xlint:all" />
5902N/A <compilerarg value="-Xlint:-rawtypes" />
5902N/A <compilerarg value="-Xlint:-static" />
5902N/A <compilerarg value="-Xlint:-unchecked" />
5902N/A </javac>
5713N/A </presetdef>
3381N/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>
3381N/A
5058N/A <target name="initPrecommit">
5058N/A <property name="isPrecommit" value="true"/>
5058N/A </target>
3381N/A
0N/A <!-- The build target that should be used before committing code. -->
5058N/A <target name="precommit" depends="initPrecommit,clean,dynamicconstants,
5896N/A checkstyle,checkprecommit,dsml,test"
1177N/A description="Perform all processing needed before committing code.">
1177N/A </target>
0N/A
0N/A <!-- The build target that should be used for nightly builds. -->
0N/A <target name="nightly"
3853N/A depends="nightlybuild,nightlytests"
1177N/A description="Perform all processing needed for nightly builds.">
1177N/A </target>
0N/A
3853N/A <!-- The build target that should be used for build part of nightly builds. -->
3853N/A <target name="nightlybuild"
3853N/A depends="checkstyle,dsml,srczip,javadoc,docgen"
6917N/A description="Perform all processing related to build for nightly builds.">
3853N/A </target>
0N/A
3853N/A <!-- The build target that should be used for test part of nightly builds. -->
3853N/A <target name="nightlytests"
5896N/A depends="testall"
3853N/A description="Perform all processing related to unit tests for nightly builds.">
3853N/A </target>
0N/A
0N/A
0N/A <!-- The build target that should be used for weekly builds. -->
0N/A <target name="weekly" depends="nightly"
1177N/A description="Perform all processing needed for weekly builds.">
1177N/A </target>
0N/A
6919N/A <target name="prepare-release" depends="check-no-snapshot-dependencies,check-documentations-built-with-correct-url"
6916N/A description="Performs all the checks to prepare a release.">
6916N/A <echo>
6916N/APrevious checks succeeded.
6916N/A
6916N/APlease:
6916N/A1- Check the archive has no build number
6916N/A2- Check the archive contains the license
6916N/A3- Run the tests
6916N/A </echo>
6916N/A </target>
0N/A
6919N/A <target name="check-documentations-built-with-correct-url">
6919N/A <fail message="The documentation must be built with the correct URL. Incorrectly found 'opendj.forgerock.org' inside PRODUCT file.">
6919N/A <condition>
6919N/A <resourcecontains resource="PRODUCT" substring="opendj.forgerock.org" />
6919N/A </condition>
6919N/A </fail>
6919N/A </target>
3381N/A
3381N/A
0N/A <!-- The build target that should be used to build everything. -->
0N/A <target name="all"
5896N/A depends="checkstyle,clean,checkprecommit,dsml,srczip,javadoc,docgen,testall"
1177N/A description="Build using all defined targets.">
1177N/A </target>
0N/A
0N/A
2086N/A <target name="generatemessages" depends="buildtools">
2086N/A <typedef name="genmsg"
2086N/A classname="org.opends.build.tools.GenerateMessageFile" >
2086N/A <classpath>
2086N/A <fileset dir="${build.dir}/build-tools">
2086N/A <include name="*.jar" />
2086N/A </fileset>
2086N/A </classpath>
2086N/A </typedef>
2086N/A <!--
2086N/A <genmsg sourceProps="${msg.prop.dir}/xxx.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/XxxMessages.java">
2086N/A </genmsg>
2086N/A -->
2086N/A <genmsg sourceProps="${msg.prop.dir}/access_control.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/AccessControlMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/admin.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/AdminMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/admin_tool.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/AdminToolMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/backend.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/BackendMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/config.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/ConfigMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/core.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/CoreMessages.java">
2086N/A </genmsg>
2284N/A <genmsg sourceProps="${msg.prop.dir}/dsconfig.properties"
2284N/A destJava="${msg.javagen.dir}/org/opends/messages/DSConfigMessages.java">
2284N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/extension.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/ExtensionMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/jeb.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/JebMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/log.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/LoggerMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/plugin.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/PluginMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/protocol.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/ProtocolMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/quicksetup.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/QuickSetupMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/replication.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/ReplicationMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/schema.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/SchemaMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/task.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/TaskMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/tools.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/ToolMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/utility.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/UtilityMessages.java">
2086N/A </genmsg>
2086N/A <genmsg sourceProps="${msg.prop.dir}/version.properties"
2086N/A destJava="${msg.javagen.dir}/org/opends/messages/VersionMessages.java">
2086N/A </genmsg>
3034N/A <genmsg sourceProps="${msg.prop.dir}/runtime_information.properties"
3034N/A destJava="${msg.javagen.dir}/org/opends/messages/RuntimeMessages.java">
3034N/A </genmsg>
4156N/A
4156N/A </target>
0N/A
5947N/A
5947N/A <target name="generateLogReference" depends="buildtools">
5947N/A <typedef name="genlogref"
5947N/A classname="org.opends.build.tools.GenerateMessageFile" >
5947N/A <classpath>
5947N/A <fileset dir="${build.dir}/build-tools">
5947N/A <include name="*.jar" />
5947N/A </fileset>
5947N/A </classpath>
5947N/A </typedef>
5947N/A <!--
5947N/A <genlogref sourceProps="${msg.prop.dir}/xxx_yyy.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-xxx-yyy.xml"
5947N/A writelogref="true" />
5947N/A -->
5947N/A <genlogref sourceProps="${msg.prop.dir}/access_control.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-access-control.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/admin.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-admin.xml"
5947N/A writelogref="true" />
5947N/A <!-- Ignore admin tool messages while documenting only serious errors.
5947N/A <genlogref sourceProps="${msg.prop.dir}/admin_tool.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-admin-tool.xml"
5947N/A writelogref="true" />
5947N/A -->
5947N/A <genlogref sourceProps="${msg.prop.dir}/backend.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-backend.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/config.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-config.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/core.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-core.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/dsconfig.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-dsconfig.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/extension.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-extension.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/jeb.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-jeb.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/log.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-log.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/plugin.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-plugin.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/protocol.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-protocol.xml"
5947N/A writelogref="true" />
5947N/A <!-- Ignore QuickSetup messages that users handle interactively.
5947N/A <genlogref sourceProps="${msg.prop.dir}/quicksetup.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-quicksetup.xml"
5947N/A writelogref="true" />
5947N/A -->
5947N/A <genlogref sourceProps="${msg.prop.dir}/replication.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-replication.xml"
5947N/A writelogref="true" />
5947N/A <!-- Ignore runtime info messages while documenting only serious errors.
5947N/A <genlogref sourceProps="${msg.prop.dir}/runtime_information.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-runtime-information.xml"
5947N/A writelogref="true" />
5947N/A -->
5947N/A <genlogref sourceProps="${msg.prop.dir}/schema.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-schema.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/task.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-task.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/tools.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-tools.xml"
5947N/A writelogref="true" />
5947N/A <genlogref sourceProps="${msg.prop.dir}/utility.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-utility.xml"
5947N/A writelogref="true" />
5947N/A <!-- Ignore version messages while documenting only serious errors.
5947N/A <genlogref sourceProps="${msg.prop.dir}/version.properties"
5947N/A destJava="${msg.logref.dir}/log-ref-version.xml"
5947N/A writelogref="true" />
5947N/A -->
5947N/A
5947N/A <copy file="${resource.dir}/log-message-reference.xml"
5947N/A todir="${msg.logref.dir}" />
5947N/A </target>
5947N/A
0N/A <!-- Remove all dynamically-generated build files. -->
6133N/A <target name="clean" depends="init,cleanadmin,cleanmessages,cleansnmp,cleanlib"
0N/A description="Clean up any files generated during the build process">
0N/A
2342N/A <delete dir="${build.dir}" />
1008N/A <delete file="${dynconstants.file}" />
6238N/A <fileset dir="${lib.dir}">
6238N/A <include name="*.jar" />
6238N/A </fileset>
0N/A </target>
0N/A
0N/A
1177N/A
121N/A <!-- Perform common initialization common to several targets after cleaning out the previous build environment. -->
1177N/A <target name="cleaninit" depends="clean,init">
1177N/A </target>
1177N/A
0N/A
0N/A
1273N/A <!-- Set the property valid.java.version if the java version is valid. -->
1273N/A <target name="validjavaversion"
1273N/A depends="buildtools" >
1273N/A
5178N/A <property name="min.java.version" value="1.6.0_10" />
1273N/A
5038N/A <typedef name="validjavaversion"
1273N/A classname="org.opends.build.tools.ValidJavaVersion" >
1273N/A <classpath>
1273N/A <fileset dir="${build.dir}/build-tools">
1273N/A <include name="*.jar" />
1273N/A </fileset>
1273N/A </classpath>
1273N/A </typedef>
1273N/A
1273N/A <condition property="valid.java.version">
1273N/A <validjavaversion minVersion="${min.java.version}" />
1273N/A </condition>
1273N/A
1273N/A </target>
1273N/A
1273N/A <!-- Warn if the build java version is too old. -->
1273N/A <target name="checkjavaversion"
1273N/A depends="validjavaversion"
1273N/A unless="valid.java.version" >
1273N/A <echo level="warning"
1273N/A message="WARNING: Java version ${java.version} is too old."/>
1273N/A <echo level="warning"
1960N/A message="Java version ${min.java.version} or later is required to build ${SHORT_NAME}."/>
1273N/A </target>
1273N/A
5058N/A
0N/A <!-- Perform common initialization common to several targets. -->
121N/A <target name="init">
1177N/A
1177N/A <path id="run.classpath">
1177N/A <pathelement location="${classes.dir}" />
1177N/A </path>
1177N/A
1559N/A <path id="quickSetup.classpath">
1559N/A <pathelement location="${quicksetup.classes.dir}" />
1559N/A </path>
3381N/A
0N/A <tstamp>
1234N/A <format property="timestamp" pattern="yyyyMMddHHmmss'Z'"
1234N/A timezone="UTC" />
0N/A </tstamp>
0N/A
984N/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
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>
3381N/A
3349N/A <condition property="isopendmkpresent">
3349N/A <or>
3349N/A <and>
3349N/A <available file="${opendmk.lib.dir}/jdmkrt.jar"/>
3349N/A <available file="${opendmk.lib.dir}/jdmktk.jar"/>
3349N/A </and>
3349N/A <and>
3349N/A <available file="${ext.dir}/jdmkrt.jar"/>
3349N/A <available file="${ext.dir}/jdmktk.jar"/>
3349N/A </and>
3349N/A </or>
3349N/A </condition>
3381N/A
3853N/A <condition property="isadmingendirpresent">
3853N/A <available file="${admin.src.dir}" type="dir" />
3853N/A </condition>
3853N/A
3853N/A <condition property="ismsggendirpresent">
3853N/A <available file="${msg.javagen.dir}" type="dir" />
3853N/A </condition>
3853N/A
729N/A </target>
729N/A
729N/A
729N/A
729N/A
729N/A <!-- Build the DynamicConstants.java file and any of its dependencies. -->
729N/A <target name="dynamicconstants" depends="init,buildtools">
729N/A <!-- Get the revision number of the current Subversion workspace -->
729N/A <taskdef name="getsvnrevision"
729N/A classname="org.opends.build.tools.GetSubversionRevision">
729N/A <classpath>
729N/A <fileset dir="${build.dir}/build-tools">
729N/A <include name="*.jar" />
729N/A </fileset>
7302N/A <fileset dir="${svnkit.lib.dir}">
729N/A <include name="*.jar" />
729N/A </fileset>
729N/A </classpath>
729N/A </taskdef>
729N/A
729N/A <getsvnrevision property="REVISION_NUMBER" />
0N/A
4274N/A <!-- Get the url repo of the current Subversion workspace -->
4274N/A <taskdef name="getsvnurlrepo"
4274N/A classname="org.opends.build.tools.GetSubversionUrlRepo">
4274N/A <classpath>
4274N/A <fileset dir="${build.dir}/build-tools">
4274N/A <include name="*.jar" />
4274N/A </fileset>
7302N/A <fileset dir="${svnkit.lib.dir}">
4274N/A <include name="*.jar" />
4274N/A </fileset>
4274N/A </classpath>
4274N/A </taskdef>
4274N/A
4274N/A <getsvnurlrepo property="URL_REPOSITORY" />
4274N/A
0N/A
1344N/A <!-- Construct the version number string -->
1344N/A <taskdef name="getversionnumber"
1344N/A classname="org.opends.build.tools.CreateVersionString">
1344N/A <classpath>
1344N/A <fileset dir="${build.dir}/build-tools">
1344N/A <include name="*.jar" />
1344N/A </fileset>
1344N/A </classpath>
1344N/A </taskdef>
1344N/A
1344N/A <getversionnumber property="VERSION_NUMBER_STRING" />
1344N/A
1344N/A
109N/A <!-- Generate the DynamicConstants.java file.
109N/A Be warned that the .stubs file references the following properties
109N/A PRODUCT_NAME, SHORT_NAME, MAJOR_VERSION, MINOR_VERSION, POINT_VERSION,
109N/A VERSION_QUALIFIER, FIX_IDS, timestamp, user.name, java.version,
4274N/A java.vendor, java.vm.version, JVM_VENDOR, DEBUG_BUILD, REVISION_NUMBER,URL_REPOSITORY,
4760N/A VERSION_NUMBER_STRING
109N/A If you change the name of any of those properties in this build.xml
1238N/A you'll need to reflect the same change in the .stubs file
109N/A -->
1344N/A <condition property="BUILD_NUMBER" value="-1">
1344N/A <not>
1344N/A <isset property="BUILD_NUMBER" />
1344N/A </not>
1344N/A </condition>
1344N/A
110N/A <copy file="${dynconstants.stubfile}"
109N/A tofile="${dynconstants.file}"
109N/A overwrite="true" >
109N/A <filterchain>
109N/A <expandproperties/>
109N/A </filterchain>
109N/A </copy>
0N/A </target>
0N/A
0N/A
0N/A
0N/A
1344N/A <!-- Check modified files to see if any svn:eol-style or copyright updates
1344N/A are needed. -->
1344N/A <target name="checkprecommit" depends="buildtools"
1344N/A description="Ensure updated files eol-style and copyright info">
1344N/A <taskdef name="checkprecommit"
1344N/A classname="org.opends.build.tools.CheckPrecommit">
729N/A <classpath>
729N/A <fileset dir="${build.dir}/build-tools">
729N/A <include name="*.jar" />
729N/A </fileset>
7302N/A <fileset dir="${svnkit.lib.dir}">
729N/A <include name="*.jar" />
729N/A </fileset>
729N/A </classpath>
729N/A </taskdef>
729N/A
1344N/A <checkprecommit />
729N/A </target>
729N/A
729N/A
729N/A
0N/A <!-- Ensure that the source code meets basic style requirements. -->
0N/A <target name="checkstyle" description="Perform basic source style checks">
5044N/A <antcall target="displayjavaversion"/>
730N/A <mkdir dir="${checkstyle.cache.dir}" />
0N/A
0N/A <taskdef resource="checkstyletask.properties"
0N/A classpath="${checkstyle.dir}/checkstyle-all-4.1.jar" />
567N/A
662N/A <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
0N/A failOnViolation="true">
2086N/A <fileset dir="${src.dir}">
2086N/A <include name="**/*.java"/>
2086N/A <exclude name="**/PublicAPI.java" />
2086N/A </fileset>
2086N/A <formatter type="plain" />
2086N/A </checkstyle>
2086N/A
2086N/A <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
2086N/A failOnViolation="true">
2086N/A <fileset dir="${msg.src.dir}" includes="**/*.java" />
0N/A <formatter type="plain" />
0N/A </checkstyle>
662N/A
1210N/A <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
1210N/A failOnViolation="true">
1210N/A <fileset dir="${ads.src.dir}" includes="**/*.java" />
1210N/A <formatter type="plain" />
1210N/A </checkstyle>
1210N/A
567N/A <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
567N/A failOnViolation="true">
3387N/A <fileset dir="${snmp.src.dir}" includes="**/*.java" />
3387N/A <formatter type="plain" />
3387N/A </checkstyle>
3387N/A
3387N/A <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
3387N/A failOnViolation="true">
567N/A <fileset dir="${quicksetup.src.dir}" includes="**/*.java" />
563N/A <formatter type="plain" />
567N/A </checkstyle>
712N/A
712N/A <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
730N/A failOnViolation="true">
2033N/A <fileset dir="${guitools.src.dir}" includes="**/*.java" />
712N/A <formatter type="plain" />
712N/A </checkstyle>
0N/A
3381N/A <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml"
3381N/A failOnViolation="true">
3381N/A <fileset dir="${dsml.src.dir}" includes="**/*.java" />
3381N/A <formatter type="plain" />
3381N/A </checkstyle>
3381N/A
114N/A <checkstyle config="${checkstyle.dir}/opends-unittest-checkstyle.xml"
114N/A failOnViolation="true">
114N/A <fileset dir="${unittest.testng.src.dir}" includes="**/*.java" />
114N/A <formatter type="plain" />
114N/A </checkstyle>
0N/A </target>
0N/A
0N/A
0N/A
729N/A <target name="cleancompile"
4760N/A depends="cleaninit,compilequicksetup"
121N/A description="Recompile the Directory Server source files.">
121N/A </target>
1210N/A
6210N/A <target name="generatesources"
6210N/A depends="dynamicconstants,generatemessages,generateadmin"
6210N/A description="Generate all the sources.">
6210N/A </target>
6210N/A
6817N/A <!-- This target retrieves the libs, and generates the sources -->
6817N/A <target name="eclipse" depends="resolve,generatesources,copymessages"
6817N/A description="Set up all the files and directories required for the Eclipse project">
6817N/A <copy todir=".eclipse-build">
6817N/A <fileset dir="${classes.dir}">
6817N/A <include name="admin/**" />
6817N/A <include name="messages/**" />
6817N/A </fileset>
6817N/A </copy>
6817N/A <echo>Refresh the OpenDJ server project in Eclipse: Select the OpenDJ server project and press 'F5' key</echo>
6817N/A </target>
6817N/A
121N/A <target name="compile"
6210N/A depends="init,checkjavaversion,generatesources,resolve"
0N/A description="Compile the Directory Server source files.">
0N/A <mkdir dir="${classes.dir}" />
4156N/A <mkdir dir="${build.lib.dir}" />
4156N/A
2095N/A <javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
5902N/A destdir="${classes.dir}">
0N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
2046N/A <fileset dir="${build.dir}/build-tools">
2033N/A <include name="build-tools.jar" />
2046N/A </fileset>
4156N/A <fileset dir="${build.lib.dir}">
4156N/A <include name="*.jar" />
4156N/A </fileset>
0N/A </classpath>
0N/A </javac>
1607N/A
1607N/A <copy todir="${classes.dir}">
1607N/A <fileset dir="${src.dir}" includes="**/*.properties" />
2033N/A <fileset dir="${quicksetup.src.dir}" includes="**/*.properties, **/*.gif, **/*.png" />
2033N/A <fileset dir="${guitools.src.dir}" includes="**/*.properties, **/*.gif, **/*.png" />
1607N/A </copy>
0N/A </target>
0N/A
1177N/A
1177N/A
567N/A <!-- Compile the Quick Setup source files. -->
1559N/A <target name="compilequicksetup" depends="buildtools,compile"
567N/A description="Compile the Quick Setup source files.">
567N/A <mkdir dir="${quicksetup.classes.dir}" />
5902N/A <javac srcdir="${ads.src.dir}" destdir="${quicksetup.classes.dir}">
1210N/A <classpath>
1210N/A <fileset dir="${build.dir}/build-tools">
1210N/A <include name="build-tools.jar" />
1210N/A </fileset>
1210N/A <pathelement path="${classes.dir}"/>
1210N/A </classpath>
1210N/A </javac>
5902N/A <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}">
1008N/A <include name="**/org/opends/server/util/SetupUtils.java"/>
1210N/A <include name="**/org/opends/server/util/CertificateManager.java"/>
1008N/A <include name="**/org/opends/server/util/DynamicConstants.java"/>
1008N/A <include name="**/org/opends/server/types/OperatingSystem.java"/>
2086N/A <include name="**/org/opends/messages/Message.java"/>
5902N/A <include name="**/org/opends/messages/MessageBuilder.java"/>
2086N/A <include name="**/org/opends/messages/MessageDescriptor.java"/>
2086N/A <include name="**/org/opends/messages/Severity.java"/>
2086N/A <include name="**/org/opends/messages/Category.java"/>
2115N/A <include name="**/org/opends/messages/QuickSetupMessages.java"/>
2115N/A <include name="**/org/opends/server/types/OpenDsException.java"/>
1008N/A </javac>
5902N/A <javac srcdir="${quicksetup.src.dir}" destdir="${quicksetup.classes.dir}">
567N/A <classpath>
567N/A <fileset dir="${build.dir}/build-tools">
567N/A <include name="build-tools.jar" />
567N/A </fileset>
567N/A <pathelement path="${classes.dir}"/>
567N/A </classpath>
567N/A </javac>
567N/A <copy todir="${quicksetup.classes.dir}">
567N/A <fileset dir="${quicksetup.src.dir}"
567N/A includes="**/*.properties, **/*.gif, **/*.png" />
567N/A </copy>
6238N/A <mkdir dir="${quicksetup.classes.dir}/messages" />
6238N/A <copy todir="${quicksetup.classes.dir}/messages">
6238N/A <fileset dir="${msg.prop.dir}"
6238N/A includes="**/quicksetup.properties" />
6238N/A </copy>
2556N/A
563N/A </target>
712N/A
1177N/A
2710N/A
2710N/A <!-- copy the message properties files -->
2710N/A <target name="copymessages">
2710N/A <mkdir dir="${msg.package.dir}"/>
2710N/A <copy todir="${msg.package.dir}">
2710N/A <fileset dir="${msg.prop.dir}"/>
2710N/A </copy>
2710N/A </target>
2710N/A
3980N/A <!-- copy the l10n message properties files (for generated messages)-->
3980N/A <target name="copyl10nmessages">
3989N/A <copy todir="${build.dir}/classes/admin/messages/org/opends/server/admin/std/meta/">
5058N/A <fileset dir="${msgl10n.prop.dir}" includes="*_fr.properties,*_de.properties,
5058N/A *_es.properties,*_ja.properties,*_ko.properties,*_zh_CN.properties,
5058N/A *_zh_TW.properties,*_pl.properties,*_ca_ES.properties">
5058N/A </fileset>
3980N/A </copy>
5058N/A
5058N/A <!-- check if the english generated files are different from the ones -->
5058N/A <!-- used for localization and copy the files that are different to a -->
5058N/A <!-- directory named diff -->
5058N/A <mkdir dir="${msgl10n.diff.dir}/diff"/>
5058N/A <copy todir="${msgl10n.diff.dir}/diff" verbose="true">
5058N/A <fileset dir="${build.dir}/classes/admin/messages/org/opends/server/admin/std/meta/"
5058N/A excludes="*_fr.properties,*_de.properties,*_es.properties,*_ja.properties,
5058N/A *_ko.properties,*_zh_CN.properties,*_zh_TW.properties,*_pl.properties,
5058N/A *_ca_ES.properties">
5058N/A <different targetdir="${msgl10n.prop.dir}" ignoreFileTimes="true" />
5058N/A </fileset>
5058N/A </copy>
5058N/A
5058N/A <fileset id="fs" dir="${msgl10n.diff.dir}/diff"/>
5058N/A <condition property="dir_empty">
5058N/A <length length="0">
5058N/A <fileset refid="fs"/>
5058N/A </length>
5058N/A </condition>
5058N/A
5058N/A <fail unless="dir_empty" if="isPrecommit"
5058N/A message="Generated admin message properties files differ from existing files :
5058N/A Copy all files from ${msgl10n.diff.dir}/diff to ${msgl10n.prop.dir}
5058N/A and include them for commit to resolve.">
5058N/A </fail>
3980N/A </target>
2710N/A
0N/A <!--
563N/A ! Rebuild the Directory Server without destroying 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 ! -->
2143N/A <target name="rebuild" depends="generatemessages"
0N/A description="Rebuild the server without destroying config or data.">
0N/A
1362N/A <!-- Construct the version number string -->
1362N/A <taskdef name="getversionnumber"
1362N/A classname="org.opends.build.tools.CreateVersionString">
1362N/A <classpath>
1362N/A <fileset dir="${build.dir}/build-tools">
1362N/A <include name="*.jar" />
1362N/A </fileset>
1362N/A </classpath>
1362N/A </taskdef>
1362N/A
1362N/A <getversionnumber property="VERSION_NUMBER_STRING" />
1362N/A
0N/A <!-- Set properties needed to find the packaged files -->
0N/A <property name="pdir"
1960N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
0N/A
0N/A <!-- Clean up a minimal set of files/directories for the rebuild. -->
0N/A <delete dir="${classes.dir}" />
1960N/A <delete file="${package.dir}/lib/${SHORT_NAME}.jar" />
0N/A <delete file="${pdir}.zip" />
563N/A <delete dir="${quicksetup.classes.dir}" />
563N/A <delete file="${package.dir}/lib/quicksetup.jar" />
712N/A
1008N/A <!-- Regenerate configuration files if necessary -->
6210N/A <antcall target="generateadmin" />
1008N/A
0N/A <!-- Recreate the classes directory and recompile into it. -->
0N/A <mkdir dir="${classes.dir}" />
2098N/A <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}:${admin.src.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
5902N/A destdir="${classes.dir}">
0N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
2046N/A <fileset dir="${build.dir}/build-tools">
2033N/A <include name="build-tools.jar" />
2046N/A </fileset>
4156N/A <fileset dir="${build.lib.dir}">
4156N/A <include name="*.jar" />
4156N/A </fileset>
0N/A </classpath>
0N/A </javac>
3381N/A
1607N/A <copy todir="${classes.dir}">
1607N/A <fileset dir="${src.dir}" includes="**/*.properties" />
2046N/A <fileset dir="${quicksetup.src.dir}" includes="**/*.properties, **/*.gif, **/*.png" />
2033N/A <fileset dir="${guitools.src.dir}" includes="**/*.properties, **/*.gif, **/*.png" />
1607N/A </copy>
1607N/A
2086N/A <!-- copy the message properties files -->
2710N/A <antcall target="copymessages" />
2086N/A
3980N/A
2122N/A <!-- copy the message descriptor registry file -->
2122N/A <copy todir="${classes.dir}/org/opends/messages"
2122N/A file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" />
2122N/A
0N/A <!-- Generate the OpenDS.jar file -->
1960N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}.jar"
2033N/A basedir="${classes.dir}"
2046N/A excludes="${ads.classes.dir}, ${quicksetup.globalcompile.classes.dir}"
2046N/A compress="true" index="true" />
712N/A
563N/A <!-- Recreate the quicksetup classes directory and recompile into it. -->
563N/A <mkdir dir="${quicksetup.classes.dir}" />
5902N/A <javac srcdir="${ads.src.dir}" destdir="${quicksetup.classes.dir}">
1210N/A <classpath>
1210N/A <fileset dir="${build.dir}/build-tools">
1210N/A <include name="build-tools.jar" />
1210N/A </fileset>
1210N/A <pathelement path="${classes.dir}"/>
1210N/A </classpath>
1210N/A </javac>
5902N/A <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}">
1008N/A <include name="**/org/opends/server/util/SetupUtils.java"/>
1210N/A <include name="**/org/opends/server/util/CertificateManager.java"/>
1008N/A <include name="**/org/opends/server/util/DynamicConstants.java"/>
1008N/A <include name="**/org/opends/server/types/OperatingSystem.java"/>
4495N/A <include name="**/org/opends/messages/Message.java"/>
4495N/A <include name="**/org/opends/messages/MessageBuilder.java"/>
4495N/A <include name="**/org/opends/messages/MessageDescriptor.java"/>
4495N/A <include name="**/org/opends/messages/Severity.java"/>
4495N/A <include name="**/org/opends/messages/Category.java"/>
4495N/A <include name="**/org/opends/messages/QuickSetupMessages.java"/>
4495N/A <include name="**/org/opends/server/types/OpenDsException.java"/>
1008N/A </javac>
5902N/A <javac srcdir="${quicksetup.src.dir}" destdir="${quicksetup.classes.dir}">
1008N/A <classpath>
1008N/A <fileset dir="${build.dir}/build-tools">
1008N/A <include name="build-tools.jar" />
1008N/A </fileset>
4495N/A <pathelement path="${classes.dir}"/>
1008N/A </classpath>
563N/A </javac>
563N/A
563N/A <copy todir="${quicksetup.classes.dir}">
1008N/A <fileset dir="${quicksetup.src.dir}"
563N/A includes="**/*.properties, **/*.gif, **/*.png"/>
563N/A </copy>
563N/A
563N/A <!-- Generate the quicksetup.jar file -->
563N/A <jar jarfile="${pdir}/lib/quicksetup.jar"
563N/A basedir="${quicksetup.classes.dir}" compress="true" index="true" />
712N/A
4156N/A <!-- Copy over external dependencies. -->
4156N/A <copy todir="${pdir}/lib">
4156N/A <fileset file="${build.lib.dir}/*.jar" />
4156N/A </copy>
4358N/A
1008N/A <!-- Regenerate example plugin. -->
1008N/A <antcall target="example-plugin" />
6608N/A
6374N/A <!-- Copy license if required. -->
6374N/A <antcall target="copylicense" />
0N/A </target>
0N/A
0N/A
3214N/A <!-- Generate the Configuration guides. -->
3214N/A <target name="docgen" depends="configguide,configguideldap"
3214N/A description="Generate the Configuration guides (1 standard + 1 with ldap mapping) (html).">
3381N/A </target>
3381N/A
3214N/A <!-- Generate the Standard Configuration guide. -->
3214N/A <target name="configguide" depends="compile,copymessages"
3214N/A description="Generate the Configuration guide (standard) (html).">
3090N/A <mkdir dir="${configguide.dir}" />
3214N/A <!-- copy the resource files -->
3214N/A <copy todir="${configguide.dir}">
3214N/A <fileset file="${configguide.resource.dir}/*" />
3214N/A </copy>
3090N/A <java fork="true" classname="org.opends.server.admin.doc.ConfigGuideGeneration" failonerror="true">
3090N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
3090N/A <dirset dir="${classes.dir}" />
3090N/A </classpath>
3214N/A <jvmarg value="-DGenerationDir=${configguide.dir}"/>
3764N/A <jvmarg value="-DOpendsWiki=${wiki.home}"/>
3381N/A </java>
3214N/A </target>
3214N/A
3214N/A <!-- Generate the Configuration guide with LDAP mapping. -->
3214N/A <target name="configguideldap" depends="compile,copymessages"
3214N/A description="Generate the Configuration guide (with LDAP mapping) (html).">
3214N/A <mkdir dir="${configguideldap.dir}" />
3214N/A <!-- copy the resource files -->
3214N/A <copy todir="${configguideldap.dir}">
3214N/A <fileset file="${configguide.resource.dir}/*" />
3214N/A </copy>
3214N/A <java fork="true" classname="org.opends.server.admin.doc.ConfigGuideGeneration" failonerror="true">
3214N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
3214N/A <dirset dir="${classes.dir}" />
3214N/A </classpath>
3214N/A <jvmarg value="-DGenerationDir=${configguideldap.dir}"/>
3764N/A <jvmarg value="-DOpendsWiki=${wiki.home}"/>
3214N/A <jvmarg value="-DLdapMapping"/>
3381N/A </java>
3090N/A </target>
6608N/A
6374N/A <!-- Create license file if requested.
6608N/A
6374N/A This target should only be called from targets which have defined the
6374N/A pdir property, such as prepackage and rebuild.
6608N/A
6374N/A The license file will be copied to ${pdir}/Legal/license_to_accept.txt.
6374N/A This file location is hard-coded in the following classes:
6608N/A
6374N/A org.opends.server.tools.upgrade.LicenseFile
6374N/A org.opends.quicksetup.LicenseFile
6608N/A
6374N/A Care must be taken to keep these filenames synchronized.
6374N/A -->
6374N/A <target name="copylicense" if="include.license.file" >
6374N/A <mkdir dir="${pdir}/Legal" />
6374N/A <copy tofile="${pdir}/Legal/license_to_accept.txt" file="${license.file}" />
6374N/A </target>
0N/A
0N/A <!-- Populate the Directory Server package, but don't zip it up. -->
121N/A <target name="prepackage" depends="cleancompile"
0N/A description="Prepare the Directory Server package structure.">
0N/A <property name="pdir"
1960N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
0N/A
2556N/A <mkdir dir="${pdir}" />
2556N/A <mkdir dir="${pdir}/bat" />
2556N/A <mkdir dir="${pdir}/bin" />
2556N/A <mkdir dir="${pdir}/legal-notices" />
2556N/A <mkdir dir="${pdir}/lib" />
2556N/A <mkdir dir="${pdir}/lib/extensions" />
6238N/A <mkdir dir="${pdir}/template" />
6318N/A <mkdir dir="${pdir}/template/bak" />
6318N/A <mkdir dir="${pdir}/template/changelogDb" />
6318N/A <mkdir dir="${pdir}/template/classes" />
6238N/A <mkdir dir="${pdir}/template/config" />
6238N/A <mkdir dir="${pdir}/template/config/schema" />
6238N/A <mkdir dir="${pdir}/template/config/messages" />
6238N/A <mkdir dir="${pdir}/template/config/MakeLDIF" />
6238N/A <mkdir dir="${pdir}/template/config/upgrade" />
6318N/A <mkdir dir="${pdir}/template/db" />
6318N/A <mkdir dir="${pdir}/template/import-tmp" />
6318N/A <mkdir dir="${pdir}/template/ldif" />
6318N/A <mkdir dir="${pdir}/template/locks" />
6318N/A <mkdir dir="${pdir}/template/logs" />
6238N/A <mkdir dir="${pdir}/bin/ControlPanel.app" />
6238N/A <mkdir dir="${pdir}/bin/ControlPanel.app/Contents" />
6238N/A <mkdir dir="${pdir}/bin/ControlPanel.app/Contents/MacOS" />
6238N/A <mkdir dir="${pdir}/bin/ControlPanel.app/Contents/Resources" />
6238N/A <mkdir dir="${pdir}/bin/ControlPanel.app/Contents/Resources/Java"/>
2556N/A <mkdir dir="${pdir}/QuickSetup.app" />
2556N/A <mkdir dir="${pdir}/QuickSetup.app/Contents" />
2556N/A <mkdir dir="${pdir}/QuickSetup.app/Contents/MacOS" />
2556N/A <mkdir dir="${pdir}/QuickSetup.app/Contents/Resources" />
2556N/A <mkdir dir="${pdir}/QuickSetup.app/Contents/Resources/Java" />
2556N/A <mkdir dir="${pdir}/Uninstall.app" />
2556N/A <mkdir dir="${pdir}/Uninstall.app/Contents" />
2556N/A <mkdir dir="${pdir}/Uninstall.app/Contents/MacOS" />
2556N/A <mkdir dir="${pdir}/Uninstall.app/Contents/Resources" />
2556N/A <mkdir dir="${pdir}/Uninstall.app/Contents/Resources/Java" />
0N/A
2086N/A
2086N/A <!-- copy the message properties files -->
2710N/A <antcall target="copymessages" />
2086N/A
3980N/A <!-- copy the l10n message properties files -->
3980N/A <antcall target="copyl10nmessages" />
3980N/A
3980N/A
2122N/A <!-- copy the message descriptor registry file -->
2122N/A <copy todir="${classes.dir}/org/opends/messages"
2122N/A file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" />
3381N/A
1960N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}.jar"
2556N/A basedir="${classes.dir}"
6131N/A excludes="${ads.classes.dir}, ${quicksetup.globalcompile.classes.dir}, org/opends/server/snmp/**,**/*_fr.properties,**/*_ja.properties,**/*_de.properties,**/*_es.properties,**/*_zh_TW.properties,**/*_zh_CN.properties,**/*_ko.properties,**/*_pl.properties,**/*_ca_ES.properties"
6131N/A compress="true" index="true" />
4495N/A
6131N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_fr.jar"
4495N/A basedir="${classes.dir}"
4495N/A includes="**/*_fr.properties"
4495N/A compress="true" index="true" />
4495N/A
4495N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_ja.jar"
4495N/A basedir="${classes.dir}"
4495N/A includes="**/*_ja.properties"
4495N/A compress="true" index="true" />
4495N/A
4495N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_de.jar"
4495N/A basedir="${classes.dir}"
4495N/A includes="**/*_de.properties"
4495N/A compress="true" index="true" />
4495N/A
4495N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_es.jar"
4495N/A basedir="${classes.dir}"
4495N/A includes="**/*_es.properties"
4495N/A compress="true" index="true" />
4495N/A
4495N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_ko.jar"
4495N/A basedir="${classes.dir}"
4495N/A includes="**/*_ko.properties"
4495N/A compress="true" index="true" />
4495N/A
4495N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_zh_CN.jar"
4495N/A basedir="${classes.dir}"
4495N/A includes="**/*_zh_CN.properties"
4495N/A compress="true" index="true" />
4495N/A
4495N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_zh_TW.jar"
4495N/A basedir="${classes.dir}"
4495N/A includes="**/*_zh_TW.properties"
4495N/A compress="true" index="true" />
4495N/A
6131N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_pl.jar"
6131N/A basedir="${classes.dir}"
6131N/A includes="**/*_pl.properties"
6131N/A compress="true" index="true" />
712N/A
6131N/A <jar jarfile="${pdir}/lib/${SHORT_NAME}_ca_ES.jar"
5020N/A basedir="${classes.dir}"
6131N/A includes="**/*_ca_ES.properties"
6131N/A compress="true" index="true" />
5020N/A
563N/A <jar jarfile="${pdir}/lib/quicksetup.jar"
563N/A basedir="${quicksetup.classes.dir}" compress="true" index="true" />
712N/A
6174N/A <copy todir="${pdir}/lib" flatten="true">
6174N/A <fileset refid="opendj.runtime.jars"/>
0N/A </copy>
3381N/A
1008N/A <copy todir="${pdir}/lib">
1008N/A <fileset file="${lib.dir}/*.exe" />
1008N/A </copy>
4358N/A
3534N/A <antcall target="example-plugin" />
3534N/A
2976N/A <fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/bin" excludes="*.bat,_client-script.sh,_server-script.sh,_mixed-script.sh,_script-util.sh" eol="lf" />
2976N/A <fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/lib" includes="_client-script.sh,_server-script.sh,_mixed-script.sh,_script-util.sh" eol="lf" />
2976N/A <fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/bat" excludes="_client-script.bat,_server-script.bat,_mixed-script.bat,_script-util.bat,setcp.bat" includes="*.bat" eol="crlf" />
2976N/A <fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/lib" includes="_client-script.bat,_server-script.bat,_mixed-script.bat,_script-util.bat,setcp.bat" eol="crlf" />
1008N/A
6238N/A <copy todir="${pdir}/template/config">
5607N/A <fileset file="${config.dir}/*" />
0N/A </copy>
3381N/A
3349N/A <antcall target="package-snmp" />
6256N/A
6256N/A <!-- Build the bootstrap jar that avoids getting the error message "The input line is too long" on Windows -->
6256N/A <manifestclasspath property="manifest.classpath"
6256N/A jarfile="${pdir}/lib/bootstrap.jar">
6256N/A <classpath>
6256N/A <fileset dir="${pdir}/lib">
6256N/A <include name="*.jar" />
6256N/A </fileset>
6256N/A </classpath>
6256N/A </manifestclasspath>
6256N/A <jar jarfile="${pdir}/lib/bootstrap.jar">
6280N/A <manifest>
6256N/A <attribute name="Built-By" value="${user.name}" />
6256N/A <attribute name="Class-Path" value="${manifest.classpath}" />
6280N/A </manifest>
6256N/A </jar>
6256N/A
4495N/A <!-- Create buildinfo files -->
6131N/A <echo message="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}.${REVISION_NUMBER}"
6238N/A file="${pdir}/template/config/buildinfo" />
920N/A
920N/A <taskdef name="concatschema"
920N/A classname="org.opends.build.tools.ConcatSchema">
920N/A <classpath>
920N/A <fileset dir="${build.dir}/build-tools">
920N/A <include name="*.jar" />
920N/A </fileset>
920N/A </classpath>
920N/A </taskdef>
920N/A
920N/A <concatschema schemaDirectory="${resource.dir}/schema"
6238N/A toFile="${pdir}/template/config/upgrade/schema.ldif.${REVISION_NUMBER}" />
6238N/A
6238N/A <copy todir="${pdir}/template/config/schema">
0N/A <fileset dir="${resource.dir}/schema" />
0N/A </copy>
4358N/A
6238N/A <copy todir="${pdir}/template/config/messages">
0N/A <fileset dir="${resource.dir}/messages" />
0N/A </copy>
0N/A
6238N/A <copy todir="${pdir}/template/config/MakeLDIF">
107N/A <fileset dir="${resource.dir}/MakeLDIF" />
107N/A </copy>
107N/A
29N/A <copy todir="${pdir}/legal-notices">
29N/A <fileset dir="${resource.dir}/legal-notices" />
29N/A </copy>
6374N/A <antcall target="copylicense" />
29N/A
29N/A <copy todir="${pdir}">
29N/A <fileset file="${resource.dir}/README" />
29N/A </copy>
3537N/A <copy todir="${pdir}">
6307N/A <fileset file="${resource.dir}/images/opendj_logo.png" />
3012N/A </copy>
3012N/A
2549N/A <fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup,uninstall,upgrade"
547N/A eol="lf" />
2549N/A <fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup.bat,uninstall.bat,upgrade.bat"
547N/A eol="crlf" />
84N/A
565N/A <chmod file="${pdir}/setup" perm="755" />
712N/A <chmod file="${pdir}/uninstall" perm="755" />
1345N/A <chmod file="${pdir}/upgrade" perm="755" />
2556N/A
2556N/A <copy todir="${pdir}/QuickSetup.app">
2556N/A <fileset dir="${resource.dir}/mac/QuickSetup.app" />
2556N/A </copy>
6280N/A <replace file="${pdir}/QuickSetup.app/Contents/Info.plist"
6280N/A token="@version@"
6280N/A value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}"/>
6280N/A <replace file="${pdir}/QuickSetup.app/Contents/Info.plist"
6280N/A token="@revision@"
6280N/A value="${REVISION_NUMBER}"/>
2556N/A <chmod perm="755">
2556N/A <fileset dir="${pdir}">
2556N/A <include name="QuickSetup.app/Contents/MacOS/JavaApplicationStub" />
2556N/A </fileset>
2556N/A </chmod>
2556N/A <copy todir="${pdir}/Uninstall.app">
2556N/A <fileset dir="${resource.dir}/mac/Uninstall.app" />
2556N/A </copy>
6280N/A <replace file="${pdir}/Uninstall.app/Contents/Info.plist"
6280N/A token="@version@"
6280N/A value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}"/>
6280N/A <replace file="${pdir}/Uninstall.app/Contents/Info.plist"
6280N/A token="@revision@"
6280N/A value="${REVISION_NUMBER}"/>
2556N/A <chmod perm="755">
2556N/A <fileset dir="${pdir}">
2556N/A <include name="Uninstall.app/Contents/MacOS/JavaApplicationStub" />
2556N/A </fileset>
2556N/A </chmod>
3853N/A <copy todir="${pdir}/bin/ControlPanel.app">
3853N/A <fileset dir="${resource.dir}/mac/ControlPanel.app" />
2556N/A </copy>
6280N/A <replace file="${pdir}/bin/ControlPanel.app/Contents/Info.plist"
6280N/A token="@version@"
6280N/A value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}"/>
6280N/A <replace file="${pdir}/bin/ControlPanel.app/Contents/Info.plist"
6280N/A token="@revision@"
6280N/A value="${REVISION_NUMBER}"/>
2556N/A <chmod perm="755">
2556N/A <fileset dir="${pdir}/bin">
3853N/A <include name="ControlPanel.app/Contents/MacOS/JavaApplicationStub" />
2556N/A </fileset>
2556N/A </chmod>
2556N/A
485N/A <chmod perm="755">
6178N/A <fileset dir="${pdir}/bin" />
485N/A </chmod>
1197N/A <chmod file="${pdir}/lib/_client-script.sh" perm="755" />
1197N/A <chmod file="${pdir}/lib/_server-script.sh" perm="755" />
6178N/A <chmod file="${pdir}/lib/_mixed-script.sh" perm="755" />
6178N/A <chmod file="${pdir}/lib/_script-util.sh" perm="755" />
6178N/A
6238N/A <chmod perm="444">
6238N/A <fileset dir="${pdir}/template" />
6238N/A </chmod>
0N/A </target>
4575N/A
4575N/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.">
1960N/A <zip destfile="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}.zip">
6238N/A <zipfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="**/*"
6238N/A excludes="bin/*,template/**/*,lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh,setup,uninstall,upgrade,QuickSetup.app/Contents/MacOS/JavaApplicationStub,Uninstall.app/Contents/MacOS/JavaApplicationStub,bin/ControlPanel.app/Contents/MacOS/JavaApplicationStub"
6238N/A filemode="644" dirmode="755" prefix="opendj" />
6238N/A <zipfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"
6238N/A includes="lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh"
6238N/A filemode="755" dirmode="755" prefix="opendj" />
6238N/A <zipfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="bin/*"
6238N/A filemode="755" dirmode="755" prefix="opendj" />
6238N/A <zipfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="setup,uninstall,upgrade,QuickSetup.app/Contents/MacOS/JavaApplicationStub,Uninstall.app/Contents/MacOS/JavaApplicationStub,bin/ControlPanel.app/Contents/MacOS/JavaApplicationStub"
6238N/A filemode="755" dirmode="755" prefix="opendj" />
6238N/A <zipfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="template/**/*"
6238N/A filemode="444" dirmode="744" prefix="opendj" />
0N/A </zip>
1559N/A <property name="package.built" value="true"/>
3381N/A
2308N/A <!-- print a time stamp in Unix 'date' format -->
2308N/A <tstamp>
2308N/A <format property="package.built.ts" pattern="EEE MMM dd HH:mm:ss zzz yyyy" />
2308N/A </tstamp>
2308N/A <echo message="Package Built: ${package.built.ts}"/>
0N/A </target>
0N/A
6560N/A <!-- Package the Directory Server for the MSI distribution. -->
6560N/A <target name="package-MSI"
6560N/A description="Package the Directory Server for MSI distribution.">
6571N/A <fail unless="build.windows">MSI packages can only be built on Windows.</fail>
6560N/A <taskdef name="getversionnumber"
6560N/A classname="org.opends.build.tools.CreateVersionString">
6560N/A <classpath>
6560N/A <fileset dir="${build.dir}/build-tools">
6560N/A <include name="*.jar" />
6560N/A </fileset>
6560N/A </classpath>
6560N/A </taskdef>
6560N/A
6560N/A <getversionnumber property="VERSION_NUMBER_STRING" />
6560N/A
6560N/A <mkdir dir="${build.dir}/msi/files" />
6560N/A <copy toDir="${build.dir}/msi/files">
6560N/A <fileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}">
6560N/A <!-- Exclude Mac apps -->
6560N/A <exclude name="QuickSetup.app/**"/>
6560N/A <exclude name="Uninstall.app/**"/>
6560N/A <!-- Exclude shell scripts -->
6560N/A <exclude name="bin/**"/>
6560N/A <exclude name="setup"/>
6560N/A <exclude name="uninstall"/>
6560N/A <exclude name="upgrade"/>
6560N/A <exclude name="**/*.sh"/>
6560N/A </fileset>
6560N/A </copy>
6560N/A
6560N/A <mkdir dir="${build.dir}/msi/build" />
6560N/A <copy file="${resource.dir}/msi/package.wxs" toDir="${build.dir}/msi/build"/>
7316N/A <copy file="${resource.dir}/msi/opendjbanner.bmp" toDir="${build.dir}/msi/build"/>
7316N/A <copy file="${resource.dir}/msi/opendjdialog.bmp" toDir="${build.dir}/msi/build"/>
6560N/A <mkdir dir="${build.dir}/msi/dist" />
6560N/A
6560N/A <!-- Construct a .wxs file from the directory structure -->
6561N/A <exec executable="heat.exe" dir="${build.dir}/msi/files">
6560N/A <arg value="dir"/>
6560N/A <arg value="."/>
6560N/A <arg value="-nologo"/>
6560N/A <arg value="-cg"/> <arg value="all"/>
6560N/A <arg value="-gg"/>
6560N/A <arg value="-sfrag"/>
6560N/A <arg value="-srd"/>
6560N/A <arg value="-dr"/> <arg value="OPENDJ"/>
6560N/A <arg value="-var"/> <arg value="var.src"/>
6560N/A <arg value="-template"/> <arg value="fragment"/>
6560N/A <arg value="-o"/> <arg value="${build.dir}/msi/build/payload.wxs"/>
6560N/A </exec>
6560N/A
6560N/A <!-- Compile all .wxs files into .wixobj files (fast) -->
6561N/A <exec executable="candle.exe" dir="${build.dir}/msi">
6560N/A <arg value="-nologo"/>
6560N/A <arg value="-out"/> <arg value="${build.dir}/msi/build/"/>
6560N/A <arg value="-dsrc=files"/>
6560N/A <arg value="-dname=${SHORT_NAME}"/>
6560N/A <arg value="-dmajor=${MAJOR_VERSION}"/>
6560N/A <arg value="-dminor=${MINOR_VERSION}"/>
6560N/A <arg value="-dpoint=${POINT_VERSION}"/>
6560N/A <arg value="build/package.wxs"/>
6560N/A <arg value="build/payload.wxs"/>
6560N/A </exec>
6560N/A
6561N/A <!-- Build the package (slow) -->
6561N/A <exec executable="light.exe" dir="${build.dir}/msi">
6560N/A <arg value="-nologo"/>
6560N/A <arg value="-ext"/> <arg value="WixUIExtension"/>
6560N/A <arg value="-out"/> <arg value="dist/${SHORT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}.msi"/>
6560N/A <arg value="build/package.wixobj"/>
6560N/A <arg value="build/payload.wixobj"/>
6560N/A </exec>
6560N/A
6560N/A </target>
6560N/A
3069N/A <!-- Package the Directory Server for the RPM distribution. -->
3069N/A <target name="package-RPM"
6131N/A description="Package the Directory Server for RPM distribution.">
3069N/A <taskdef name="getversionnumber"
6131N/A classname="org.opends.build.tools.CreateVersionString">
3069N/A <classpath>
3069N/A <fileset dir="${build.dir}/build-tools">
3069N/A <include name="*.jar" />
3069N/A </fileset>
3069N/A </classpath>
3069N/A </taskdef>
3069N/A
3069N/A <getversionnumber property="VERSION_NUMBER_STRING" />
3069N/A
6238N/A <property name="prefix" value="/opt/opendj"/>
6283N/A <property name="release" value="1"/>
6521N/A
6521N/A <mkdir dir="${build.dir}/rpm/BUILD" />
6521N/A <mkdir dir="${build.dir}/rpm/RPMS" />
6521N/A <mkdir dir="${build.dir}/rpm/SOURCES" />
6521N/A <mkdir dir="${build.dir}/rpm/SPECS" />
6647N/A <mkdir dir="${build.dir}/rpm/SRPMS" />
6647N/A
6521N/A <condition property="rpmRelease" value="${release}" else="${release}.${pkg_version_qualifier}">
6521N/A <or>
6521N/A <not>
6521N/A <isset property="pkg_version_qualifier"/>
6521N/A </not>
6521N/A <equals arg1="${pkg_version_qualifier}" arg2="" />
6521N/A </or>
6521N/A </condition>
6647N/A
6521N/A <copy todir="${build.dir}/rpm/SPECS">
6521N/A <fileset file="resource/rpm/specFile"/>
6521N/A <filterset begintoken="[[ " endtoken=" ]]">
6521N/A <filter token="topDir" value="${build.dir}/rpm"/>
6521N/A <filter token="prefix" value="${prefix}"/>
6521N/A <filter token="pre" value="${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
6521N/A <filter token="productName" value="${PRODUCT_NAME}"/>
6521N/A <filter token="shortName" value="${SHORT_NAME}"/>
6521N/A <filter token="pkgName" value="${PKG_NAME}"/>
6521N/A <filter token="referenceURL" value="${DOC_REFERENCE_HOME}"/>
6521N/A <filter token="sourceDirName" value="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
6521N/A <filter token="specFileName" value="${build.dir}/rpm/SPECS/specFile"/>
6647N/A <filter token="version" value="${pkg_version_string}"/>
6521N/A <filter token="release" value="${rpmRelease}" />
6521N/A </filterset>
6521N/A </copy>
6521N/A
6521N/A <taskdef name="processFilesForPackages"
6521N/A classname="org.opends.build.tools.ProcessFilesForPackages">
3069N/A <classpath>
3069N/A <fileset dir="${build.dir}/build-tools">
3069N/A <include name="*.jar" />
3069N/A </fileset>
3069N/A </classpath>
3079N/A </taskdef>
6647N/A <processFilesForPackages sourceDirName="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
6521N/A <copy file="resource/rpm/files" tofile="${build.dir}/rpm/SOURCES/files" />
6543N/A <copy file="resource/rpm/docFiles" tofile="${build.dir}/rpm/SOURCES/docFiles" />
6647N/A
6521N/A <replace file="${build.dir}/rpm/SOURCES/files" token="# [[ listFiles ]]" value="${listRPMFiles}" />
6647N/A <replace file="${build.dir}/rpm/SOURCES/docFiles" token="# [[ docsList ]]" value="${listRPMDocFiles}" />
6543N/A <replace file="${build.dir}/rpm/SPECS/specFile" token="# [[ installRpmFiles ]]" value="${installRpmFiles}" />
6647N/A
6521N/A <copy file="resource/rpm/excludedFiles" tofile="${build.dir}/rpm/SOURCES/excludedFiles" />
6521N/A <replace file="${build.dir}/rpm/SOURCES/excludedFiles" token="# [[ excludedListFiles ]]" value="${excludedRPMFiles}" />
6647N/A
6642N/A <copy file="resource/sysv/opendj" tofile="${build.dir}/rpm/SOURCES/opendj" />
6647N/A
6238N/A <rpm specfile="specFile"
6238N/A topdir="${build.dir}/rpm"
6521N/A quiet="true"
6521N/A removeSpec="false">
6238N/A </rpm>
6647N/A
6521N/A <mkdir dir="${build.dir}/rpm/RPMS/noarch" />
3069N/A <copy todir="${package.dir}">
3069N/A <fileset dir="${build.dir}/rpm/RPMS/noarch">
3069N/A <include name="*.rpm" />
3069N/A </fileset>
3069N/A </copy>
3069N/A </target>
6647N/A
6238N/A <!-- Package the Directory Server for the DEB distribution. -->
6238N/A <target name="package-DEB"
6238N/A description="Package the Directory Server for DEB distribution.">
6238N/A <taskdef name="getversionnumber"
6238N/A classname="org.opends.build.tools.CreateVersionString">
6238N/A <classpath>
6238N/A <fileset dir="${build.dir}/build-tools">
6238N/A <include name="*.jar" />
6238N/A </fileset>
6238N/A </classpath>
6238N/A </taskdef>
6238N/A
6238N/A <getversionnumber property="VERSION_NUMBER_STRING" />
6238N/A
6642N/A <property name="prefix" value="/opt/opendj"/>
6642N/A <property name="release" value="1"/>
6642N/A <property name="docprefix" value="/usr/share/doc/opendj"/>
6642N/A <property name="build.deb.dir" value="${build.dir}/deb/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
6238N/A
6238N/A <mkdir dir="${build.dir}/deb/control" />
6238N/A
6238N/A <taskdef name="deb" classname="org.vafer.jdeb.ant.DebAntTask"/>
6280N/A
6238N/A <copy todir="${build.dir}/deb/control">
6238N/A <fileset dir="resource/debian/control"/>
6238N/A <filterset begintoken="[[" endtoken="]]">
6238N/A <filter token="version" value="${VERSION_NUMBER_STRING}"/>
6283N/A <filter token="name" value="${PKG_NAME}"/>
6238N/A <filter token="homepage" value="${DOC_REFERENCE_HOME}"/>
6238N/A <filter token="maintainer" value="opendj@forgerock.org"/>
6310N/A <filter token="description" value="${PRODUCT_NAME}"/>
6238N/A </filterset>
6238N/A </copy>
6647N/A
6642N/A <copy todir="${build.deb.dir}">
6642N/A <fileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
6630N/A </copy>
6642N/A <copy file="resource/debian/copyright" tofile="${build.deb.dir}/copyright" />
6642N/A <copy file="resource/sysv/opendj" tofile="${build.deb.dir}/opendj" />
6238N/A
6649N/A <gzip src="resource/debian/changelog" destfile="${build.deb.dir}/changelog.Debian.gz" />
6238N/A <replace dir="${build.dir}/deb/control/" token="@prefix@" value="${prefix}" />
6280N/A
6290N/A <deb destfile="${package.dir}/${PKG_NAME}_${pkg_version_string}-${release}${pkg_version_qualifier}_all.deb"
6635N/A control="${build.dir}/deb/control" verbose="false">
6642N/A <tarfileset dir="${build.deb.dir}"
6238N/A includes="**/*"
6713N/A excludes="**/bat/**, **/*.app/**, **/*.bat*, **/*.exe*, bin/*, template/**/*, lib/*.sh, setup, uninstall, upgrade, legal-notices/**, copyright, README, example-plugin.zip, opendj, changelog.Debian.gz"
6238N/A prefix="${prefix}" filemode="644" dirmode="755" />
6642N/A <tarfileset dir="${build.deb.dir}" includes="lib/*.sh"
6238N/A prefix="${prefix}" filemode="755" dirmode="755" />
6642N/A <tarfileset dir="${build.deb.dir}" includes="bin/*"
6713N/A excludes="**/bin/ControlPanel.app/"
6238N/A prefix="${prefix}" filemode="755" dirmode="755" />
6642N/A <tarfileset dir="${build.deb.dir}" includes="setup,uninstall,upgrade"
6238N/A prefix="${prefix}" filemode="755" dirmode="755" />
6642N/A <tarfileset dir="${build.deb.dir}" includes="template/**/*"
6647N/A prefix="${prefix}" filemode="444" dirmode="744" />
6716N/A <tarfileset dir="${build.deb.dir}" includes="legal-notices/**, copyright, example-plugin.zip, changelog.Debian.gz"
6642N/A prefix="${docprefix}" filemode="644" dirmode="755" />
6642N/A <tarfileset dir="${build.deb.dir}" includes="opendj"
6647N/A prefix="/etc/init.d" filemode="755" dirmode="755" />
6238N/A </deb>
6238N/A </target>
1177N/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.">
6647N/A <delete dir="${dsml.gen.dir}/org/opends/dsml/protocol" />
0N/A <mkdir dir="${dsml.gen.dir}/org/opends/dsml/protocol" />
6647N/A <exec executable="xjc">
6647N/A <arg value="-d"/>
6647N/A <arg value="${dsml.gen.dir}"/>
6647N/A <arg value="-p"/>
6647N/A <arg value="org.opends.dsml.protocol"/>
6647N/A <arg value="-b"/>
6647N/A <arg value="${dsml.dir}/schema/bindings.xjb"/>
6647N/A <arg value="-target"/>
6647N/A <arg value="2.1"/>
6647N/A <arg value="-npa"/>
6647N/A <arg value="-verbose"/>
6647N/A <arg value="${dsml.dir}/schema/DSMLv2.xsd"/>
6647N/A </exec>
0N/A <mkdir dir="${dsml.classes.dir}" />
0N/A
5902N/A <javac srcdir="${dsml.gen.dir}" destdir="${dsml.classes.dir}">
3107N/A <compilerarg value="-Xlint:-path" />
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
5902N/A <javac srcdir="${dsml.src.dir}" destdir="${dsml.classes.dir}">
3107N/A <compilerarg value="-Xlint:-path" />
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
3000N/A <mkdir dir="${dsml.classes.dir}/resources" />
3000N/A <copy file="${dsml.dir}/schema/DSMLv2.xsd"
3000N/A tofile="${dsml.classes.dir}/resources/DSMLv2.xsd"
3000N/A overwrite="true"/>
3000N/A
1960N/A <war destfile="${classes.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}-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 <lib dir="${pdir}/lib">
3058N/A <include name="${SHORT_NAME}.jar" />
4495N/A <include name="${SHORT_NAME}_fr.jar" />
4495N/A <include name="${SHORT_NAME}_ja.jar" />
4495N/A <include name="${SHORT_NAME}_ko.jar" />
4495N/A <include name="${SHORT_NAME}_de.jar" />
4495N/A <include name="${SHORT_NAME}_es.jar" />
4495N/A <include name="${SHORT_NAME}_zh_TW.jar" />
4495N/A <include name="${SHORT_NAME}_zh_CN.jar" />
6131N/A <include name="${SHORT_NAME}_pl.jar" />
6131N/A <include name="${SHORT_NAME}_ca_ES.jar" />
0N/A </lib>
0N/A </war>
0N/A
605N/A <copy todir="${package.dir}">
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 -->
6210N/A <target name="javadoc" depends="dsml,generateadmin"
0N/A description="Generate JavaDoc documentation.">
0N/A <mkdir dir="${javadoc.dir}" />
0N/A
5178N/A <javadoc destdir="${javadoc.dir}" additionalparam="-quiet"
0N/A linksource="yes" windowtitle="${PRODUCT_NAME} API Documentation"
0N/A maxmemory="${MEM}">
0N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
0N/A
0N/A <fileset dir="${dsml.lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
0N/A
2528N/A <fileset dir="${build.dir}/build-tools">
2528N/A <include name="*.jar" />
2528N/A </fileset>
2528N/A
0N/A <dirset dir="${classes.dir}" />
0N/A <dirset dir="${dsml.classes.dir}" />
1527N/A <dirset dir="${quicksetup.classes.dir}" />
0N/A </classpath>
0N/A
5607N/A <packageset dir="${src.dir}" />
1008N/A <packageset dir="${admin.src.dir}" />
1527N/A <packageset dir="${ads.src.dir}" />
0N/A <packageset dir="${dsml.src.dir}" />
2255N/A <packageset dir="${msg.src.dir}" />
0N/A </javadoc>
0N/A </target>
0N/A
0N/A
2900N/A <!-- Internal target to run the Directory Server directly. -->
2896N/A <target name="run-server" depends="dynamicconstants">
2900N/A <!-- Set properties needed to find the packaged files -->
2900N/A <property name="pdir" location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
2896N/A <java fork="true" classname="org.opends.server.core.DirectoryServer" failonerror="true">
2896N/A <classpath>
2896N/A <fileset dir="${lib.dir}">
6140N/A <include name="**/*.jar"/>
2896N/A </fileset>
2900N/A <dirset dir="${classes.dir}"/>
2896N/A </classpath>
2900N/A <jvmarg value="-Dorg.opends.server.BuildRoot=${pdir}"/>
2900N/A <jvmarg value="-Dorg.opends.server.scriptName=start-ds"/>
2900N/A <jvmarg value="-Dorg.opends.server.ServerRoot=${pdir}"/>
2896N/A <arg value="--configClass=org.opends.server.extensions.ConfigFileHandler"/>
2896N/A <arg value="--configFile=${pdir}/config/config.ldif"/>
2900N/A <arg value="--nodetach"/>
2900N/A </java>
2896N/A </target>
2900N/A
2900N/A <!-- Netbeans target to debug the Directory Server. -->
2896N/A <target name="nb-debug-server" depends="dynamicconstants">
2896N/A <!-- Set properties needed to find the packaged files -->
2900N/A <property name="pdir" location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
2896N/A <path id="cp">
2896N/A <fileset dir="${lib.dir}">
6140N/A <include name="**/*.jar"/>
2896N/A </fileset>
2900N/A <dirset dir="${classes.dir}"/>
3853N/A </path>
2896N/A <nbjpdastart addressproperty="jpda.address" name="Directory Server" transport="dt_socket">
2896N/A <classpath refid="cp"/>
2896N/A </nbjpdastart>
2896N/A <java classname="org.opends.server.core.DirectoryServer" fork="true">
2896N/A <classpath refid="cp"/>
2896N/A <jvmarg value="-Xdebug"/>
2896N/A <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
2900N/A <jvmarg value="-Dorg.opends.server.BuildRoot=${pdir}"/>
2900N/A <jvmarg value="-Dorg.opends.server.scriptName=start-ds"/>
2900N/A <jvmarg value="-Dorg.opends.server.ServerRoot=${pdir}"/>
2900N/A <jvmarg value="-Dorg.opends.server.debug.enabled=true"/>
2896N/A <arg value="--configClass=org.opends.server.extensions.ConfigFileHandler"/>
2900N/A <arg value="--configFile=${pdir}/config/config.ldif"/>
2900N/A <arg value="--nodetach"/>
2896N/A </java>
2896N/A </target>
2900N/A
2900N/A <!-- Netbeans target to profile the Directory Server. -->
2900N/A <target name="nb-profile-server" depends="dynamicconstants">
2900N/A <!-- Set properties needed to find the packaged files -->
2900N/A <property name="pdir" location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
2900N/A <path id="cp">
2900N/A <fileset dir="${lib.dir}">
6140N/A <include name="**/*.jar"/>
2900N/A </fileset>
2900N/A <dirset dir="${classes.dir}"/>
2900N/A </path>
2900N/A <nbprofiledirect>
2900N/A <classpath refid="cp"/>
2900N/A </nbprofiledirect>
3005N/A <java fork="true" classname="org.opends.server.core.DirectoryServer">
2900N/A <classpath>
2900N/A <fileset dir="${lib.dir}">
6140N/A <include name="**/*.jar"/>
2900N/A </fileset>
2900N/A <dirset dir="${classes.dir}"/>
2900N/A </classpath>
2900N/A <jvmarg value="${profiler.info.jvmargs.agent}"/>
2900N/A <jvmarg value="-Dorg.opends.server.BuildRoot=${pdir}"/>
2900N/A <jvmarg value="-Dorg.opends.server.scriptName=start-ds"/>
2900N/A <jvmarg value="-Dorg.opends.server.ServerRoot=${pdir}"/>
2900N/A <arg value="--configClass=org.opends.server.extensions.ConfigFileHandler"/>
2900N/A <arg value="--configFile=${pdir}/config/config.ldif"/>
2900N/A <arg value="--nodetach"/>
2900N/A </java>
2900N/A </target>
2900N/A
2896N/A <!-- Internal target to run directly dsconfig. -->
2896N/A <target name="run-dsconfig" depends="dynamicconstants">
2896N/A <!-- Set properties needed to find the packaged files -->
2896N/A <property name="pdir"
2896N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
2896N/A <java fork="true" classname="org.opends.server.tools.dsconfig.DSConfig" failonerror="true">
2896N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
2900N/A <dirset dir="${classes.dir}" />
2896N/A </classpath>
2896N/A <jvmarg value="-Dorg.opends.server.scriptName=dsconfig" />
4235N/A <jvmarg value="-Dorg.opends.server.BuildRoot=${pdir}"/>
4235N/A <jvmarg value="-Dorg.opends.server.ServerRoot=${pdir}"/>
2900N/A </java>
2896N/A </target>
2900N/A
2896N/A <!-- Netbeans target to debug dsconfig. -->
2896N/A <target name="nb-debug-dsconfig" depends="dynamicconstants">
2896N/A <!-- Set properties needed to find the packaged files -->
2896N/A <property name="pdir"
2896N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
2896N/A <path id="cp">
6158N/A <fileset refid="opendj.runtime.jars"/>
2900N/A <dirset dir="${classes.dir}" />
2896N/A </path>
2896N/A <nbjpdastart addressproperty="jpda.address" name="Directory Server" transport="dt_socket">
2896N/A <classpath refid="cp"/>
2896N/A </nbjpdastart>
2896N/A <java classname="org.opends.server.tools.dsconfig.DSConfig" fork="true">
2896N/A <classpath refid="cp"/>
2896N/A <jvmarg value="-Xdebug"/>
2896N/A <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
2896N/A <jvmarg value="-Dorg.opends.server.scriptName=dsconfig" />
4235N/A <jvmarg value="-Dorg.opends.server.BuildRoot=${pdir}"/>
4235N/A <jvmarg value="-Dorg.opends.server.ServerRoot=${pdir}"/>
4235N/A <jvmarg value="-Dorg.opends.server.debug.enabled=true"/>
4235N/A </java>
2896N/A </target>
2900N/A
3853N/A
121N/A <!-- Internal target to prepare to generate a code coverage report. -->
121N/A <target name="coverage">
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>
1527N/A
1527N/A <path id="quickSetup.classpath">
1527N/A <pathelement location="${quicksetup.classes.dir}" />
1527N/A </path>
0N/A </target>
0N/A
0N/A
3381N/A
3381N/A <!-- Prepare to execute the Directory Server TestNG unit tests. -->
3083N/A <target name="test.OpenDS.package.required" depends="dynamicconstants">
3083N/A <condition property="test.OpenDS.package.required">
3083N/A <available file="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}.zip"/>
3083N/A </condition>
3083N/A </target>
3381N/A
3083N/A <target name="testinit-package" depends="test.OpenDS.package.required" unless="test.OpenDS.package.required">
5614N/A <echo message="Performing full rebuild (no OpenDJ zip package found)"/>
3083N/A <antcall target="package"/>
3083N/A </target>
3381N/A
3083N/A <target name="testinit-recompile" depends="test.OpenDS.package.required" if="test.OpenDS.package.required">
5614N/A <echo message="Performing partial rebuild (OpenDJ zip package found)"/>
3083N/A <mkdir dir="${classes.dir}" />
3083N/A
3083N/A <javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
5902N/A destdir="${classes.dir}">
3083N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
6165N/A <fileset refid="opendj.test.jars"/>
3083N/A <fileset dir="${build.dir}/build-tools">
3083N/A <include name="build-tools.jar" />
3083N/A </fileset>
4156N/A <fileset dir="${build.lib.dir}">
4156N/A <include name="*.jar" />
4156N/A </fileset>
3083N/A </classpath>
3083N/A </javac>
3083N/A
3083N/A <copy todir="${classes.dir}">
3083N/A <fileset dir="${src.dir}" includes="**/*.properties" />
3083N/A <fileset dir="${quicksetup.src.dir}" includes="**/*.properties, **/*.gif, **/*.png" />
3083N/A <fileset dir="${guitools.src.dir}" includes="**/*.properties, **/*.gif, **/*.png" />
3083N/A </copy>
3083N/A </target>
3381N/A
3083N/A <target name="testinit" depends="testinit-package,testinit-recompile"
0N/A description="Prepare to execute the Directory Server TestNG unit tests.">
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}" />
5902N/A <javac srcdir="${unittest.testng.src.dir}" destdir="${unittest.classes.dir}" excludes="org/opends/server/snmp/**">
0N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
6165N/A <fileset refid="opendj.test.jars"/>
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" />
1527N/A <path refid="quickSetup.classpath" />
0N/A </classpath>
0N/A </javac>
2900N/A
2407N/A <copy todir="${unittest.classes.dir}">
2407N/A <fileset dir="${unittest.testng.src.dir}"
2407N/A includes="**/*.properties" />
2407N/A </copy>
712N/A
3349N/A <!-- Compile SNMP Tests if needed -->
3349N/A <antcall target="testsnmpinit"/>
3381N/A
233N/A <!-- Prep the TestNG XML file -->
675N/A
675N/A <condition property="test.groups" value="exclude=slow">
675N/A <not>
675N/A <or>
675N/A <isset property="test.groups" />
675N/A <isset property="test.packages" />
675N/A <isset property="test.classes" />
675N/A <isset property="test.methods" />
675N/A </or>
675N/A </not>
675N/A </condition>
675N/A
1559N/A <!-- do not run tests dependent upon creation of the .zip file -->
2123N/A <condition property="test.packages" value="org.opends.server.*,org.opends.messages.*">
1559N/A <and>
1559N/A <not>
1559N/A <or>
1559N/A <isset property="test.packages" />
1559N/A <isset property="test.classes" />
1559N/A <isset property="test.methods" />
1559N/A </or>
1559N/A </not>
1559N/A <not>
1559N/A <equals arg1="${package.built}" arg2="true" />
1559N/A </not>
1559N/A </and>
675N/A </condition>
2556N/A
1559N/A <!-- run tests dependent upon creation of the .zip file -->
2123N/A <condition property="test.packages" value="org.opends.server.*,org.opends.messages.*,org.opends.quicksetup.*">
1559N/A <and>
1559N/A <not>
1559N/A <or>
1559N/A <isset property="test.packages" />
1559N/A <isset property="test.classes" />
1559N/A <isset property="test.methods" />
1559N/A </or>
1559N/A </not>
1559N/A <equals arg1="${package.built}" arg2="true" />
1559N/A </and>
1559N/A </condition>
1559N/A
675N/A
675N/A <condition property="test.classes" value="">
675N/A <not>
675N/A <or>
675N/A <isset property="test.classes" />
675N/A <isset property="test.methods" />
675N/A </or>
675N/A </not>
675N/A </condition>
675N/A
675N/A <condition property="test.methods" value="">
675N/A <not>
675N/A <or>
675N/A <isset property="test.methods" />
675N/A </or>
675N/A </not>
675N/A </condition>
712N/A
233N/A <mkdir dir="${unittest.resource.dir}" />
233N/A <typedef name="preptestng" classname="org.opends.build.tools.PrepTestNG"
6976N/A classpath="${buildtools.jar}" />
233N/A
233N/A
233N/A <preptestng file="${testng.dir}/testng.xml"
233N/A tofile="${unittest.resource.dir}/testng.xml"
712N/A grouplist="${test.groups}"
567N/A packagelist="${test.packages}"
712N/A classList="${test.classes}"
567N/A methodList="${test.methods}" />
318N/A
712N/A <antcall target="testinit.checkFailedTestsOnly"/>
712N/A </target>
233N/A
1177N/A
1177N/A
1008N/A <!-- If we were asked to run only the tests that failed,
712N/A then we overwrite the testng.xml that we just generated
712N/A with testng-failed.xml, which TestNG generated. -->
712N/A <target name="testinit.checkFailedTestsOnly" if="test.failures">
712N/A <!-- Ensure that some of the tests failed last time. -->
1008N/A <available property="testng-failed.xml.exists"
712N/A file="${unittest.report.dir}/testng-failed.xml"/>
1008N/A <fail message="No unit tests failed in the previous run."
712N/A unless="testng-failed.xml.exists"/>
233N/A
6715N/A <!-- We replace the 'Failed suite [OpenDJ]' with 'OpenDJ' so we
6715N/A don't end up with 'Failed suite [Failed suite [OpenDJ]]]' etc. -->
712N/A <replace file="${unittest.report.dir}/testng-failed.xml"
6715N/A token="Failed suite [OpenDJ]"
6715N/A value="OpenDJ"/>
712N/A <replace file="${unittest.report.dir}/testng-failed.xml"
712N/A token="default(failed)"
712N/A value="default"/>
712N/A
712N/A <copy file="${unittest.report.dir}/testng-failed.xml"
712N/A tofile="${unittest.resource.dir}/testng.xml"
712N/A overwrite="true"/>
1008N/A
712N/A <echo message="Will run the failed unit tests only"/>
0N/A </target>
0N/A
1177N/A
1177N/A
675N/A <!-- Generate coverage diff report -->
675N/A <target name="coveragediff">
675N/A <condition property="test.diff.srcpath" value="">
675N/A <not>
675N/A <isset property="test.diff.srcpath" />
675N/A </not>
675N/A </condition>
21N/A
675N/A <condition property="test.diff.enabled" value="true">
675N/A <not>
675N/A <isset property="test.diff.disable" />
675N/A </not>
675N/A </condition>
675N/A
699N/A <condition property="test.diff.verbose" value="false">
699N/A <not>
699N/A <isset property="test.diff.verbose" />
699N/A </not>
699N/A </condition>
699N/A
675N/A <condition property="test.diff.enabled" value="false">
675N/A <isset property="test.diff.disable" />
675N/A </condition>
675N/A
1849N/A <!-- The SVN revision to perform the diff against when calculating
1849N/A the coverage diff. It can be a revision number, a timestamp,
1849N/A or a revision keyword (BASE, COMMITTED, and PREV make the
1849N/A most sense). The primary use case for this setting is to do
1849N/A a coverage diff against the previous revision when there are
1849N/A no changes in the working copy. It defaults to BASE. -->
1849N/A <condition property="test.diff.from.revision" value="BASE">
1849N/A <not>
1849N/A <isset property="test.diff.from.revision" />
1849N/A </not>
1849N/A </condition>
1849N/A
675N/A <mkdir dir="${cvgdiff.report.dir}" />
675N/A <taskdef name="coveragediff" classname="org.opends.build.tools.CoverageDiff">
675N/A <classpath>
675N/A <fileset dir="${build.dir}/build-tools">
675N/A <include name="*.jar" />
675N/A </fileset>
675N/A <fileset dir="${emma.dir}">
675N/A <include name="*.jar" />
675N/A </fileset>
7302N/A <fileset dir="${svnkit.lib.dir}">
729N/A <include name="*.jar" />
729N/A </fileset>
675N/A </classpath>
675N/A </taskdef>
675N/A
675N/A <coveragediff emmadatapath="${coverage.data.dir}"
675N/A outputpath="${cvgdiff.report.dir}"
712N/A diffpath="${test.diff.srcpath}"
699N/A enabled="${test.diff.enabled}"
1849N/A verbose="${test.diff.verbose}"
1849N/A fromrevision="${test.diff.from.revision}" />
675N/A
712N/A </target>
21N/A
1177N/A
1177N/A
0N/A <!-- Execute the Directory Server TestNG unit tests in text mode. -->
185N/A <target name="enableTestNGAssertions">
185N/A <property name="TESTASSERT" value="true"/>
185N/A </target>
185N/A
1177N/A
1177N/A
318N/A <!-- Execute Directory Server TestNG unit tests specified from CLI -->
699N/A <target name="testcustom">
712N/A <echo message="This target is deprecated. Please use the test target as it now supports the test.* properties." />
318N/A </target>
185N/A
1177N/A
1177N/A
185N/A <!-- Execute all of the Directory Server TestNG unit tests in text mode. -->
185N/A <target name="testall"
3083N/A depends="enableTestNGAssertions,prepdefaultalltest,testinit,runtests"
712N/A description="Run all of the TestNG tests (including 'slow' ones) with assertions enabled. See 'testwithcoverage' for properties you can set.">
185N/A </target>
185N/A
185N/A
1177N/A
185N/A <!-- Execute the Directory Server TestNG unit tests in text mode. -->
21N/A <target name="test"
1238N/A depends="testinit,runtests"
712N/A description="Execute the Directory Server TestNG unit tests in text mode. Set '-Dorg.opends.test.suppressOutput=false' to see the output from the unit tests. Set '-Dtest.failures=true' to run only the tests that failed previously.">
121N/A </target>
121N/A
5037N/A <!-- Display Java version which will be used for tests. -->
5037N/A <target name="displayjavaversion">
5044N/A <echo message="The following Java version will be used :"/>
5037N/A <echo message=""/>
5037N/A <exec executable="java">
5037N/A <arg value="-version"/>
5037N/A </exec>
5037N/A <echo message=""/>
5037N/A <echo message=""/>
5037N/A </target>
1177N/A
121N/A <!-- Execute the Directory Server TestNG unit tests in text mode with a coverage report. -->
121N/A <target name="testwithcoverage"
675N/A depends="coverage,test,coveragediff"
699N/A description="Execute the Directory Server TestNG unit tests in text mode with a coverage report. Use -Dtest.packages, -Dtest.classes, or -Dtest.methods to control which unit tests are run. Use -Dtest.diff.srcpath to control which src files show up in the coverage diff. See the 'test' package for other properties you can set.">
121N/A </target>
121N/A
233N/A <!-- Execute the Directory Server TestNG unit tests in text mode with a coverage report and slow tests. -->
233N/A <target name="testallwithcoverage"
675N/A depends="coverage,testall,coveragediff"
699N/A description="The same as 'testwithcoverage' except 'testall' is run instead of 'test'.">
233N/A </target>
233N/A
318N/A <!-- Execute the Directory Server TestNG unit tests specified from CLI in text mode with a coverage report. -->
699N/A <target name="testcustomwithcoverage">
675N/A <echo message="This target is deprecated. Please use the testwithcoverage target as it now supports the test.* properties." />
318N/A </target>
318N/A
712N/A <target name="testhelp" unless="disable.test.help">
712N/A <echo message="About to run the unit tests. Ant options to control the tests:"/>
712N/A <echo message=""/>
712N/A <echo message=" -Dorg.opends.test.suppressOutput=false"/>
712N/A <echo message=" writes the unit test output to the screen"/>
712N/A <echo message=""/>
2342N/A <echo message=" -Dtest.progress=&quot;default,memory&quot;"/>
2342N/A <echo message=" Unless explicity disabled using -Dtest.progress=none, the"/>
2342N/A <echo message=" tests provide continuous progress of the tests that are being"/>
2342N/A <echo message=" run. The specific options to set for this property are"/>
2342N/A <echo message=""/>
2342N/A <echo message=" none: no progress output"/>
2342N/A <echo message=" all: enables all progress (slows tests)"/>
2342N/A <echo message=" default: same as &quot;time,count,restarts&quot;"/>
2342N/A <echo message=" time: timing information for the tests"/>
2342N/A <echo message=" count: # of run test classes, methods, and invocations"/>
2342N/A <echo message=" memory: running total of memory usage (slows tests)"/>
2342N/A <echo message=" threadcount: running total of active threads"/>
2342N/A <echo message=" threadchange: +/- changes for active threads between tests"/>
2342N/A <echo message=" restarts: running total of in-core server restarts"/>
2342N/A <echo message=""/>
2342N/A <echo message=" To specifying multiple values, nseparate them with ',' and"/>
2342N/A <echo message=" quote the entire value. For instance, when you want the default"/>
2342N/A <echo message=" output plus more, do -Dtest.progress=&quot;default,memory&quot;."/>
2342N/A <echo message=""/>
2342N/A <echo message=" Enabling memory progress slows down the tests significantly."/>
2342N/A <echo message=" Include the otherwise undocumented property &quot;gcs&quot; to see how"/>
2342N/A <echo message=" much time each progress line spends doing garbage collections"/>
2342N/A <echo message=" to get an accurate measure of memory usage."/>
2342N/A <echo message=""/>
2392N/A <echo message=" A new line of progress is written when TestNG completes running tests"/>
2392N/A <echo message=" for a class. This progress is reported immediately before TestNG"/>
2392N/A <echo message=" starts to run the first test of the next class. All @BeforeClass"/>
2392N/A <echo message=" and @BeforeMethod methods will have been invoked for the next"/>
2392N/A <echo message=" class as well as the @DataProvider (if any) for the first test method."/>
2392N/A <echo message=" Keep this in mind when debugging memory usage, running times, and"/>
2392N/A <echo message=" thread creation."/>
2342N/A <echo message=""/>
2342N/A <echo message=" -Dtestng.verbosity0to5=5"/>
2342N/A <echo message=" for example has TestNG dump the maximum amount of debugging"/>
2342N/A <echo message=" output to stdout. This output is useful to check the order"/>
2342N/A <echo message=" in which test methods are invoked. Valid values are integer"/>
2342N/A <echo message=" values from 0 (no output) to 5 (maximum output). Since this"/>
2342N/A <echo message=" implicitly sets -Dorg.opends.test.suppressOutput=false,"/>
2342N/A <echo message=" other stderr/stdout output generated by the unit tests will"/>
2342N/A <echo message=" also be displayed."/>
2342N/A <echo message=""/>
1016N/A <echo message=" -Dorg.opends.test.pauseOnFailure=true"/>
1016N/A <echo message=" pauses the test suite whenever a failure occurs allowing you to inspect"/>
1016N/A <echo message=" the server more closely in the failure state"/>
1016N/A <echo message=""/>
2342N/A <echo message=" -Dorg.opends.test.copyClassesToTestPackage=true"/>
2342N/A <echo message=" copies the classes into the test server root. This enables you to run"/>
2342N/A <echo message=" the server tools on the test server. It can slow down the test startup"/>
2342N/A <echo message=" so the files are not copied by default."/>
2342N/A <echo message=""/>
6968N/A <echo message=" -Dtest.failures=true"/>
712N/A <echo message=" runs only the tests that failed last time"/>
712N/A <echo message=""/>
3538N/A <echo message=" -Dorg.opends.server.debug.target=org.opends.server.core:level=verbose,category=data"/>
902N/A <echo message=" for example only include debug messages in the core"/>
902N/A <echo message=" package that are related to data access and at the" />
902N/A <echo message=" verbose level or higher. The syntax of this target" />
902N/A <echo message=" definition is the same as the org.opends.server.debug.target.x" />
1960N/A <echo message=" property when starting ${SHORT_NAME}. " />
902N/A <echo message=" Default debug target:"/>
3538N/A <echo message=" org.opends.server:level=warning,category=caught|data|database-access|message|protocol,stack,cause" />
2342N/A <echo message=""/>
7126N/A <echo message=" -Dorg.opends.test.replicationDbImpl=LOG"/>
7126N/A <echo message=" indicates which implementation to use for replication DB."/>
7126N/A <echo message=" Value must be one of: JE, LOG." />
7126N/A <echo message=" JE: use berkeley DB JE as implementation." />
7126N/A <echo message=" LOG: use log file as implementation." />
7126N/A <echo message=" Default value is LOG." />
7126N/A <echo message=""/>
2342N/A <echo message=" -Dtest.diff.srcpath=src/server/org/opends/server/core"/>
2342N/A <echo message=" for example includes only the classes in"/>
2342N/A <echo message=" src/server/org/opends/server/core in the coveragediff report."/>
2342N/A <echo message=" To list multiple directories or files, separate them with"/>
2342N/A <echo message=" a space as you would an argument list to 'svn diff' and quote"/>
2342N/A <echo message=" the whole value."/>
902N/A <echo message=""/>
1666N/A <echo message=" -Dtest.groups=exclude=slow"/>
1666N/A <echo message=" for example excludes the slow tests. Each value is expected" />
1666N/A <echo message=" group inclusion/exclusion clause which consists of either 'include'" />
1666N/A <echo message=" or 'exclude' followed by the '=' character and then a group name." />
1666N/A <echo message=" For multiple group clauses, separate them with a ',' and "/>
1666N/A <echo message=" quote the entire value. Debug logging is disabled."/>
1666N/A <echo message=""/>
712N/A <echo message=" -Dtest.packages=org.opends.server.api"/>
712N/A <echo message=" for example runs only the tests in the api package"/>
712N/A <echo message=" For multiple packages, separate them with a ',' and "/>
984N/A <echo message=" quote the entire value. Debug logging is disabled."/>
712N/A <echo message=""/>
712N/A <echo message=" -Dtest.classes=org.opends.server.types.TestDN"/>
712N/A <echo message=" for example only runs the TestDN class"/>
712N/A <echo message=" For multiple classes, separate them with a ',' and "/>
984N/A <echo message=" quote the entire value. Debug logging is disabled."/>
712N/A <echo message=""/>
712N/A <echo message=" -Dtest.methods=org.opends.server.types.TestDN.testGetRDN"/>
712N/A <echo message=" for example only runs the testGetRDN method"/>
1666N/A <echo message=" For multiple methods within the same class, append additional"/>
1666N/A <echo message=" method names to the end separating them with a ',' and "/>
984N/A <echo message=" quote the entire value. Debug logging is disabled."/>
712N/A <echo message=""/>
2342N/A <echo message=" -Dtest.remote.debug.port=5005"/>
2342N/A <echo message=" for example will allow you to remotely debug the unit tests from"/>
2342N/A <echo message=" the debugger of your choice by pointing it at port 5005."/>
2342N/A <echo message=" The unit tests will not start to run until the debugger is attached"/>
4006N/A <echo message=" unless you also specify -Dtest.remote.debug.suspend=n."/>
712N/A <echo message=""/>
712N/A </target>
712N/A
1177N/A
1177N/A
121N/A <!-- Internal target to execute the Directory Server TestNG unit tests in text mode after everything has been initialized. -->
121N/A <target name="runtests">
712N/A <antcall target="testhelp"/>
5037N/A <antcall target="displayjavaversion"/>
712N/A
0N/A <mkdir dir="${unittest.report.dir}" />
1008N/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
185N/A <!-- This sets TESTASSERT to false if and only if it's not already set. -->
161N/A <condition property="TESTASSERT" value="false">
161N/A <not>
161N/A <isset property="TESTASSERT" />
161N/A </not>
161N/A </condition>
503N/A
2342N/A <!-- This sets testng.verbosity if it's not already set. -->
2342N/A <condition property="testng.verbosity0to5" value="0">
2342N/A <not>
2342N/A <isset property="testng.verbosity0to5" />
2342N/A </not>
2342N/A </condition>
2342N/A
2342N/A <!-- This sets unsuppresses the test output if and only if testng
2342N/A is configured to dump debug output. -->
2342N/A <condition property="org.opends.test.suppressOutput" value="false">
2342N/A <not>
2342N/A <equals arg1="${testng.verbosity0to5}" arg2="0"/>
2342N/A </not>
2342N/A </condition>
2342N/A
7126N/A <!-- This sets org.opends.test.replicationDbImpl if and only if it's not
7126N/A already set. -->
7126N/A <condition property="org.opends.test.replicationDbImpl" value="LOG">
7126N/A <not>
7126N/A <isset property="org.opends.test.replicationDbImpl" />
7126N/A </not>
7126N/A </condition>
7126N/A
7126N/A <!-- This sets org.opends.test.suppressOutput if and only if it's not
503N/A already set. -->
712N/A <condition property="org.opends.test.suppressOutput" value="true">
503N/A <not>
503N/A <isset property="org.opends.test.suppressOutput" />
503N/A </not>
503N/A </condition>
712N/A
7126N/A <!-- This sets org.opends.test.pauseOnFailure if and only if it's not
1016N/A already set. -->
1016N/A <condition property="org.opends.test.pauseOnFailure" value="false">
1016N/A <not>
1016N/A <isset property="org.opends.test.pauseOnFailure" />
1016N/A </not>
1016N/A </condition>
1016N/A
3538N/A <!-- This sets org.opends.server.debug.target if and only if its's not
1590N/A already set. -->
3538N/A <condition property="org.opends.server.debug.target"
3538N/A value="org.opends.server:level=warning,category=caught|data|database-access|message|protocol,stack,cause">
902N/A <not>
3538N/A <isset property="org.opends.server.debug.target" />
902N/A </not>
902N/A </condition>
902N/A
2342N/A <condition property="org.opends.test.copyClassesToTestPackage"
2342N/A value="false">
2342N/A <not>
2342N/A <isset property="org.opends.test.copyClassesToTestPackage" />
2342N/A </not>
2342N/A </condition>
2342N/A
2342N/A <condition property="test.progress"
2342N/A value="">
2342N/A <not>
2342N/A <isset property="test.progress" />
2342N/A </not>
2342N/A </condition>
2342N/A
2342N/A
2342N/A <!-- If the debug port was set, we pass these options into the <testng> target below:
2556N/A -Xdebug
2556N/A -Xnoagent
2556N/A -Djava.compiler=NONE
2342N/A -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
2342N/A -->
2342N/A <condition property="test.remote.debug.suspend" value="y">
2342N/A <not>
2342N/A <isset property="test.remote.debug.suspend" />
2342N/A </not>
2342N/A </condition>
2342N/A <condition property="jvm.debug.arg1" value="-Xdebug" else="-Dopends.bogus.debug.arg1">
2342N/A <isset property="test.remote.debug.port" />
2342N/A </condition>
2342N/A <condition property="jvm.debug.arg2" value="-Xnoagent" else="-Dopends.bogus.debug.arg2">
2342N/A <isset property="test.remote.debug.port" />
2342N/A </condition>
2342N/A <condition property="jvm.debug.arg3" value="-Djava.compiler=NONE" else="-Dopends.bogus.debug.arg3">
2342N/A <isset property="test.remote.debug.port" />
2342N/A </condition>
2556N/A <condition property="jvm.debug.arg4"
2556N/A value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${test.remote.debug.suspend},address=${test.remote.debug.port}"
2342N/A else="-Dopends.bogus.debug.arg4">
2342N/A <isset property="test.remote.debug.port" />
2342N/A </condition>
2342N/A
2342N/A
902N/A <!-- Cleanout the old reports. Otherwise, the old testng-failed.xml
712N/A will hang around even if all of the tests pass. -->
712N/A <delete>
712N/A <fileset dir="${unittest.report.dir}" includes="*"/>
712N/A </delete>
712N/A
1008N/A <!-- Our testng listener will remove this file if all of the
712N/A tests passed. This allows us to generate the coverage
712N/A report even if the tests failed and still fail the build. -->
712N/A <touch file="${unittest.report.dir}/.tests-failed-marker"/>
712N/A
712N/A <testng outputdir="${unittest.report.dir}"
712N/A haltonfailure="false"
2342N/A verbose="${testng.verbosity0to5}"
712N/A enableAssert="${TESTASSERT}"
712N/A listeners="org.opends.server.TestListener org.testng.reporters.FailedReporter"
712N/A useDefaultListeners="false"
712N/A suiteRunnerClass="org.opends.server.SuiteRunner">
0N/A <classpath>
0N/A <pathelement location="${coverage.instr.dir}" />
151N/A <pathelement location="${classes.dir}" />
1527N/A <pathelement location="${quicksetup.classes.dir}" />
151N/A <pathelement location="${unittest.classes.dir}" />
2086N/A <pathelement location="${resource.dir}" />
0N/A <path refid="run.classpath" />
42N/A <path refid="emma.lib" />
0N/A
6158N/A <fileset refid="opendj.runtime.jars"/>
6165N/A <fileset refid="opendj.test.jars"/>
0N/A
2046N/A <!-- Needed by quicksetup tests -->
1559N/A <fileset dir="${build.dir}/build-tools">
1559N/A <include name="build-tools.jar" />
1559N/A </fileset>
1559N/A
0N/A <fileset dir="${testng.lib.dir}">
0N/A <include name="*.jar" />
0N/A </fileset>
3381N/A
3349N/A <fileset dir="${opendmk.lib.dir}">
3349N/A <include name="*.jar"/>
3349N/A </fileset>
0N/A </classpath>
6158N/A
6158N/A <jvmarg value="-Demma.coverage.out.file=${coverage.data.dir}/unit.emma" />
42N/A <jvmarg value="-Demma.coverage.out.merge=false" />
151N/A <jvmarg value="-Dorg.opends.server.BuildRoot=${basedir}" />
5058N/A <jvmarg value="-Dorg.opends.server.BuildDir=${build.dir}" />
937N/A <jvmarg value="-Dorg.opends.server.RunningUnitTests=true" />
3368N/A <jvmarg value="-Dorg.opends.server.snmp.opendmk=${opendmk.lib.dir}"/>
7126N/A <jvmarg value="-Dorg.opends.test.replicationDbImpl=${org.opends.test.replicationDbImpl}" />
503N/A <jvmarg value="-Dorg.opends.test.suppressOutput=${org.opends.test.suppressOutput}" />
1016N/A <jvmarg value="-Dorg.opends.test.pauseOnFailure=${org.opends.test.pauseOnFailure}" />
3538N/A <jvmarg value="-Dorg.opends.server.debug.target=${org.opends.server.debug.target}" />
2342N/A <jvmarg value="-Dorg.opends.test.copyClassesToTestPackage=${org.opends.test.copyClassesToTestPackage}" />
2342N/A <jvmarg value="-Dtest.progress=${test.progress}" />
371N/A <jvmarg value="-Xms${MEM}" />
712N/A <jvmarg value="-Xmx${MEM}" />
2342N/A <jvmarg value="${jvm.debug.arg1}" />
2342N/A <jvmarg value="${jvm.debug.arg2}" />
2342N/A <jvmarg value="${jvm.debug.arg3}" />
2342N/A <jvmarg value="${jvm.debug.arg4}" />
6158N/A
233N/A <xmlfileset dir="${unittest.resource.dir}" includes="testng.xml" />
0N/A </testng>
121N/A
712N/A <!-- Our testng listener will create this file if any of the
712N/A tests failed. This allows us to generate the coverage
712N/A report even if the tests failed. -->
1008N/A <available property="testng.tests.failed"
712N/A file="${unittest.report.dir}/.tests-failed-marker"/>
712N/A
712N/A <!-- Delete all of the report suite sub-directories since we only
712N/A have a single suite. -->
1960N/A <delete dir="${unittest.report.dir}/${SHORT_NAME}"/>
712N/A
42N/A <emma enabled="${coverage.enabled}" >
95N/A <report sourcepath="${src.dir}" >
422N/A <fileset dir="${coverage.data.dir}" >
1008N/A <include name="unit.emma" />
1008N/A <include name="metadata.emma" />
422N/A </fileset>
42N/A
724N/A <txt outfile="${coverage.report.dir}/coverage.txt" />
422N/A <html outfile="${coverage.report.dir}/index.html" />
724N/A <xml outfile="${coverage.report.dir}/coverage.xml" />
42N/A </report>
712N/A
42N/A </emma>
121N/A
712N/A <!-- We delay failing until after the coverage report is generated. -->
712N/A <fail message="The unit tests failed." if="testng.tests.failed"/>
712N/A
0N/A </target>
0N/A
1177N/A
1177N/A
318N/A <target name="prepdefaultalltest">
984N/A <condition property="test.groups" value="">
984N/A <not>
984N/A <or>
984N/A <isset property="test.groups" />
984N/A <isset property="test.packages" />
984N/A <isset property="test.classes" />
984N/A <isset property="test.methods" />
984N/A </or>
984N/A </not>
984N/A </condition>
984N/A </target>
984N/A
1177N/A
1177N/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
121N/A
3381N/A
3381N/A
1177N/A <target name="buildtools" depends="init"
233N/A description="Builds the build tools">
233N/A
233N/A <mkdir dir="${buildtools.classes.dir}" />
233N/A
3646N/A <copy file="${resource.dir}/Messages.java.stub" todir="${buildtools.classes.dir}/org/opends/build/tools/resource"/>
3646N/A
2086N/A <javac srcdir="${src.dir}:${msg.src.dir}" destdir="${buildtools.classes.dir}"
2086N/A sourcepath=""
2086N/A includes="org/opends/messages/Severity.java,
2086N/A org/opends/messages/Category.java,
2086N/A org/opends/messages/Message.java,
2086N/A org/opends/messages/MessagePropertyKey.java,
2940N/A org/opends/messages/MessageDescriptor.java,
2940N/A org/opends/server/types/PublicAPI.java,
5902N/A org/opends/server/types/StabilityLevel.java"/>
2086N/A
2086N/A
5902N/A <javac srcdir="${buildtools.src.dir}" destdir="${buildtools.classes.dir}">
233N/A <classpath>
233N/A <fileset dir="${ant.lib.dir}">
233N/A <include name="*.jar" />
233N/A </fileset>
578N/A
578N/A <fileset dir="${emma.dir}">
578N/A <include name="*.jar" />
578N/A </fileset>
729N/A
7302N/A <fileset dir="${svnkit.lib.dir}">
729N/A <include name="*.jar" />
729N/A </fileset>
729N/A
233N/A <path refid="run.classpath" />
233N/A </classpath>
233N/A </javac>
233N/A
6976N/A <jar jarfile="${buildtools.jar}"
233N/A basedir="${buildtools.classes.dir}" compress="true" index="true" />
233N/A </target>
1008N/A
1177N/A
1177N/A
1008N/A <!-- Code generation for core administration components. -->
6210N/A <target name="generateadmin" depends="validateadmin" description="Code generation for configuration Object.">
1177N/A <!-- The XSLT task creates a lot of noise.
1177N/A I can't find any other way to shut it up. -->
1177N/A <condition property="antcmd" value="ant.bat">
1177N/A <os family="windows" />
1177N/A </condition>
1238N/A
1177N/A <condition property="antcmd" value="ant">
1177N/A <not>
1177N/A <isset property="antcmd" />
1177N/A </not>
1177N/A </condition>
1238N/A
6200N/A <exec executable="${ant.dir}/bin/${antcmd}" failonerror="true">
1177N/A <arg value="-buildfile" />
1177N/A <arg value="${ant.file}" />
5058N/A <arg value="-Dbuild.dir=${build.dir}" />
6210N/A <arg value="-Dadmin.src.dir=${admin.src.dir}" />
1177N/A <arg value="-quiet" />
6210N/A <arg value="generateadminsubtask" />
2813N/A <env key="ANT_OPTS" value="-Xmx${MEM}" />
5058N/A <!-- Set classpath to workaround Apple JDK Xalan conflict -->
5058N/A <env key="CLASSPATH" value="${ext.dir}/xalan-j/xalan.jar" />
1177N/A </exec>
1177N/A </target>
1177N/A
3381N/A
3381N/A
6210N/A <target name="generateadminsubtask">
5058N/A <!-- Xalan-J Class Path : refer to it explicitly from each XSLT task. -->
5058N/A <path id="xalan.class.path">
5058N/A <fileset dir="${ext.dir}/xalan-j">
5058N/A <include name="*.jar" />
5058N/A </fileset>
5058N/A </path>
5058N/A
1008N/A <!-- Generate introspection API for core administration components. -->
4156N/A <xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/*Configuration.xml"
5607N/A style="${admin.rules.dir}/metaMO.xsl">
1008N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/meta/\2CfgDefn.java" />
1008N/A <param name="base-dir" expression="${admin.defn.dir}" />
5058N/A <classpath refid="xalan.class.path" />
1008N/A </xslt>
1008N/A
1008N/A <xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/Package.xml" style="${admin.rules.dir}/package-info.xsl">
1008N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)\.xml$$" to="\1/meta/package-info.java" />
1008N/A <param name="type" expression="meta" />
5058N/A <classpath refid="xalan.class.path" />
1008N/A </xslt>
1008N/A
1008N/A <!-- Generate client API for core administration components. -->
4156N/A <xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/*Configuration.xml"
5607N/A style="${admin.rules.dir}/clientMO.xsl">
1008N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/client/\2CfgClient.java" />
1008N/A <param name="base-dir" expression="${admin.defn.dir}" />
5058N/A <classpath refid="xalan.class.path" />
1008N/A </xslt>
1008N/A
1008N/A <xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/Package.xml" style="${admin.rules.dir}/package-info.xsl">
1008N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)\.xml$$" to="\1/client/package-info.java" />
1008N/A <param name="type" expression="client" />
5058N/A <classpath refid="xalan.class.path" />
1008N/A </xslt>
1008N/A
1008N/A <!-- Generate server API for core administration components. -->
4156N/A <xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/*Configuration.xml"
5607N/A style="${admin.rules.dir}/serverMO.xsl">
1008N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/server/\2Cfg.java" />
1008N/A <param name="base-dir" expression="${admin.defn.dir}" />
5058N/A <classpath refid="xalan.class.path" />
1008N/A </xslt>
1008N/A
1008N/A <xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/Package.xml" style="${admin.rules.dir}/package-info.xsl">
1008N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)\.xml$$" to="\1/server/package-info.java" />
1008N/A <param name="type" expression="server" />
5058N/A <classpath refid="xalan.class.path" />
1008N/A </xslt>
1008N/A
1008N/A <!-- Generate LDAP profile for core administration components. -->
1008N/A <mkdir dir="${classes.dir}" />
4156N/A <xslt basedir="${admin.defn.dir}" destdir="${classes.dir}/admin/profiles/ldap" includes="**/*Configuration.xml"
5607N/A style="${admin.rules.dir}/ldapMOProfile.xsl">
1008N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/meta/\2CfgDefn.properties" />
1008N/A <param name="base-dir" expression="${admin.defn.dir}" />
5058N/A <classpath refid="xalan.class.path" />
1008N/A </xslt>
1008N/A
1530N/A <!-- Generate CLI profile for core administration components. -->
4156N/A <xslt basedir="${admin.defn.dir}" destdir="${classes.dir}/admin/profiles/cli" includes="**/*Configuration.xml"
5607N/A style="${admin.rules.dir}/cliMOProfile.xsl">
1530N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/meta/\2CfgDefn.properties" />
1530N/A <param name="base-dir" expression="${admin.defn.dir}" />
5058N/A <classpath refid="xalan.class.path" />
1530N/A </xslt>
1530N/A
1140N/A <!-- Generate I18N messages for core administration components. -->
4156N/A <xslt basedir="${admin.defn.dir}" destdir="${classes.dir}/admin/messages" includes="**/*Configuration.xml"
5607N/A style="${admin.rules.dir}/messagesMO.xsl">
1140N/A <regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/meta/\2CfgDefn.properties" />
1140N/A <param name="base-dir" expression="${admin.defn.dir}" />
5058N/A <classpath refid="xalan.class.path" />
1140N/A </xslt>
3381N/A
1008N/A <!-- Generate manifest file for core administration components. -->
1008N/A <tempfile property="admin.temp.dir" destDir="${build.dir}" prefix="tmp" />
1008N/A <mkdir dir="${admin.temp.dir}" />
4156N/A <xslt basedir="${admin.defn.dir}" destdir="${admin.temp.dir}" extension=".manifest" includes="**/*Configuration.xml"
5607N/A style="${admin.rules.dir}/manifestMO.xsl">
5058N/A <classpath refid="xalan.class.path" />
5058N/A </xslt>
1008N/A <concat destfile="${classes.dir}/admin/core.manifest">
1008N/A <fileset dir="${admin.temp.dir}" includes="**/*.manifest" />
1008N/A </concat>
1008N/A <delete dir="${admin.temp.dir}" />
1008N/A </target>
1008N/A
1177N/A
1177N/A
1008N/A <!-- Remove all dynamically-generated build files. -->
3853N/A <target name="cleanadmin" if="isadmingendirpresent" description="Clean up any generated source files for admin">
1008N/A <delete includeemptydirs="true">
1008N/A <fileset dir="${admin.src.dir}" includes="**/*" />
1008N/A </delete>
1008N/A </target>
1008N/A
1008N/A <!-- Validate core administration component XML definition files. -->
2459N/A <target name="validateadmin" description="Validate core administration component XML definition files.">
1008N/A <schemavalidate>
1008N/A <fileset dir="${admin.defn.dir}" includes="**/*.xml" />
1008N/A <schema namespace="http://www.opends.org/admin" file="${admin.rules.dir}/admin.xsd"/>
1008N/A <schema namespace="http://www.opends.org/admin-ldap" file="${admin.rules.dir}/admin-ldap.xsd"/>
1530N/A <schema namespace="http://www.opends.org/admin-cli" file="${admin.rules.dir}/admin-cli.xsd"/>
1008N/A </schemavalidate>
1008N/A </target>
1008N/A
2086N/A <!-- Remove all dynamically-generated build files. -->
3853N/A <target name="cleanmessages" if="ismsggendirpresent" description="Clean up any generated source files for messages">
2086N/A <delete includeemptydirs="true">
2086N/A <fileset dir="${msg.javagen.dir}" includes="**/*" />
2086N/A </delete>
2086N/A </target>
1395N/A
1395N/A <!-- Generate a src.zip file containing all the server source. -->
6210N/A <target name="srczip" depends="generateadmin"
1395N/A description="Generate a src.zip file with all the server source.">
1395N/A <zip destfile="${build.dir}/src.zip">
1395N/A <zipfileset dir="${src.dir}" excludes="**/.svn" filemode="644"
1395N/A dirmode="755" />
1395N/A <zipfileset dir="${admin.src.dir}" excludes="**/.svn" filemode="644"
1395N/A dirmode="755" />
1395N/A <zipfileset dir="${ads.src.dir}" excludes="**/.svn" filemode="644"
1395N/A dirmode="755" />
1395N/A <zipfileset dir="${quicksetup.src.dir}" excludes="**/.svn" filemode="644"
1395N/A dirmode="755" />
2033N/A <zipfileset dir="${guitools.src.dir}" excludes="**/.svn" filemode="644"
1395N/A dirmode="755" />
1395N/A </zip>
1395N/A </target>
1395N/A
3381N/A
3381N/A
1008N/A <!-- Generate example plugin package. -->
1008N/A <target name="example-plugin" if="pdir">
1008N/A <!-- Create folder hierarchy in temporary directory. -->
1008N/A <tempfile property="plugin.temp.dir" destDir="${build.dir}" prefix="tmp"/>
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin" />
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin/src" />
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin/src-generated" />
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin/lib" />
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin/ext" />
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin/resource" />
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin/resource/admin" />
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin/resource/config" />
1008N/A <mkdir dir="${plugin.temp.dir}/example-plugin/resource/schema" />
3646N/A <mkdir dir="${plugin.temp.dir}/example-plugin/resource/messages" />
1008N/A <copy todir="${plugin.temp.dir}/example-plugin/src">
1008N/A <fileset dir="${admin.defn.dir}" includes="**/*.xml" />
1008N/A </copy>
1008N/A <copy todir="${plugin.temp.dir}/example-plugin/resource/admin">
1008N/A <fileset dir="${admin.rules.dir}" excludes="example-plugin/**" />
1008N/A </copy>
1008N/A <copy todir="${plugin.temp.dir}/example-plugin" file="${admin.rules.dir}/example-plugin/build.xml" />
1008N/A <copy todir="${plugin.temp.dir}/example-plugin" file="${admin.rules.dir}/example-plugin/README" />
1008N/A <copy todir="${plugin.temp.dir}/example-plugin/resource/schema" file="${admin.rules.dir}/example-plugin/99-example-plugin.ldif" />
1008N/A <copy todir="${plugin.temp.dir}/example-plugin/resource/config" file="${admin.rules.dir}/example-plugin/example-plugin.ldif" />
1008N/A <copy todir="${plugin.temp.dir}/example-plugin/src/com/example/opends">
1008N/A <fileset dir="${admin.rules.dir}/example-plugin" includes="*.java,*.xml" excludes="build.xml" />
1008N/A </copy>
6976N/A <copy todir="${plugin.temp.dir}/example-plugin/lib" file="${buildtools.jar}" />
3646N/A <copy todir="${plugin.temp.dir}/example-plugin/resource/messages/com/example/opends/messages" file="${admin.rules.dir}/example-plugin/example_plugin.properties" />
3646N/A <copy todir="${plugin.temp.dir}/example-plugin/resource/messages/com/example/opends/messages" file="${admin.rules.dir}/example-plugin/example_plugin_fr.properties" />
5614N/A <!-- Package up the plugin in the OpenDJ package folder. -->
1008N/A <zip destfile="${pdir}/example-plugin.zip">
1008N/A <zipfileset dir="${plugin.temp.dir}" filemode="644" dirmode="755" />
1008N/A </zip>
1008N/A <delete dir="${plugin.temp.dir}" />
1008N/A </target>
3381N/A
3349N/A <target name="snmpmessagebuild" if="isopendmkpresent">
3349N/A <echo message="SNMP extension will be built and included in the delivery."/>
3349N/A <echo message="OpenDMK jar file location is ${opendmk.lib.dir}/jdmkrt.jar"/>
3349N/A </target>
3381N/A
3349N/A <target name="snmpmessageNotbuild" unless="isopendmkpresent">
4009N/A <echo message="Building without SNMP extension."/>
4009N/A <echo message="To build with SNMP extension set opendmk.lib.dir build property"/>
4009N/A <echo message="to indicate the location of the OpenDMK jar files. OpenDMK jars"/>
4009N/A <echo message="can be found at OpenDMK project at https://opendmk.dev.java.net"/>
3349N/A </target>
3381N/A
3349N/A <target name="snmpecho" depends="snmpmessageNotbuild,snmpmessagebuild"/>
3381N/A
3349N/A <!-- SNMP targets -->
3349N/A <target name="cleansnmp" description="Clean up any SNMP generated source files">
3349N/A <delete includeemptydirs="true" failonerror="false">
3349N/A <fileset dir="${snmp.gen.dir}" includes="**/*" />
3349N/A </delete>
3349N/A </target>
3381N/A
3349N/A <target name="mibgeneration" if="isopendmkpresent" description="mibgen invocation">
3349N/A <property name="opendmktk.path" location="${opendmk.lib.dir}/jdmktk.jar"/>
3349N/A <mkdir dir="${snmp.gen.dir}/org/opends/server/snmp" />
3349N/A <exec dir="${snmp.mib.dir}" executable="java">
3349N/A <arg line="-classpath ${opendmktk.path}
3381N/A com.sun.jdmk.tools.MibGen -X:use-display-hint
5286N/A -d &quot;${snmp.gen.dir}/org/opends/server/snmp&quot; -mc -desc
5286N/A -tp org.opends.server.snmp &quot;${snmp.mib.dir}/rfc2605.txt&quot;
5286N/A &quot;${snmp.mib.dir}/mib_core.txt&quot;
5286N/A &quot;${snmp.mib.dir}/rfc2021.txt&quot; &quot;${snmp.mib.dir}/rfc2788.txt&quot;"/>
3349N/A </exec>
3349N/A </target>
3381N/A
3349N/A <target name="compilesnmp"
4008N/A depends="mibgeneration"
3349N/A if="isopendmkpresent"
3349N/A description="Compile the SNMP Connection Handler extension source files.">
3381N/A
3349N/A <mkdir dir="${classes.dir}" />
3349N/A
5902N/A <javac srcdir="${snmp.gen.dir}" destdir="${classes.dir}" >
5902N/A <compilerarg value="-Xlint:-serial" />
3349N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
3349N/A <fileset dir="${opendmk.lib.dir}">
3349N/A <include name="*.jar" />
3349N/A </fileset>
3349N/A </classpath>
3349N/A </javac>
3381N/A
5902N/A <javac srcdir="${snmp.src.dir}" destdir="${classes.dir}">
3349N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
3349N/A <fileset dir="${opendmk.lib.dir}">
3349N/A <include name="*.jar" />
3349N/A </fileset>
3349N/A </classpath>
3349N/A </javac>
3349N/A </target>
3349N/A
3381N/A
3349N/A <!-- Package the SNMP Directory Server extension for distribution. -->
3381N/A <target name="package-snmp" if="isopendmkpresent" depends="snmpecho,compilesnmp"
3349N/A description="Package the SNMP Directory Server extension for distribution.">
3349N/A <property name="pdir" location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
3349N/A <mkdir dir="${pdir}/lib/extensions" />
3349N/A <mkdir dir="${pdir}/snmp/mib"/>
6238N/A <mkdir dir="${pdir}/template/config/snmp/security" />
3349N/A <!-- Copy security template files -->
6238N/A <copy todir="${pdir}/template/config/snmp/security">
3349N/A <fileset dir="${snmp.security.dir}"/>
3349N/A </copy>
3349N/A <!-- Copy the mib -->
3349N/A <copy todir="${pdir}/snmp/mib" file="${snmp.mib.dir}/rfc2605.txt"/>
3381N/A
3349N/A <!-- Update the config.ldif file with snmp config -->
6238N/A <concat destfile="${pdir}/template/config/config.ldif" append="true">
3349N/A <filelist dir="${snmp.config.dir}" files="config.snmp.ldif"/>
3349N/A </concat>
3381N/A
3349N/A <!-- Create the jar file -->
3349N/A <jar jarfile="${pdir}/lib/extensions/snmp-mib2605.jar"
3349N/A basedir="${classes.dir}"
3349N/A includes="org/opends/server/snmp/**"
3853N/A compress="true" index="true" >
3853N/A <manifest>
3853N/A <attribute name="Extension-Name" value="snmp-mib2605"/>
3853N/A <attribute name="Implementation-Version" value="${VERSION_NUMBER_STRING}"/>
3853N/A <attribute name="Revision-Number" value="${REVISION_NUMBER}"/>
3853N/A </manifest>
3853N/A </jar>
4686N/A <!-- Add admin/extension.manifest into the extension jar file -->
4686N/A <jar jarfile="${pdir}/lib/extensions/snmp-mib2605.jar"
4686N/A basedir="${snmp.resource.dir}"
4686N/A includes="admin/**"
4686N/A compress="true" index="true" update="yes">
4686N/A </jar>
3349N/A <echo message="SNMP Extension is built"/>
3349N/A <echo message="${pdir}/lib/extensions/snmp-mib2605.jar"/>
3349N/A </target>
3381N/A
5310N/A <target name="testsnmpinit" if="isopendmkpresent" depends="init">
3349N/A <!-- Compile the SNMP test cases -->
3349N/A <mkdir dir="${unittest.classes.dir}" />
3349N/A <javac srcdir="${unittest.testng.src.dir}" destdir="${unittest.classes.dir}"
5902N/A includes="org/opends/server/snmp/**">
3349N/A <classpath>
6158N/A <fileset refid="opendj.runtime.jars"/>
6165N/A <fileset refid="opendj.test.jars"/>
3349N/A
3349N/A <fileset dir="${testng.lib.dir}">
3349N/A <include name="*.jar" />
3349N/A </fileset>
3381N/A
3349N/A <fileset dir="${opendmk.lib.dir}">
3349N/A <include name="*.jar" />
3349N/A </fileset>
3349N/A
3349N/A <path refid="run.classpath" />
3349N/A <path refid="quickSetup.classpath" />
3349N/A </classpath>
3349N/A </javac>
3349N/A </target>
3381N/A
6133N/A <!-- ==============
6133N/A IVY TARGETS
6133N/A =================== -->
6133N/A
6133N/A <target name="check-ivy-installed">
6133N/A <available file="${ivy.jar.file}" property="ivy-installed"/>
6133N/A </target>
6133N/A
6133N/A <target name="download-ivy" depends="check-ivy-installed" unless="ivy-installed">
6133N/A <mkdir dir="${ext.dir}"/>
6133N/A <!-- download Ivy from web site so that it can be used even without any special installation -->
6133N/A <echo message="installing ivy..."/>
6133N/A <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/>
6133N/A </target>
6133N/A
6133N/A <target name="install-ivy" depends="download-ivy" description="--> install ivy">
6133N/A <!-- try to load ivy here from local ivy dir, in case the user has not already dropped
6133N/A it into ant's lib dir (note that the latter copy will always take precedence).
6133N/A We will not fail as long as local lib dir exists (it may be empty) and
6133N/A ivy is in at least one of ant's lib dir or the local lib dir. -->
6133N/A <path id="ivy.lib.path">
6133N/A <fileset dir="${ext.dir}" includes="*.jar"/>
6133N/A </path>
6133N/A <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
6133N/A </target>
6133N/A
6133N/A <target name="resolve" depends="install-ivy" description="--> retrieve dependencies with ivy">
6917N/A <ivy:retrieve pattern="${lib.dir}/[type]/[artifact].[ext]">
6917N/A <firstmatchmapper>
7297N/A <!-- Using regexpmapper's handledirsep attribute for Windows builds.
7297N/A See https://ant.apache.org/manual/Types/mapper.html -->
7297N/A <regexpmapper from="(.*/(source|javadoc)/.*)" to="\1" handledirsep="true"/>
6917N/A <!-- Separate test and compile jars ala Maven -->
7299N/A <regexpmapper from="(.*)/(jar|bundle)/(.*(?:assertj-core|hamcrest-core|junit|mockito-core|objenesis)\.jar)" to="\1/test/\3" handledirsep="true"/>
7297N/A <regexpmapper from="(.*)/(jar|bundle)/(.*)" to="\1/compile/\3" handledirsep="true"/>
6917N/A </firstmatchmapper>
6917N/A </ivy:retrieve>
6133N/A </target>
6133N/A
6916N/A <property name="snapshots.dir" value="${lib.dir}/snapshots" />
6916N/A <target name="resolve-snapshots-separately" depends="install-ivy">
6916N/A <ivy:retrieve type="jar,bundle" pattern="${lib.dir}/[artifact]-[revision].[ext]">
6916N/A <firstmatchmapper>
6916N/A <globmapper from="${lib.dir}/*-SNAPSHOT.jar" to="${snapshots.dir}/*-SNAPSHOT.jar" />
6916N/A <globmapper from="${lib.dir}/*" to="${lib.dir}/releases/*" />
6916N/A </firstmatchmapper>
6916N/A </ivy:retrieve>
6916N/A </target>
6916N/A
6916N/A <fileset dir="${snapshots.dir}" id="snapshots.dir.ref" erroronmissingdir="false">
6916N/A <include name="**"/>
6916N/A </fileset>
6916N/A <target name="check-no-snapshot-dependencies" depends="cleanlib,resolve-snapshots-separately">
6916N/A <fail message="The project must not depend on snapshot dependencies. Found: ${toString:snapshots.dir.ref}">
6916N/A <condition>
6916N/A <resourcecount refid="snapshots.dir.ref" when="greater" count="0" />
6916N/A </condition>
6916N/A </fail>
6916N/A <antcall target="cleanlib" />
6916N/A <echo message="OK." />
6916N/A </target>
6916N/A
6133N/A <target name="cleanlib" description="--> clean the lib directory">
6916N/A <delete includeemptydirs="true">
6133N/A <fileset dir="${lib.dir}">
6916N/A <include name="**" />
6916N/A <exclude name="opendj_service.exe" />
6916N/A <exclude name="winlauncher.exe" />
6916N/A <exclude name="launcher_administrator.exe" />
6133N/A </fileset>
6133N/A </delete>
6133N/A </target>
6162N/A
6133N/A <target name="clean-ivy" description="--> clean the ivy installation">
6133N/A <delete file="${ivy.jar.file}"/>
6133N/A </target>
6133N/A
6133N/A <target name="clean-ivy-cache" depends="install-ivy" description="--> clean the ivy cache">
6133N/A <ivy:cleancache/>
6280N/A </target>
6133N/A
5306N/A <import file="build-svr4.xml"/>
4330N/A <import file="build-pkg.xml"/>
0N/A</project>