build.xml revision 99faa045b6241c1d2843cce1b7a9d9c97055beae
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! CDDL HEADER START
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! The contents of this file are subject to the terms of the
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! Common Development and Distribution License, Version 1.0 only
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! (the "License"). You may not use this file except in compliance
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! with the License.
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! You can obtain a copy of the license at
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! See the License for the specific language governing permissions
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! and limitations under the License.
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! When distributing Covered Code, include this CDDL HEADER in each
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! file and include the License file at
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! add the following below this CDDL HEADER, with the fields enclosed
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! by brackets "[]" replaced with your own identifying information:
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! Portions Copyright [yyyy] [name of copyright owner]
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! CDDL HEADER END
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering ! Portions Copyright 2006-2007 Sun Microsystems, Inc.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek<project name="Directory Server" basedir="." default="package">
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek This is the build script for the OpenDS Directory Server. See the BUILDING
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek file in this directory for build instructions.
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <!-- General server-wide properties -->
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="src.dir" location="src/server" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="build.dir" location="build" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="classes.dir" location="${build.dir}/classes" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="lib.dir" location="lib" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="ext.dir" location="ext" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="package.dir" location="${build.dir}/package" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="javadoc.dir" location="${build.dir}/javadoc" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="resource.dir" location="resource" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="scripts.dir" location="${resource.dir}/bin" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="config.dir" location="${resource.dir}/config" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="build.debuglevel" value="lines,vars,source" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <!-- Properties for build tools -->
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="buildtools.src.dir" location="src/build-tools" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="buildtools.classes.dir" location="${build.dir}/build-tools/classes" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <!-- Properties for use in unit testing. -->
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="unittest.testng.dir" location="tests/unit-tests-testng"/>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek location="${unittest.testng.dir}/src/server"/>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="unittest.classes.dir"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek location="${build.dir}/unit-tests/classes" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="unittest.report.dir"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek location="${build.dir}/unit-tests/report"/>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="unittest.resource.dir"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek location="${build.dir}/unit-tests/resource"/>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <!-- Properties for use in functional/integration testing. -->
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="functest.testng.dir"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek location="tests/integration-tests-testng" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="functest.testng.src.dir"
3ba3a79df4ae094d1008c04a9af8d1ff970124c4Zbigniew Jędrzejewski-Szmek location="${functest.testng.dir}/src"/>
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <!-- Properties for use with the DSML component. -->
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="dsml.dir" location="resource/dsml" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="dsml.src.dir" location="src/dsml" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="dsml.lib.dir" location="${dsml.dir}/lib" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="dsml.gen.dir" location="${build.dir}/dsml/gen" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="dsml.classes.dir" location="${build.dir}/dsml/classes" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <!-- Properties for use with the Quick Setup. -->
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="quicksetup.src.dir" location="src/quicksetup" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <property name="quicksetup.classes.dir"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek location="${build.dir}/quicksetup/classes" />
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek <!-- Properties for use with the Status Panel. -->
3ba3a79df4ae094d1008c04a9af8d1ff970124c4Zbigniew Jędrzejewski-Szmek <property name="statuspanel.src.dir" location="src/statuspanel" />
3ba3a79df4ae094d1008c04a9af8d1ff970124c4Zbigniew Jędrzejewski-Szmek <property name="statuspanel.classes.dir"
798d3a524ea57aaf40cb53858aaa45ec702f012dZbigniew Jędrzejewski-Szmek location="${build.dir}/statuspanel/classes" />
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering <!-- Properties for coverage diff reports -->
62ce62123dcbb667f0982a8ecc7d2d53ea6b92ceLennart Poettering <property name="cvgdiff.dir" location="build/diff" />
location="${cvgdiff.dir}/report" />
location="${coverage.dir}/reports/unit" />
location="${coverage.dir}/instrumentedcode" />
location="${coverage.dir}/gathereddata" />
location="${resource.dir}/DynamicConstants.java.stubs" />
<target name="precommit" depends="checkstyle,clean,copyrightdates,eolstyle,dsml,javadoc,testwithcoverage"
<!-- Perform common initialization common to several targets after cleaning out the previous build environment. -->
! java.vm.vendor property, which wreaks havoc with DynamicConstants. This
<!-- Build the DynamicConstants.java file and any of its dependencies. -->
classname="org.opends.build.tools.GetSubversionRevision">
<!-- Generate the DynamicConstants.java file.
VERSION_QUALIFIER, FIX_IDS, timestamp, user.name, java.version,
java.vendor, java.vm.version, JVM_VENDOR, DEBUG_BUILD, REVISION_NUMBER,
If you change the name of any of those properties in this build.xml
tofile="${dynconstants.file}"
classname="org.opends.build.tools.CheckCopyrightDates">
classname="org.opends.build.tools.CheckEOLStyle">
classpath="${checkstyle.dir}/checkstyle-all-4.1.jar" />
excludes="**/package-info.java"
! DynamicConstants.java won't be regenerated.
location="${package.dir}/OpenDS-${pkgversion}" />
<!-- Clean up a minimal set of files/directories for the rebuild. -->
<!-- Generate the OpenDS.jar file -->
<!-- Generate the quicksetup.jar file -->
<!-- Generate the statuspanel.jar file -->
location="${package.dir}/OpenDS-${pkgversion}" />
<fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/bin" includes="*.bat,README_WINDOWS.txt" eol="crlf" />
tofile="${pdir}/config/upgrade/config.ldif.${REVISION_NUMBER}" />
classname="org.opends.build.tools.ConcatSchema">
toFile="${pdir}/config/upgrade/schema.ldif.${REVISION_NUMBER}" />
<zipfileset dir="${package.dir}" includes="OpenDS-${pkgversion}/setup,OpenDS-${pkgversion}/uninstall"
excludes="web.xml, **/*.jar, **/*.properties" />
classpath="${build.dir}/build-tools/build-tools.jar" />
tofile="${unittest.resource.dir}/testng.xml"
grouplist="${test.groups}"
packagelist="${test.packages}"
classList="${test.classes}"
methodList="${test.methods}" />
then we overwrite the testng.xml that we just generated
with testng-failed.xml, which TestNG generated. -->
file="${unittest.report.dir}/testng-failed.xml"/>
unless="testng-failed.xml.exists"/>
tofile="${unittest.resource.dir}/testng.xml"
outputpath="${cvgdiff.report.dir}"
diffpath="${test.diff.srcpath}"
enabled="${test.diff.enabled}"
verbose="${test.diff.verbose}" />
<echo message="This target is deprecated. Please use the test target as it now supports the test.* properties." />
description="Run all of the TestNG tests (including 'slow' ones) with assertions enabled. See 'testwithcoverage' for properties you can set.">
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.">
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.">
<!-- Execute the Directory Server TestNG unit tests in text mode with a coverage report and slow tests. -->
<!-- Execute the Directory Server TestNG unit tests specified from CLI in text mode with a coverage report. -->
<echo message="This target is deprecated. Please use the testwithcoverage target as it now supports the test.* properties." />
<echo message=" -Dorg.opends.test.debug.target=org.opends.server.core:level=verbose,category=data_access"/>
<echo message=" org.opends.server:level=verbose,category=caught|data|database_access|message|protocol" />
<!-- Internal target to execute the Directory Server TestNG unit tests in text mode after everything has been initialized. -->
<!-- This sets org.opends.test.suppressOutput if and only if it's not
<!-- This sets org.opends.test.pauseOnFailure if and only if it's not
<!-- This sets org.opends.test.debug.target if and only if its's not
value="org.opends.server:level=info,category=caught|data|database_access|message|protocol">
<!-- Cleanout the old reports. Otherwise, the old testng-failed.xml
listeners="org.opends.server.TestListener org.testng.reporters.FailedReporter"
suiteRunnerClass="org.opends.server.SuiteRunner">
file="${unittest.report.dir}/.tests-failed-marker"/>
<target name="compileadmin" depends="validateadmin" description="Code generation for configuration Object.">
<xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/*Configuration.xml" style="${admin.rules.dir}/metaMO.xsl">
<regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/meta/\2CfgDefn.java" />
<xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/Package.xml" style="${admin.rules.dir}/package-info.xsl">
<xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/*Configuration.xml" style="${admin.rules.dir}/clientMO.xsl">
<regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/client/\2CfgClient.java" />
<xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/Package.xml" style="${admin.rules.dir}/package-info.xsl">
<xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/*Configuration.xml" style="${admin.rules.dir}/serverMO.xsl">
<regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/server/\2Cfg.java" />
<xslt basedir="${admin.defn.dir}" destdir="${admin.src.dir}" includes="**/Package.xml" style="${admin.rules.dir}/package-info.xsl">
<xslt basedir="${admin.defn.dir}" destdir="${classes.dir}/admin/profiles/ldap" includes="**/*Configuration.xml" style="${admin.rules.dir}/ldapMOProfile.xsl">
<regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/meta/\2CfgDefn.properties" />
<xslt basedir="${admin.defn.dir}" destdir="${classes.dir}/admin/messages" includes="**/*Configuration.xml" style="${admin.rules.dir}/messagesMO.xsl">
<regexpmapper handledirsep="true" from="^(.*)/([^/]+)Configuration\.xml$$" to="\1/meta/\2CfgDefn.properties" />
<xslt basedir="${admin.defn.dir}" destdir="${admin.temp.dir}" extension=".manifest" includes="**/*Configuration.xml" style="${admin.rules.dir}/manifestMO.xsl"/>
<target name="validateadmin" description="Validate core administration component XML definition files.">
<copy todir="${plugin.temp.dir}/example-plugin" file="${admin.rules.dir}/example-plugin/build.xml" />
<copy todir="${plugin.temp.dir}/example-plugin/resource/schema" file="${admin.rules.dir}/example-plugin/99-example-plugin.ldif" />
<copy todir="${plugin.temp.dir}/example-plugin/resource/config" file="${admin.rules.dir}/example-plugin/example-plugin.ldif" />