build.xml revision 244fa03344dbdd9c30bcf9cdc1cde909a20b327f
338N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
338N/A location="${unittest.testng.dir}/src/server"/>
338N/A location="${build.dir}/unit-tests/classes" />
338N/A location="${build.dir}/unit-tests/report"/>
338N/A location="${build.dir}/unit-tests/resource"/>
338N/A location="${build.dir}/quicksetup/classes" />
338N/A location="${classes.dir}/org/opends/quicksetup" />
338N/A location="${cvgdiff.dir}/report" />
338N/A location="${coverage.dir}/reports/unit" />
338N/A location="${coverage.dir}/instrumentedcode" />
338N/A location="${coverage.dir}/gathereddata" />
338N/A location="${resource.dir}/DynamicConstants.java.stubs" />
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/ThirdPartyMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/ToolMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/UserDefinedMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/UtilityMessages.java">
destJava="${msg.javagen.dir}/org/opends/messages/VersionMessages.java">
<!-- 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.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,
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}"
includes="**/quicksetup.properties" />
! 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 -->
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}"
<fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/bin" excludes="*.bat,_client-script.sh,_server-script.sh" eol="lf" />
<fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/lib" includes="_client-script.sh,_server-script.sh" eol="lf" />
<fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/bat" excludes="_client-script.bat,_server-script.bat,setcp.bat" includes="*.bat" eol="crlf" />
<fixcrlf srcDir="${scripts.dir}" destDir="${pdir}/lib" includes="_client-script.bat,_server-script.bat,setcp.bat" eol="crlf" />
tofile="${pdir}/config/upgrade/config.ldif.${REVISION_NUMBER}" />
classname="org.opends.build.tools.ConcatSchema">
toFile="${pdir}/config/upgrade/schema.ldif.${REVISION_NUMBER}" />
<fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup,setup-gui,uninstall,uninstall-gui,upgrade"
<fixcrlf srcDir="${resource.dir}" destDir="${pdir}" includes="setup.bat,setup-gui.bat,uninstall.bat,uninstall-gui.bat,upgrade.bat"
excludes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/*,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup-gui,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall-gui,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh"
excludes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/README_WINDOWS.txt"
<zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/README_WINDOWS.txt"
<zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup-gui,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall-gui,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
excludes="web.xml, **/*.jar, **/*.properties" />
<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.test.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" />
<!-- 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.test.debug.target if and only if its's not
value="org.opends.server:level=warning,category=caught|data|database-access|message|protocol,stack">
-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"/>
includes="org/opends/messages/Severity.java,
<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/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="validateadmin" description="Validate core administration component XML definition files.">
<!-- 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" />