build.xml revision 6968
0N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
712N/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"/>
114N/A ant resolve -Dbuild.offline=
567N/A location="${unittest.testng.dir}/src/server"/>
1210N/A location="${build.dir}/unit-tests/classes" />
712N/A location="${build.dir}/unit-tests/report"/>
2046N/A location="${build.dir}/unit-tests/resource"/>
422N/A location="${build.dir}/quicksetup/classes" />
422N/A location="${classes.dir}/org/opends/quicksetup" />
0N/A location="${cvgdiff.dir}/report" />
233N/A location="${coverage.dir}/reports/unit" />
730N/A location="${coverage.dir}/instrumentedcode" />
730N/A location="${coverage.dir}/gathereddata" />
0N/A location="${resource.dir}/DynamicConstants.java.stubs" />
2086N/A <target name="prepare-release" depends="check-no-snapshot-dependencies,check-documentations-built-with-correct-url"
0N/A <fail message="The documentation must be built with the correct URL. Incorrectly found 'opendj.forgerock.org' inside PRODUCT file.">
1273N/A <genmsg sourceProps="${msg.prop.dir}/xxx.properties"
1273N/A destJava="${msg.javagen.dir}/org/opends/messages/XxxMessages.java">
1273N/A destJava="${msg.javagen.dir}/org/opends/messages/AccessControlMessages.java">
1273N/A destJava="${msg.javagen.dir}/org/opends/messages/AdminMessages.java">
1273N/A destJava="${msg.javagen.dir}/org/opends/messages/AdminToolMessages.java">
1273N/A destJava="${msg.javagen.dir}/org/opends/messages/BackendMessages.java">
1177N/A destJava="${msg.javagen.dir}/org/opends/messages/ConfigMessages.java">
1177N/A destJava="${msg.javagen.dir}/org/opends/messages/CoreMessages.java">
1559N/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">
984N/A destJava="${msg.javagen.dir}/org/opends/messages/ProtocolMessages.java">
902N/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">
729N/A <genlogref sourceProps="${msg.prop.dir}/xxx_yyy.properties"
729N/A destJava="${msg.logref.dir}/log-ref-xxx-yyy.xml"
729N/A destJava="${msg.logref.dir}/log-ref-access-control.xml"
729N/A destJava="${msg.logref.dir}/log-ref-admin.xml"
1344N/A <genlogref sourceProps="${msg.prop.dir}/admin_tool.properties"
1344N/A destJava="${msg.logref.dir}/log-ref-admin-tool.xml"
1344N/A destJava="${msg.logref.dir}/log-ref-backend.xml"
1344N/A destJava="${msg.logref.dir}/log-ref-config.xml"
1344N/A destJava="${msg.logref.dir}/log-ref-core.xml"
109N/A destJava="${msg.logref.dir}/log-ref-dsconfig.xml"
984N/A destJava="${msg.logref.dir}/log-ref-extension.xml"
1238N/A destJava="${msg.logref.dir}/log-ref-jeb.xml"
1344N/A destJava="${msg.logref.dir}/log-ref-log.xml"
1344N/A destJava="${msg.logref.dir}/log-ref-plugin.xml"
109N/A destJava="${msg.logref.dir}/log-ref-protocol.xml"
109N/A <genlogref sourceProps="${msg.prop.dir}/quicksetup.properties"
109N/A destJava="${msg.logref.dir}/log-ref-quicksetup.xml"
0N/A destJava="${msg.logref.dir}/log-ref-replication.xml"
1344N/A <genlogref sourceProps="${msg.prop.dir}/runtime_information.properties"
1344N/A destJava="${msg.logref.dir}/log-ref-runtime-information.xml"
1344N/A destJava="${msg.logref.dir}/log-ref-schema.xml"
729N/A destJava="${msg.logref.dir}/log-ref-task.xml"
729N/A destJava="${msg.logref.dir}/log-ref-tools.xml"
729N/A destJava="${msg.logref.dir}/log-ref-utility.xml"
729N/A <genlogref sourceProps="${msg.prop.dir}/version.properties"
729N/A destJava="${msg.logref.dir}/log-ref-version.xml"
730N/A todir="${msg.logref.dir}" />
2086N/A <!-- Perform common initialization common to several targets after cleaning out the previous build environment. -->
1210N/A <!-- Set the property valid.java.version if the java version is valid. -->
0N/A unless="valid.java.version" >
114N/A message="WARNING: Java version ${java.version} is too old."/>
114N/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
902N/A <!-- Build the DynamicConstants.java file and any of its dependencies. -->
567N/A <!-- Generate the DynamicConstants.java file.
567N/A VERSION_QUALIFIER, FIX_IDS, timestamp, user.name, java.version,
567N/A java.vendor, java.vm.version, JVM_VENDOR, DEBUG_BUILD, REVISION_NUMBER,URL_REPOSITORY,
2115N/A tofile="${dynconstants.file}"
0N/A classpath="${checkstyle.dir}/checkstyle-all-4.1.jar" />
1960N/A <echo>Refresh the OpenDJ server project in Eclipse: Select the OpenDJ server project and press 'F5' key</echo>
563N/A <javac srcdir="${src.dir}:${admin.src.dir}:${msg.src.dir}:${msg.javagen.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
563N/A destdir="${classes.dir}">
1008N/A <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}" destdir="${quicksetup.classes.dir}">
1008N/A includes="**/quicksetup.properties" />
0N/A excludes="*_fr.properties,*_de.properties,*_es.properties,*_ja.properties,
29N/A Copy all files from ${msgl10n.diff.dir}/diff to ${msgl10n.prop.dir}
565N/A ! DynamicConstants.java won't be regenerated.
1960N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
0N/A <!-- Clean up a minimal set of files/directories for the rebuild. -->
1559N/A <javac srcdir="${src.dir}:${msg.src.dir}:${msg.javagen.dir}:${admin.src.dir}:${ads.src.dir}:${quicksetup.src.dir}:${guitools.src.dir}"
0N/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}" />
2123N/A file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" />
1559N/A basedir="${classes.dir}"
1559N/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"
1559N/A basedir="${classes.dir}"
1559N/A includes="**/*_fr.properties"
675N/A basedir="${classes.dir}"
675N/A includes="**/*_ja.properties"
675N/A basedir="${classes.dir}"
675N/A includes="**/*_de.properties"
675N/A basedir="${classes.dir}"
675N/A includes="**/*_es.properties"
675N/A basedir="${classes.dir}"
675N/A includes="**/*_ko.properties"
564N/A basedir="${classes.dir}"
233N/A includes="**/*_zh_CN.properties"
712N/A basedir="${classes.dir}"
567N/A includes="**/*_zh_TW.properties"
712N/A basedir="${classes.dir}"
712N/A includes="**/*_pl.properties"
1008N/A basedir="${classes.dir}"
712N/A includes="**/*_ca_ES.properties"
712N/A <fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/bin" excludes="*.bat,_client-script.sh,_server-script.sh,_mixed-script.sh,_script-util.sh" eol="lf" />
712N/A <fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/lib" includes="_client-script.sh,_server-script.sh,_mixed-script.sh,_script-util.sh" eol="lf" />
712N/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" />
712N/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" />
675N/A <!-- Build the bootstrap jar that avoids getting the error message "The input line is too long" on Windows -->
675N/A jarfile="${pdir}/lib/bootstrap.jar">
712N/A <fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup.bat,uninstall.bat,upgrade.bat"
712N/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"
902N/A includes="lib/_client-script.sh,lib/_script-util.sh,lib/_server-script.sh,lib/_mixed-script.sh"
902N/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"
902N/A <zipfileset dir="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" includes="template/**/*"
902N/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}">
937N/A <filter token="sourceDirName" value="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/>
712N/A <processFilesForPackages sourceDirName="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
42N/A <replace file="${build.dir}/rpm/SOURCES/files" token="# [[ listFiles ]]" value="${listRPMFiles}" />
95N/A <replace file="${build.dir}/rpm/SOURCES/docFiles" token="# [[ docsList ]]" value="${listRPMDocFiles}" />
422N/A <replace file="${build.dir}/rpm/SPECS/specFile" token="# [[ installRpmFiles ]]" value="${installRpmFiles}" />
422N/A <replace file="${build.dir}/rpm/SOURCES/excludedFiles" token="# [[ excludedListFiles ]]" value="${excludedRPMFiles}" />
1238N/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"
1008N/A excludes="**/bat/**, **/*.app/**, **/*.bat*, **/*.exe*, bin/*, template/**/*, lib/*.sh, setup, uninstall, upgrade, legal-notices/**, copyright, README, example-plugin.zip, opendj, changelog.Debian.gz"
1008N/A excludes="**/bin/ControlPanel.app/"
233N/A <tarfileset dir="${build.deb.dir}" includes="legal-notices/**, copyright, example-plugin.zip, changelog.Debian.gz"
1008N/A tofile="${dsml.classes.dir}/resources/DSMLv2.xsd"
1008N/A location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
1008N/A 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"/>
<regexpmapper from="(.*)/(jar)/(.*(?:assertj-core|hamcrest-core|mockito-core|objenesis)\.jar)" to="\1/test/\3"/>
<fail message="The project must not depend on snapshot dependencies. Found: ${toString:snapshots.dir.ref}">