| | |
| | | |
| | | <!-- Build JVM properties --> |
| | | <property name="MEM" value="256M"/> |
| | | |
| | | |
| | | <!-- Build OpenDMK properties --> |
| | | <property file="build.properties"/> |
| | | |
| | |
| | | <property name="admin.src.dir" location="src/admin/generated" /> |
| | | <property name="admin.rules.dir" location="resource/admin" /> |
| | | <property name="configguide.resource.dir" location="resource/admin/config-guide" /> |
| | | |
| | | |
| | | <!-- Properties for generating messages. --> |
| | | <property name="msg.prop.dir" location="src/messages/messages" /> |
| | | <property name="msg.javagen.dir" location="src/messages/generated" /> |
| | |
| | | <property name="snmp.config.dir" location="src/snmp/resource/config" /> |
| | | <property name="snmp.gen.dir" location="src/snmp/generated" /> |
| | | <property name="snmp.src.dir" location="src/snmp/src" /> |
| | | |
| | | <property name="snmp.classes.dir" |
| | | |
| | | <property name="snmp.classes.dir" |
| | | location="${classes.dir}/org/opends/server/snmp" /> |
| | | |
| | | |
| | | <!-- Create a package bundle containing the DSML library. --> |
| | | <target name="dsml" depends="predsml,package" |
| | | description="Build a Directory Server package bundle with DSML."> |
| | | </target> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- The build target that should be used before committing code. --> |
| | | <target name="precommit" depends="checkstyle,clean,checkprecommit,dsml,testwithcoverage" |
| | | description="Perform all processing needed before committing code."> |
| | | </target> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- The build target that should be used for nightly builds. --> |
| | | <target name="nightly" |
| | | depends="checkstyle,dsml,srczip,javadoc,docgen,coverage,testallwithcoverage" |
| | |
| | | </target> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- The build target that should be used to build everything. --> |
| | | <target name="all" |
| | | depends="checkstyle,clean,checkprecommit,dsml,srczip,javadoc,docgen,testallwithcoverage" |
| | |
| | | <path id="quickSetup.classpath"> |
| | | <pathelement location="${quicksetup.classes.dir}" /> |
| | | </path> |
| | | |
| | | |
| | | <tstamp> |
| | | <format property="timestamp" pattern="yyyyMMddHHmmss'Z'" |
| | | timezone="UTC" /> |
| | |
| | | <isset property="JVM_VENDOR" /> |
| | | </not> |
| | | </condition> |
| | | |
| | | |
| | | <condition property="isopendmkpresent"> |
| | | <or> |
| | | <and> |
| | |
| | | </and> |
| | | </or> |
| | | </condition> |
| | | |
| | | |
| | | </target> |
| | | |
| | | |
| | |
| | | <formatter type="plain" /> |
| | | </checkstyle> |
| | | |
| | | <checkstyle config="${checkstyle.dir}/opends-checkstyle.xml" |
| | | failOnViolation="true"> |
| | | <fileset dir="${dsml.src.dir}" includes="**/*.java" /> |
| | | <formatter type="plain" /> |
| | | </checkstyle> |
| | | |
| | | <checkstyle config="${checkstyle.dir}/opends-doctarget-checkstyle.xml" |
| | | failOnViolation="true"> |
| | | <fileset dir="${src.dir}/org/opends/server/api" includes="**/*.java" /> |
| | |
| | | </fileset> |
| | | </classpath> |
| | | </javac> |
| | | |
| | | |
| | | <copy todir="${classes.dir}"> |
| | | <fileset dir="${src.dir}" includes="**/*.properties" /> |
| | | <fileset dir="${quicksetup.src.dir}" includes="**/*.properties, **/*.gif, **/*.png" /> |
| | |
| | | <!-- Generate the Configuration guides. --> |
| | | <target name="docgen" depends="configguide,configguideldap" |
| | | description="Generate the Configuration guides (1 standard + 1 with ldap mapping) (html)."> |
| | | </target> |
| | | |
| | | </target> |
| | | |
| | | <!-- Generate the Standard Configuration guide. --> |
| | | <target name="configguide" depends="compile,copymessages" |
| | | description="Generate the Configuration guide (standard) (html)."> |
| | |
| | | <dirset dir="${classes.dir}" /> |
| | | </classpath> |
| | | <jvmarg value="-DGenerationDir=${configguide.dir}"/> |
| | | </java> |
| | | </java> |
| | | </target> |
| | | |
| | | <!-- Generate the Configuration guide with LDAP mapping. --> |
| | |
| | | </classpath> |
| | | <jvmarg value="-DGenerationDir=${configguideldap.dir}"/> |
| | | <jvmarg value="-DLdapMapping"/> |
| | | </java> |
| | | </java> |
| | | </target> |
| | | |
| | | <!-- Populate the Directory Server package, but don't zip it up. --> |
| | |
| | | <!-- copy the message descriptor registry file --> |
| | | <copy todir="${classes.dir}/org/opends/messages" |
| | | file="${msg.javagen.dir}/org/opends/messages/descriptors.reg" /> |
| | | |
| | | |
| | | <jar jarfile="${pdir}/lib/${SHORT_NAME}.jar" |
| | | basedir="${classes.dir}" |
| | | excludes="${ads.classes.dir}, ${quicksetup.globalcompile.classes.dir}, |
| | |
| | | <copy todir="${pdir}/lib"> |
| | | <fileset file="${lib.dir}/*.jar" /> |
| | | </copy> |
| | | |
| | | |
| | | <copy todir="${pdir}/lib"> |
| | | <fileset file="${lib.dir}/*.exe" /> |
| | | </copy> |
| | | |
| | | |
| | | <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}/bin" includes="README_WINDOWS.txt" eol="crlf" /> |
| | |
| | | <copy todir="${pdir}/config"> |
| | | <fileset file="${config.dir}/*" /> |
| | | </copy> |
| | | |
| | | |
| | | <antcall target="package-snmp" /> |
| | | |
| | | |
| | | <copy file="${pdir}/config/config.ldif" |
| | | tofile="${pdir}/config/upgrade/config.ldif.${REVISION_NUMBER}" /> |
| | | |
| | |
| | | filemode="755" dirmode="755" /> |
| | | </zip> |
| | | <property name="package.built" value="true"/> |
| | | |
| | | |
| | | <!-- print a time stamp in Unix 'date' format --> |
| | | <tstamp> |
| | | <format property="package.built.ts" pattern="EEE MMM dd HH:mm:ss zzz yyyy" /> |
| | |
| | | overwrite="true"> |
| | | </genrpm> |
| | | |
| | | <rpm |
| | | <rpm |
| | | specfile="specFile" |
| | | topdir="${build.dir}/rpm" |
| | | quiet="true" |
| | |
| | | </target> |
| | | |
| | | |
| | | |
| | | <!-- Prepare to execute the Directory Server TestNG unit tests. --> |
| | | |
| | | <!-- Prepare to execute the Directory Server TestNG unit tests. --> |
| | | <target name="test.OpenDS.package.required" depends="dynamicconstants"> |
| | | <condition property="test.OpenDS.package.required"> |
| | | <available file="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}.zip"/> |
| | | </condition> |
| | | </target> |
| | | |
| | | |
| | | <target name="testinit-package" depends="test.OpenDS.package.required" unless="test.OpenDS.package.required"> |
| | | <echo message="Performing full rebuild (no OpenDS zip package found)"/> |
| | | <antcall target="package"/> |
| | | </target> |
| | | |
| | | |
| | | <target name="testinit-recompile" depends="test.OpenDS.package.required" if="test.OpenDS.package.required"> |
| | | <echo message="Performing partial rebuild (OpenDS zip package found)"/> |
| | | <mkdir dir="${classes.dir}" /> |
| | |
| | | <fileset dir="${guitools.src.dir}" includes="**/*.properties, **/*.gif, **/*.png" /> |
| | | </copy> |
| | | </target> |
| | | |
| | | |
| | | <target name="testinit" depends="testinit-package,testinit-recompile" |
| | | description="Prepare to execute the Directory Server TestNG unit tests."> |
| | | <!-- If we are to perform coverage tests, then set that up. --> |
| | |
| | | |
| | | <!-- Compile SNMP Tests if needed --> |
| | | <antcall target="testsnmpinit"/> |
| | | |
| | | |
| | | <!-- Prep the TestNG XML file --> |
| | | |
| | | <condition property="test.groups" value="exclude=slow"> |
| | |
| | | <fileset dir="${testng.lib.dir}"> |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | | |
| | | |
| | | <fileset dir="${opendmk.lib.dir}"> |
| | | <include name="*.jar"/> |
| | | </fileset> |
| | | |
| | | |
| | | </classpath> |
| | | <jvmarg value="-Demma.coverage.out.file=${coverage.data.dir}/unit.emma" /> |
| | | <jvmarg value="-Demma.coverage.out.merge=false" /> |
| | |
| | | </target> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <target name="buildtools" depends="init" |
| | | description="Builds the build tools"> |
| | | |
| | |
| | | </exec> |
| | | </target> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <target name="compileadminsubtask"> |
| | | <!-- Generate introspection API for core administration components. --> |
| | | <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.properties" /> |
| | | <param name="base-dir" expression="${admin.defn.dir}" /> |
| | | </xslt> |
| | | |
| | | |
| | | <!-- Generate manifest file for core administration components. --> |
| | | <tempfile property="admin.temp.dir" destDir="${build.dir}" prefix="tmp" /> |
| | | <mkdir dir="${admin.temp.dir}" /> |
| | |
| | | </zip> |
| | | </target> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- Generate example plugin package. --> |
| | | <target name="example-plugin" if="pdir"> |
| | | <!-- Create folder hierarchy in temporary directory. --> |
| | |
| | | </zip> |
| | | <delete dir="${plugin.temp.dir}" /> |
| | | </target> |
| | | |
| | | |
| | | <target name="snmpmessagebuild" if="isopendmkpresent"> |
| | | <echo message="SNMP extension will be built and included in the delivery."/> |
| | | <echo message="OpenDMK jar file location is ${opendmk.lib.dir}/jdmkrt.jar"/> |
| | | </target> |
| | | |
| | | |
| | | <target name="snmpmessageNotbuild" unless="isopendmkpresent"> |
| | | <echo message="SNMP extension will NOT be built/included in the delivery."/> |
| | | <echo message="You have to set the opendmk.lib.dir property in"/> |
| | |
| | | <echo message="To get the OpenDMK jar files please, go under"/> |
| | | <echo message="https://opendmk.dev.java.net/"/> |
| | | </target> |
| | | |
| | | |
| | | <target name="snmpecho" depends="snmpmessageNotbuild,snmpmessagebuild"/> |
| | | |
| | | |
| | | <!-- SNMP targets --> |
| | | <target name="cleansnmp" description="Clean up any SNMP generated source files"> |
| | | <delete includeemptydirs="true" failonerror="false"> |
| | | <fileset dir="${snmp.gen.dir}" includes="**/*" /> |
| | | </delete> |
| | | </target> |
| | | |
| | | |
| | | <target name="mibgeneration" if="isopendmkpresent" description="mibgen invocation"> |
| | | <property name="opendmktk.path" location="${opendmk.lib.dir}/jdmktk.jar"/> |
| | | <mkdir dir="${snmp.gen.dir}/org/opends/server/snmp" /> |
| | | <exec dir="${snmp.mib.dir}" executable="java"> |
| | | <arg line="-classpath ${opendmktk.path} |
| | | com.sun.jdmk.tools.MibGen -X:use-display-hint |
| | | -d ${snmp.gen.dir}/org/opends/server/snmp -mc -desc |
| | | -tp org.opends.server.snmp ${snmp.mib.dir}/rfc2605.txt |
| | | com.sun.jdmk.tools.MibGen -X:use-display-hint |
| | | -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"/> |
| | | </exec> |
| | | </target> |
| | | |
| | | |
| | | <target name="compilesnmp" |
| | | depends="init,checkjavaversion,dynamicconstants,generatemessages,compileadmin,mibgeneration" |
| | | if="isopendmkpresent" |
| | | description="Compile the SNMP Connection Handler extension source files."> |
| | | |
| | | |
| | | <mkdir dir="${classes.dir}" /> |
| | | |
| | | <javac srcdir="${snmp.gen.dir}" |
| | |
| | | source="1.4" target="1.4" deprecation="true" fork="true" nowarn="on" |
| | | memoryInitialSize="${MEM}" memoryMaximumSize="${MEM}"> |
| | | <compilerarg value="-Xlint:all" /> |
| | | |
| | | |
| | | <classpath> |
| | | <fileset dir="${lib.dir}"> |
| | | <include name="*.jar" /> |
| | |
| | | </fileset> |
| | | </classpath> |
| | | </javac> |
| | | |
| | | |
| | | <javac srcdir="${snmp.src.dir}" |
| | | destdir="${classes.dir}" debug="on" debuglevel="${build.debuglevel}" |
| | | source="1.5" target="1.5" deprecation="true" fork="true" |
| | |
| | | </javac> |
| | | </target> |
| | | |
| | | |
| | | |
| | | <!-- Package the SNMP Directory Server extension for distribution. --> |
| | | <target name="package-snmp" if="isopendmkpresent" depends="snmpecho,compilesnmp" |
| | | <target name="package-snmp" if="isopendmkpresent" depends="snmpecho,compilesnmp" |
| | | description="Package the SNMP Directory Server extension for distribution."> |
| | | <property name="pdir" location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}"/> |
| | | <mkdir dir="${pdir}/lib/extensions" /> |
| | |
| | | </copy> |
| | | <!-- Copy the mib --> |
| | | <copy todir="${pdir}/snmp/mib" file="${snmp.mib.dir}/rfc2605.txt"/> |
| | | |
| | | |
| | | <!-- Update the config.ldif file with snmp config --> |
| | | <concat destfile="${pdir}/config/config.ldif" append="true"> |
| | | <filelist dir="${snmp.config.dir}" files="config.snmp.ldif"/> |
| | | </concat> |
| | | |
| | | |
| | | <!-- Create the jar file --> |
| | | <jar jarfile="${pdir}/lib/extensions/snmp-mib2605.jar" |
| | | basedir="${classes.dir}" |
| | |
| | | <echo message="SNMP Extension is built"/> |
| | | <echo message="${pdir}/lib/extensions/snmp-mib2605.jar"/> |
| | | </target> |
| | | |
| | | |
| | | <target name="testsnmpinit" if="isopendmkpresent"> |
| | | <!-- Compile the SNMP test cases --> |
| | | <mkdir dir="${unittest.classes.dir}" /> |
| | |
| | | <fileset dir="${testng.lib.dir}"> |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | | |
| | | |
| | | <fileset dir="${opendmk.lib.dir}"> |
| | | <include name="*.jar" /> |
| | | </fileset> |
| | |
| | | </classpath> |
| | | </javac> |
| | | </target> |
| | | |
| | | |
| | | </project> |