build.xml revision 6543
6125N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
6125N/A <property name="configguideldap.dir" location="${docgen.dir}/configuration_guide_with_ldap_mapping" />
6125N/A <property name="wiki.home" value="https://wikis.forgerock.org/confluence/display/opendj/Home"/>
6125N/A ant resolve -Dbuild.offline=
6125N/A location="${unittest.testng.dir}/src/server"/>
6125N/A location="${build.dir}/unit-tests/classes" />
6125N/A location="${build.dir}/unit-tests/report"/>
location="${build.dir}/unit-tests/resource"/>
location="${build.dir}/quicksetup/classes" />
location="${classes.dir}/org/opends/quicksetup" />
location="${cvgdiff.dir}/report" />
location="${coverage.dir}/reports/unit" />
location="${coverage.dir}/instrumentedcode" />
location="${coverage.dir}/gathereddata" />
location="${resource.dir}/DynamicConstants.java.stubs" />
location="${classes.dir}/org/opends/server/snmp" />
classname="org.opends.build.tools.GenerateMessageFile" >
<genmsg sourceProps="${msg.prop.dir}/xxx.properties"
destJava="${msg.javagen.dir}/org/opends/messages/XxxMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/AccessControlMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/AdminMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/AdminToolMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/BackendMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/ConfigMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/CoreMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/DSConfigMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/ExtensionMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/JebMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/LoggerMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/PluginMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/ProtocolMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/QuickSetupMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/ReplicationMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/SchemaMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/TaskMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/ToolMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/UtilityMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/VersionMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/RuntimeMessages.java">
classname="org.opends.build.tools.GenerateMessageFile" >
<genlogref sourceProps="${msg.prop.dir}/xxx_yyy.properties"
destJava="${msg.logref.dir}/log-ref-xxx-yyy.xml"
destJava="${msg.logref.dir}/log-ref-access-control.xml"
destJava="${msg.logref.dir}/log-ref-admin.xml"
<genlogref sourceProps="${msg.prop.dir}/admin_tool.properties"
destJava="${msg.logref.dir}/log-ref-admin-tool.xml"
destJava="${msg.logref.dir}/log-ref-backend.xml"
destJava="${msg.logref.dir}/log-ref-config.xml"
destJava="${msg.logref.dir}/log-ref-core.xml"
destJava="${msg.logref.dir}/log-ref-dsconfig.xml"
destJava="${msg.logref.dir}/log-ref-extension.xml"
destJava="${msg.logref.dir}/log-ref-jeb.xml"
destJava="${msg.logref.dir}/log-ref-log.xml"
destJava="${msg.logref.dir}/log-ref-plugin.xml"
destJava="${msg.logref.dir}/log-ref-protocol.xml"
<genlogref sourceProps="${msg.prop.dir}/quicksetup.properties"
destJava="${msg.logref.dir}/log-ref-quicksetup.xml"
destJava="${msg.logref.dir}/log-ref-replication.xml"
<genlogref sourceProps="${msg.prop.dir}/runtime_information.properties"
destJava="${msg.logref.dir}/log-ref-runtime-information.xml"
destJava="${msg.logref.dir}/log-ref-schema.xml"
destJava="${msg.logref.dir}/log-ref-task.xml"
destJava="${msg.logref.dir}/log-ref-tools.xml"
destJava="${msg.logref.dir}/log-ref-utility.xml"
<genlogref sourceProps="${msg.prop.dir}/version.properties"
destJava="${msg.logref.dir}/log-ref-version.xml"
todir="${msg.logref.dir}" />
<!-- Perform common initialization common to several targets after cleaning out the previous build environment. -->
<!-- Set the property valid.java.version if the java version is valid. -->
classname="org.opends.build.tools.ValidJavaVersion" >
unless="valid.java.version" >
message="WARNING: Java version ${java.version} is too old."/>
message="Java version ${min.java.version} or later is required to build ${SHORT_NAME}."/>
! 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">
classname="org.opends.build.tools.GetSubversionUrlRepo">
classname="org.opends.build.tools.CreateVersionString">
<!-- 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,URL_REPOSITORY,
If you change the name of any of those properties in this build.xml
tofile="${dynconstants.file}"
classname="org.opends.build.tools.CheckPrecommit">
classpath="${checkstyle.dir}/checkstyle-all-4.1.jar" />
<javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
destdir="${classes.dir}">
includes="**/quicksetup.properties" />
excludes="*_fr.properties,*_de.properties,*_es.properties,*_ja.properties,
Copy all files from ${msgl10n.diff.dir}/diff to ${msgl10n.prop.dir}
! DynamicConstants.java won't be regenerated.
classname="org.opends.build.tools.CreateVersionString">
location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
<!-- Clean up a minimal set of files/directories for the rebuild. -->
<javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}:${admin.src.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
destdir="${classes.dir}">
file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" />
<!-- Generate the OpenDS.jar file -->
basedir="${classes.dir}"
excludes="${ads.classes.dir}, ${quicksetup.globalcompile.classes.dir}"
<!-- Generate the quicksetup.jar file -->
The license file will be copied to ${pdir}/Legal/license_to_accept.txt.
location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" />
basedir="${classes.dir}"
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"
basedir="${classes.dir}"
includes="**/*_fr.properties"
basedir="${classes.dir}"
includes="**/*_ja.properties"
basedir="${classes.dir}"
includes="**/*_de.properties"
basedir="${classes.dir}"
includes="**/*_es.properties"
basedir="${classes.dir}"
includes="**/*_ko.properties"
basedir="${classes.dir}"
includes="**/*_zh_CN.properties"
basedir="${classes.dir}"
includes="**/*_zh_TW.properties"
basedir="${classes.dir}"
includes="**/*_pl.properties"
basedir="${classes.dir}"
includes="**/*_ca_ES.properties"
<fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/bin" excludes="*.bat,_client-script.sh,_server-script.sh,_mixed-script.sh,_script-util.sh" eol="lf" />
<fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/lib" includes="_client-script.sh,_server-script.sh,_mixed-script.sh,_script-util.sh" eol="lf" />
<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" />
<fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/lib" includes="_client-script.bat,_server-script.bat,_mixed-script.bat,_script-util.bat,setcp.bat" eol="crlf" />
<!-- Build the bootstrap jar that avoids getting the error message "The input line is too long" on Windows -->
jarfile="${pdir}/lib/bootstrap.jar">
classname="org.opends.build.tools.ConcatSchema">
toFile="${pdir}/template/config/upgrade/schema.ldif.${REVISION_NUMBER}" />
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"
excludes="bin/README_WINDOWS.txt"
<zipfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="bin/README_WINDOWS.txt"
<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"
classname="org.opends.build.tools.CreateVersionString">
classname="org.opends.build.tools.ProcessFilesForPackages">
<replace file="${build.dir}/rpm/SOURCES/docFiles" token="# [[ docsList ]]" value="${listRPMDocFiles}" />
<replace file="${build.dir}/rpm/SPECS/specFile" token="# [[ installRpmFiles ]]" value="${installRpmFiles}" />
<replace file="${build.dir}/rpm/SOURCES/excludedFiles" token="# [[ excludedListFiles ]]" value="${excludedRPMFiles}" />
topdir="${build.dir}/rpm"
classname="org.opends.build.tools.CreateVersionString">
<!-- Debian files for preinst/postinstall/preuninstall/postuninstall -->
<deb destfile="${package.dir}/${PKG_NAME}_${pkg_version_string}-${release}${pkg_version_qualifier}_all.deb"
excludes="**/bat/**, **/QuickSetup.app/**, **/Uninstall.app/**, **/bin/ControlPanel.app/**, *.bat, bin/*,template/**/*,lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh,setup,uninstall,upgrade"
excludes="bin/README_WINDOWS.txt"
<tarfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="bin/README_WINDOWS.txt"
<tarfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="setup,uninstall,upgrade"
<!-- Don't generate package-info.java as it conflicts with
tofile="${dsml.classes.dir}/resources/DSMLv2.xsd"
excludes="web.xml, **/*.jar, **/*.properties" />
location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
<target name="testinit-package" depends="test.OpenDS.package.required" unless="test.OpenDS.package.required">
<target name="testinit-recompile" depends="test.OpenDS.package.required" if="test.OpenDS.package.required">
<javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
destdir="${classes.dir}">
<javac srcdir="${unittest.testng.src.dir}" destdir="${unittest.classes.dir}" excludes="org/opends/server/snmp/**">
<condition property="test.packages" value="org.opends.server.*,org.opends.messages.*,org.opends.quicksetup.*">
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}"
fromrevision="${test.diff.from.revision}" />
<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.server.debug.target=org.opends.server.core:level=verbose,category=data"/>
<echo message=" org.opends.server:level=warning,category=caught|data|database-access|message|protocol,stack,cause" />
<!-- Internal target to execute the Directory Server TestNG unit tests in text mode after everything has been initialized. -->
<!-- This sets testng.verbosity if it's not already set. -->
<!-- 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.server.debug.target if and only if its's not
value="org.opends.server:level=warning,category=caught|data|database-access|message|protocol,stack,cause">
-Djava.compiler=NONE
value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${test.remote.debug.suspend},address=${test.remote.debug.port}"
else="-Dopends.bogus.debug.arg4">
<!-- Cleanout the old reports. Otherwise, the old testng-failed.xml
verbose="${testng.verbosity0to5}"
listeners="org.opends.server.TestListener org.testng.reporters.FailedReporter"
suiteRunnerClass="org.opends.server.SuiteRunner">
<jvmarg value="-Dorg.opends.test.copyClassesToTestPackage=${org.opends.test.copyClassesToTestPackage}" />
file="${unittest.report.dir}/.tests-failed-marker"/>
<copy file="${resource.dir}/Messages.java.stub" todir="${buildtools.classes.dir}/org/opends/build/tools/resource"/>
includes="org/opends/messages/Severity.java,
<target name="generateadmin" depends="validateadmin" description="Code generation for configuration Object.">
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">
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">
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/profiles/cli" includes="**/*Configuration.xml"
style="${admin.rules.dir}/cliMOProfile.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="cleanadmin" if="isadmingendirpresent" description="Clean up any generated source files for admin">
<target name="validateadmin" description="Validate core administration component XML definition files.">
<target name="cleanmessages" if="ismsggendirpresent" description="Clean up any generated source files for messages">
<!-- Generate a src.zip file containing all the server source. -->
description="Generate a src.zip file with all the server source.">
<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" />
<copy todir="${plugin.temp.dir}/example-plugin/lib" file="${build.dir}/build-tools/build-tools.jar" />
<copy todir="${plugin.temp.dir}/example-plugin/resource/messages/com/example/opends/messages" file="${admin.rules.dir}/example-plugin/example_plugin.properties" />
<copy todir="${plugin.temp.dir}/example-plugin/resource/messages/com/example/opends/messages" file="${admin.rules.dir}/example-plugin/example_plugin_fr.properties" />
-d "${snmp.gen.dir}/org/opends/server/snmp" -mc -desc
-tp org.opends.server.snmp "${snmp.mib.dir}/rfc2605.txt"
"${snmp.mib.dir}/mib_core.txt"
"${snmp.mib.dir}/rfc2021.txt" "${snmp.mib.dir}/rfc2788.txt""/>
<!-- Update the config.ldif file with snmp config -->
basedir="${classes.dir}"
<!-- Add admin/extension.manifest into the extension jar file -->
basedir="${snmp.resource.dir}"
<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"/>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>