From 25160feda5204dc73c78513d807270337f4c0c41 Mon Sep 17 00:00:00 2001
From: al_xipe <al_xipe@localhost>
Date: Mon, 30 Jul 2007 02:40:58 +0000
Subject: [PATCH] 1. removed hard coded references to the product SHORT_NAME from build file 2. updated the x-test installer 3. updated the oulu tests files
---
opends/build.xml | 38 +++++++++---------
opends/tests/oulu-tests/oulu.properties | 14 +++---
opends/tests/oulu-tests/build.xml | 39 +++++++++++++++----
opends/tests/installer.xml | 18 +++-----
4 files changed, 63 insertions(+), 46 deletions(-)
diff --git a/opends/build.xml b/opends/build.xml
index 23578ed..5e18d8e 100644
--- a/opends/build.xml
+++ b/opends/build.xml
@@ -226,7 +226,7 @@
<echo level="warning"
message="WARNING: Java version ${java.version} is too old."/>
<echo level="warning"
- message="Java version ${min.java.version} or later is required to build OpenDS."/>
+ message="Java version ${min.java.version} or later is required to build ${SHORT_NAME}."/>
</target>
<!-- Perform common initialization common to several targets. -->
@@ -583,11 +583,11 @@
<!-- Set properties needed to find the packaged files -->
<property name="pdir"
- location="${package.dir}/OpenDS-${VERSION_NUMBER_STRING}" />
+ location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
<!-- Clean up a minimal set of files/directories for the rebuild. -->
<delete dir="${classes.dir}" />
- <delete file="${package.dir}/lib/OpenDS.jar" />
+ <delete file="${package.dir}/lib/${SHORT_NAME}.jar" />
<delete file="${pdir}.zip" />
<delete dir="${quicksetup.classes.dir}" />
<delete file="${package.dir}/lib/quicksetup.jar" />
@@ -617,7 +617,7 @@
</copy>
<!-- Generate the OpenDS.jar file -->
- <jar jarfile="${pdir}/lib/OpenDS.jar"
+ <jar jarfile="${pdir}/lib/${SHORT_NAME}.jar"
basedir="${classes.dir}" compress="true" index="true" />
<!-- Recreate the quicksetup classes directory and recompile into it. -->
@@ -654,7 +654,7 @@
<include name="build-tools.jar" />
</fileset>
<fileset dir="${pdir}/lib">
- <include name="OpenDS.jar" />
+ <include name="${SHORT_NAME}.jar" />
</fileset>
</classpath>
</javac>
@@ -677,7 +677,7 @@
<compilerarg value="-Xlint:all" />
<classpath>
<fileset dir="${pdir}/lib">
- <include name="OpenDS.jar" />
+ <include name="${SHORT_NAME}.jar" />
</fileset>
</classpath>
</javac>
@@ -702,7 +702,7 @@
<target name="prepackage" depends="cleancompile"
description="Prepare the Directory Server package structure.">
<property name="pdir"
- location="${package.dir}/OpenDS-${VERSION_NUMBER_STRING}" />
+ location="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}" />
<mkdir dir="${pdir}" />
<mkdir dir="${pdir}/adminDb" />
@@ -725,7 +725,7 @@
<mkdir dir="${pdir}/logs" />
<delete dir="${ads.class.dir}" />
- <jar jarfile="${pdir}/lib/OpenDS.jar"
+ <jar jarfile="${pdir}/lib/${SHORT_NAME}.jar"
basedir="${classes.dir}" compress="true" index="true" />
<jar jarfile="${pdir}/lib/quicksetup.jar"
@@ -811,19 +811,19 @@
<!-- Package the Directory Server for distribution. -->
<target name="package" depends="prepackage"
description="Package the Directory Server for distribution.">
- <zip destfile="${package.dir}/OpenDS-${VERSION_NUMBER_STRING}.zip">
- <zipfileset dir="${package.dir}" includes="OpenDS-${VERSION_NUMBER_STRING}/**/*"
- excludes="OpenDS-${VERSION_NUMBER_STRING}/bin/*,OpenDS-${VERSION_NUMBER_STRING}/lib/_client-script.sh,OpenDS-${VERSION_NUMBER_STRING}/lib/_server-script.sh,OpenDS-${VERSION_NUMBER_STRING}/setup,OpenDS-${VERSION_NUMBER_STRING}/uninstall,OpenDS-${VERSION_NUMBER_STRING}/upgrade"
+ <zip destfile="${package.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}.zip">
+ <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/**/*"
+ 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}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
filemode="644" dirmode="755" />
<zipfileset dir="${package.dir}"
- includes="OpenDS-${VERSION_NUMBER_STRING}/lib/_client-script.sh,OpenDS-${VERSION_NUMBER_STRING}/lib/_server-script.sh"
+ includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_client-script.sh,${SHORT_NAME}-${VERSION_NUMBER_STRING}/lib/_server-script.sh"
filemode="755" dirmode="755" />
- <zipfileset dir="${package.dir}" includes="OpenDS-${VERSION_NUMBER_STRING}/bin/*"
- excludes="OpenDS-${VERSION_NUMBER_STRING}/bin/README_WINDOWS.txt"
+ <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/*"
+ excludes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/README_WINDOWS.txt"
filemode="755" dirmode="755" />
- <zipfileset dir="${package.dir}" includes="OpenDS-${VERSION_NUMBER_STRING}/bin/README_WINDOWS.txt"
+ <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/bin/README_WINDOWS.txt"
filemode="644" dirmode="755" />
- <zipfileset dir="${package.dir}" includes="OpenDS-${VERSION_NUMBER_STRING}/setup,OpenDS-${VERSION_NUMBER_STRING}/uninstall,OpenDS-${VERSION_NUMBER_STRING}/upgrade"
+ <zipfileset dir="${package.dir}" includes="${SHORT_NAME}-${VERSION_NUMBER_STRING}/setup,${SHORT_NAME}-${VERSION_NUMBER_STRING}/uninstall,${SHORT_NAME}-${VERSION_NUMBER_STRING}/upgrade"
filemode="755" dirmode="755" />
</zip>
<property name="package.built" value="true"/>
@@ -879,7 +879,7 @@
</classpath>
</javac>
- <war destfile="${classes.dir}/OpenDS-${VERSION_NUMBER_STRING}-DSML.war"
+ <war destfile="${classes.dir}/${SHORT_NAME}-${VERSION_NUMBER_STRING}-DSML.war"
webxml="${dsml.dir}/webapp/web.xml">
<fileset file="${dsml.dir}/webapp/server.properties" />
@@ -1238,7 +1238,7 @@
<echo message=" package that are related to data access and at the" />
<echo message=" verbose level or higher. The syntax of this target" />
<echo message=" definition is the same as the org.opends.server.debug.target.x" />
- <echo message=" property when starting OpenDS. " />
+ <echo message=" property when starting ${SHORT_NAME}. " />
<echo message=" Default debug target:"/>
<echo message=" org.opends.server:level=warning,category=caught|data|database-access|message|protocol" />
<echo message=""/>
@@ -1381,7 +1381,7 @@
<!-- Delete all of the report suite sub-directories since we only
have a single suite. -->
- <delete dir="${unittest.report.dir}/OpenDS"/>
+ <delete dir="${unittest.report.dir}/${SHORT_NAME}"/>
<emma enabled="${coverage.enabled}" >
<report sourcepath="${src.dir}" >
diff --git a/opends/tests/installer.xml b/opends/tests/installer.xml
index 189b6ae..b620995 100644
--- a/opends/tests/installer.xml
+++ b/opends/tests/installer.xml
@@ -37,7 +37,7 @@
<property file="../PRODUCT" />
<property name="product.name" value="${SHORT_NAME}" />
<property name="product.version"
- value="${MAJOR_VERSION}.${MINOR_VERSION}${VERSION_QUALIFIER}" />
+ value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}" />
<!-- this is an optional file if you want to pass custom values -->
<property file="installer.properties" />
<!-- this is the file where the default values are defined -->
@@ -45,13 +45,11 @@
<!-- Define default values for mandatory properties in case the
property files would not be found
-->
- <condition property="script.ext" value=".bat">
+ <condition property="script.ext" value=".bat" else="">
<os family="windows"/>
</condition>
- <condition property="script.ext" value="">
- <not>
- <isset property="script.ext"/>
- </not>
+ <condition property="bin.dir" value="bat" else="bin">
+ <os family="windows"/>
</condition>
<!-- Usage section - top -->
<target name="usage">
@@ -85,9 +83,7 @@
</fileset>
</unzip>
<chmod perm="755">
- <fileset dir="${full.install.dir}/bin">
- <exclude name="*.bat"/>
- </fileset>
+ <fileset dir="${full.install.dir}/bin" />
</chmod>
</target>
@@ -142,7 +138,7 @@
unless="product.running" >
<echo message="Starting ${product.name} ${product.version}... on ${os.name}" />
<exec
- executable="${full.install.dir}${file.separator}bin${file.separator}start-ds${script.ext}"
+ executable="${full.install.dir}${file.separator}${bin.dir}${file.separator}start-ds${script.ext}"
spawn="true"/>
</target>
<target name="start" depends="status-do,start-do"/>
@@ -153,7 +149,7 @@
description="stop the server">
<echo message="Stopping ${product.name} ${product.version}..." />
<exec
- executable="${full.install.dir}${file.separator}bin${file.separator}stop-ds${script.ext}"
+ executable="${full.install.dir}${file.separator}${bin.dir}${file.separator}stop-ds${script.ext}"
spawn="true">
<arg line="-h ${host.name}"/>
<arg line="-p ${port.ldap}"/>
diff --git a/opends/tests/oulu-tests/build.xml b/opends/tests/oulu-tests/build.xml
index a044a48..c658ce4 100644
--- a/opends/tests/oulu-tests/build.xml
+++ b/opends/tests/oulu-tests/build.xml
@@ -36,7 +36,9 @@
<property file="../../PRODUCT" />
<property name="product.name" value="${SHORT_NAME}" />
<property name="product.version"
- value="${MAJOR_VERSION}.${MINOR_VERSION}${VERSION_QUALIFIER}" />
+ value="${MAJOR_VERSION}.${MINOR_VERSION}.${POINT_VERSION}" />
+ <property name="product.package"
+ value="${product.name}-${product.version}.zip" />
<!-- in case there's a custom installer properties file -->
<property file="../installer.properties" />
<!-- in case there isn't - load default values -->
@@ -52,7 +54,7 @@
[all]
bootstrap a fresh instance of ${product.name}
run the oulu tests
- wipeout the {{product.name} instance
+ wipeout the ${product.name} instance
[get-bits]
Download the bits from oulu university server
@@ -73,17 +75,36 @@
</echo>
</target>
- <!-- download the bits from oulu university -->
- <target name="get-bits.do" unless="oulu.uptodate">
- <delete dir="${oulu.build.dir}" />
- <mkdir dir="${oulu.build.dir}" />
- <echo message="Downloading oulu bits ..." />
+ <target name="check-opends-build">
+ <condition property="opends.notbuilt">
+ <not>
+ <available file="${project.home.dir}/build/package/${product.package}"/>
+ </not>
+ </condition>
+ </target>
+
+ <target name="build-opends"
+ if="opends.notbuilt"
+ depends="check-opends-build">
+ <ant dir="${project.home.dir}"
+ antfile="${project.home.dir}/build.xml"
+ target="package"/>
+ </target>
+
+ <target name="set-proxy" if="proxy.http.port">
<setproxy proxyhost="${proxy..http.host}"
proxyport="${proxy.http.port}"
proxyuser="${proxy.http.user}"
proxypassword="${proxy.http.pwd}"
socksproxyhost="${proxy.socks.host}"
- socksproxyport="${proxy.socks.port}"/>
+ socksproxyport="${proxy.socks.port}"/>
+ </target>
+
+ <!-- download the bits from oulu university -->
+ <target name="get-bits.do" depends="set-proxy" unless="oulu.uptodate">
+ <delete dir="${oulu.build.dir}" />
+ <mkdir dir="${oulu.build.dir}" />
+ <echo message="Downloading oulu bits ..." />
<get
src="${oulu.home.url}/${oulu.ber.jar}"
dest="${oulu.build.dir}/${oulu.ber.jar}"
@@ -117,7 +138,7 @@
<!-- end of of download related targets -->
<!-- installer related targets -->
- <target name="bootstrap">
+ <target name="bootstrap" depends="build-opends">
<ant
antfile="installer.xml"
dir=".."
diff --git a/opends/tests/oulu-tests/oulu.properties b/opends/tests/oulu-tests/oulu.properties
index 38799f6..8f54402 100644
--- a/opends/tests/oulu-tests/oulu.properties
+++ b/opends/tests/oulu-tests/oulu.properties
@@ -4,10 +4,10 @@
oulu.ber.pgp=c06-ldapv3-enc-r1.jar.asc
oulu.pdu.jar=c06-ldapv3-app-r1.jar
oulu.pdu.pgp=c06-ldapv3-app-r1.jar.asc
-<!-- proxy section - edit this to reflect how your network is set up -->
-proxy.http.host=
-proxy.http.port=
-proxy.http.user=
-proxy.http.pwd=
-proxy.socks.host=
-proxy.socks.port=
+#proxy section - edit this to reflect how your network is set up
+#proxy.http.host=
+#proxy.http.port=
+#proxy.http.user=
+#proxy.http.pwd=
+#proxy.socks.host=
+#proxy.socks.port=
--
Gitblit v1.10.0