build.xml revision 6716
0N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
222N/A <property name="configguideldap.dir" location="${docgen.dir}/configuration_guide_with_ldap_mapping" />
0N/A <property name="wiki.home" value="https://wikis.forgerock.org/confluence/display/opendj/Home"/>
0N/A ant resolve -Dbuild.offline=
0N/A location="${unittest.testng.dir}/src/server"/>
0N/A location="${build.dir}/unit-tests/classes" />
0N/A location="${build.dir}/unit-tests/report"/>
216N/A location="${build.dir}/unit-tests/resource"/>
0N/A location="${build.dir}/quicksetup/classes" />
0N/A location="${classes.dir}/org/opends/quicksetup" />
0N/A location="${cvgdiff.dir}/report" />
0N/A location="${coverage.dir}/reports/unit" />
0N/A location="${coverage.dir}/instrumentedcode" />
0N/A location="${coverage.dir}/gathereddata" />
0N/A location="${resource.dir}/DynamicConstants.java.stubs" />
0N/A <genmsg sourceProps="${msg.prop.dir}/xxx.properties"
0N/A destJava="${msg.javagen.dir}/org/opends/messages/XxxMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/AccessControlMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/AdminMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/AdminToolMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/BackendMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/ConfigMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/CoreMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/DSConfigMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/ExtensionMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/JebMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/LoggerMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/PluginMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/ProtocolMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/QuickSetupMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/ReplicationMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/SchemaMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/TaskMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/ToolMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/UtilityMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/VersionMessages.java">
0N/A destJava="${msg.javagen.dir}/org/opends/messages/RuntimeMessages.java">
0N/A <genlogref sourceProps="${msg.prop.dir}/xxx_yyy.properties"
0N/A destJava="${msg.logref.dir}/log-ref-xxx-yyy.xml"
113N/A destJava="${msg.logref.dir}/log-ref-access-control.xml"
113N/A destJava="${msg.logref.dir}/log-ref-admin.xml"
113N/A <genlogref sourceProps="${msg.prop.dir}/admin_tool.properties"
113N/A destJava="${msg.logref.dir}/log-ref-admin-tool.xml"
0N/A destJava="${msg.logref.dir}/log-ref-backend.xml"
0N/A destJava="${msg.logref.dir}/log-ref-config.xml"
0N/A destJava="${msg.logref.dir}/log-ref-core.xml"
0N/A destJava="${msg.logref.dir}/log-ref-dsconfig.xml"
0N/A destJava="${msg.logref.dir}/log-ref-extension.xml"
0N/A destJava="${msg.logref.dir}/log-ref-jeb.xml"
0N/A destJava="${msg.logref.dir}/log-ref-log.xml"
113N/A destJava="${msg.logref.dir}/log-ref-plugin.xml"
113N/A destJava="${msg.logref.dir}/log-ref-protocol.xml"
0N/A <genlogref sourceProps="${msg.prop.dir}/quicksetup.properties"
0N/A destJava="${msg.logref.dir}/log-ref-quicksetup.xml"
0N/A destJava="${msg.logref.dir}/log-ref-replication.xml"
0N/A <genlogref sourceProps="${msg.prop.dir}/runtime_information.properties"
0N/A destJava="${msg.logref.dir}/log-ref-runtime-information.xml"
0N/A destJava="${msg.logref.dir}/log-ref-schema.xml"
0N/A destJava="${msg.logref.dir}/log-ref-task.xml"
0N/A destJava="${msg.logref.dir}/log-ref-tools.xml"
0N/A destJava="${msg.logref.dir}/log-ref-utility.xml"
0N/A <genlogref sourceProps="${msg.prop.dir}/version.properties"
0N/A destJava="${msg.logref.dir}/log-ref-version.xml"
0N/A todir="${msg.logref.dir}" />
0N/A <!-- Perform common initialization common to several targets after cleaning out the previous build environment. -->
0N/A <!-- Set the property valid.java.version if the java version is valid. -->
0N/A unless="valid.java.version" >
0N/A message="WARNING: Java version ${java.version} is too old."/>
0N/A message="Java version ${min.java.version} or later is required to build ${SHORT_NAME}."/>
0N/A ! java.vm.vendor property, which wreaks havoc with DynamicConstants. This
0N/A <!-- Build the DynamicConstants.java file and any of its dependencies. -->
0N/A <!-- Generate the DynamicConstants.java file.
0N/A VERSION_QUALIFIER, FIX_IDS, timestamp, user.name, java.version,
0N/A java.vendor, java.vm.version, JVM_VENDOR, DEBUG_BUILD, REVISION_NUMBER,URL_REPOSITORY,
0N/A tofile="${dynconstants.file}"
0N/A classpath="${checkstyle.dir}/checkstyle-all-4.1.jar" />
0N/A <javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
0N/A destdir="${classes.dir}">
0N/A <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}">
0N/A includes="**/quicksetup.properties" />
222N/A excludes="*_fr.properties,*_de.properties,*_es.properties,*_ja.properties,
0N/A Copy all files from ${msgl10n.diff.dir}/diff to ${msgl10n.prop.dir}
0N/A ! DynamicConstants.java won't be regenerated.
0N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
0N/A <!-- Clean up a minimal set of files/directories for the rebuild. -->
222N/A <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}:${admin.src.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
222N/A destdir="${classes.dir}">
0N/A file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" />
0N/A <!-- Generate the OpenDS.jar file -->
0N/A basedir="${classes.dir}"
0N/A excludes="${ads.classes.dir}, ${quicksetup.globalcompile.classes.dir}"
0N/A <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}">
0N/A <!-- Generate the quicksetup.jar file -->
0N/A <java fork="true" classname="org.opends.server.admin.doc.ConfigGuideGeneration" failonerror="true">
0N/A <java fork="true" classname="org.opends.server.admin.doc.ConfigGuideGeneration" failonerror="true">
0N/A The license file will be copied to ${pdir}/Legal/license_to_accept.txt.
0N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
0N/A file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" />
0N/A basedir="${classes.dir}"
0N/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"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_fr.properties"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_ja.properties"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_de.properties"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_es.properties"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_ko.properties"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_zh_CN.properties"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_zh_TW.properties"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_pl.properties"
0N/A basedir="${classes.dir}"
0N/A includes="**/*_ca_ES.properties"
0N/A <fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/bin" excludes="*.bat,_client-script.sh,_server-script.sh,_mixed-script.sh,_script-util.sh" eol="lf" />
0N/A <fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/lib" includes="_client-script.sh,_server-script.sh,_mixed-script.sh,_script-util.sh" eol="lf" />
0N/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" />
0N/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" />
0N/A <!-- Build the bootstrap jar that avoids getting the error message "The input line is too long" on Windows -->
0N/A jarfile="${pdir}/lib/bootstrap.jar">
0N/A <fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup.bat,uninstall.bat,upgrade.bat"
0N/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"
0N/A includes="lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh"
0N/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"
0N/A <zipfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="template/**/*"
168N/A <arg value="-out"/> <arg value="dist/${SHORT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}.msi"/>
0N/A <condition property="rpmRelease" value="${release}" else="${release}.${pkg_version_qualifier}">
0N/A <processFilesForPackages sourceDirName="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
309N/A <replace file="${build.dir}/rpm/SOURCES/files" token="# [[ listFiles ]]" value="${listRPMFiles}" />
0N/A <replace file="${build.dir}/rpm/SOURCES/docFiles" token="# [[ docsList ]]" value="${listRPMDocFiles}" />
0N/A <replace file="${build.dir}/rpm/SPECS/specFile" token="# [[ installRpmFiles ]]" value="${installRpmFiles}" />
0N/A <replace file="${build.dir}/rpm/SOURCES/excludedFiles" token="# [[ excludedListFiles ]]" value="${excludedRPMFiles}" />
216N/A <property name="build.deb.dir" value="${build.dir}/deb/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
0N/A <deb destfile="${package.dir}/${PKG_NAME}_${pkg_version_string}-${release}${pkg_version_qualifier}_all.deb"
0N/A excludes="**/bat/**, **/*.app/**, **/*.bat*, **/*.exe*, bin/*, template/**/*, lib/*.sh, setup, uninstall, upgrade, legal-notices/**, copyright, README, example-plugin.zip, opendj, changelog.Debian.gz"
0N/A excludes="**/bin/ControlPanel.app/"
0N/A <tarfileset dir="${build.deb.dir}" includes="legal-notices/**, copyright, example-plugin.zip, changelog.Debian.gz"
0N/A tofile="${dsml.classes.dir}/resources/DSMLv2.xsd"
0N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
0N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
163N/A <target name="testinit-package" depends="test.OpenDS.package.required" unless="test.OpenDS.package.required">
0N/A <target name="testinit-recompile" depends="test.OpenDS.package.required" if="test.OpenDS.package.required">
0N/A <javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
0N/A destdir="${classes.dir}">
0N/A <javac srcdir="${unittest.testng.src.dir}" destdir="${unittest.classes.dir}" excludes="org/opends/server/snmp/**">
0N/A <condition property="test.packages" value="org.opends.server.*,org.opends.messages.*,org.opends.quicksetup.*">
0N/A classpath="${build.dir}/build-tools/build-tools.jar" />
0N/A tofile="${unittest.resource.dir}/testng.xml"
0N/A grouplist="${test.groups}"
0N/A packagelist="${test.packages}"
0N/A classList="${test.classes}"
0N/A methodList="${test.methods}" />
0N/A then we overwrite the testng.xml that we just generated
0N/A with testng-failed.xml, which TestNG generated. -->
0N/A file="${unittest.report.dir}/testng-failed.xml"/>
0N/A unless="testng-failed.xml.exists"/>
0N/A tofile="${unittest.resource.dir}/testng.xml"
113N/A outputpath="${cvgdiff.report.dir}"
113N/A diffpath="${test.diff.srcpath}"
113N/A enabled="${test.diff.enabled}"
368N/A verbose="${test.diff.verbose}"
113N/A fromrevision="${test.diff.from.revision}" />
368N/A <echo message="This target is deprecated. Please use the test target as it now supports the test.* properties." />
368N/A description="Run all of the TestNG tests (including 'slow' ones) with assertions enabled. See 'testwithcoverage' for properties you can set.">
368N/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.">
0N/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.">
0N/A <!-- Execute the Directory Server TestNG unit tests in text mode with a coverage report and slow tests. -->
0N/A <!-- Execute the Directory Server TestNG unit tests specified from CLI in text mode with a coverage report. -->
0N/A <echo message="This target is deprecated. Please use the testwithcoverage target as it now supports the test.* properties." />
0N/A <echo message=" -Dorg.opends.server.debug.target=org.opends.server.core:level=verbose,category=data"/>
0N/A <echo message=" org.opends.server:level=warning,category=caught|data|database-access|message|protocol,stack,cause" />
0N/A <!-- Internal target to execute the Directory Server TestNG unit tests in text mode after everything has been initialized. -->
0N/A <!-- This sets testng.verbosity if it's not already set. -->
0N/A <!-- This sets org.opends.test.suppressOutput if and only if it's not
0N/A <!-- This sets org.opends.test.pauseOnFailure if and only if it's not
0N/A <!-- This sets org.opends.server.debug.target if and only if its's not
0N/A 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"/>