summaryrefslogtreecommitdiffstats
path: root/pki/base/console/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/console/build.xml')
-rw-r--r--pki/base/console/build.xml333
1 files changed, 333 insertions, 0 deletions
diff --git a/pki/base/console/build.xml b/pki/base/console/build.xml
new file mode 100644
index 000000000..a123ee6d2
--- /dev/null
+++ b/pki/base/console/build.xml
@@ -0,0 +1,333 @@
+<!-- ### BEGIN COPYRIGHT BLOCK ###
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ ### END COPYRIGHT BLOCK ### -->
+<project name="console" default="main" basedir=".">
+
+ <import file="config/product.xml"/>
+ <import file="config/product-ext.xml" optional="true"/>
+
+ <property name="jss.home" value="${jni-jar.home}${dirsec}"/>
+ <property name="jss.jar" value="${jss.home}/jss4.jar"/>
+ <property name="ldapjdk.jar" value="${jar.home}/ldapjdk.jar"/>
+ <property name="base.jar" value="${jar.home}/idm-console-base.jar"/>
+ <property name="mcc.jar" value="${jar.home}/idm-console-mcc.jar"/>
+ <property name="mcc_en.jar" value="${jar.home}/idm-console-mcc_en.jar"/>
+ <property name="nmclf.jar" value="${jar.home}/idm-console-nmclf.jar"/>
+ <property name="nmclf_en.jar" value="${jar.home}/idm-console-nmclf_en.jar"/>
+ <property name="nsutil.jar" value="${pki-jar.home}/nsutil.jar"/>
+
+ <path id="classpath">
+ <pathelement location="${jss.jar}"/>
+ <pathelement location="${ldapjdk.jar}"/>
+ <pathelement location="${nsutil.jar}"/>
+ <pathelement location="${base.jar}"/>
+ <pathelement location="${mcc.jar}"/>
+ <pathelement location="${mcc_en.jar}"/>
+ <pathelement location="${nmclf.jar}"/>
+ <pathelement location="${nmclf_en.jar}"/>
+ </path>
+
+
+ <target name="clean"
+ depends=""
+ description="--> remove component directories">
+ <echo message="${begin.clean.log.message}"/>
+ <delete dir="${dist.base}"/>
+ <delete dir="${build.dir}"/>
+ <echo message="${end.clean.log.message}"/>
+ </target>
+
+
+ <target name="download"
+ depends=""
+ description="--> download dependent components">
+ <echo message="${begin.download.log.message}"/>
+ <echo message="${empty.download.log.message}"/>
+ <echo message="${end.download.log.message}"/>
+ </target>
+
+
+ <target name="compile_java"
+ depends=""
+ description="--> compile java source code into classes">
+ <echo message="${begin.compile.java.log.message}"/>
+ <mkdir dir="${build.classes}"/>
+ <javac debug="on"
+ srcdir="${src.dir}/com/netscape"
+ destdir="${build.classes}">
+ <classpath refid="classpath"/>
+ </javac>
+ <echo message="${end.compile.java.log.message}"/>
+ </target>
+
+
+ <target name="build_jars"
+ depends="compile_java"
+ description="--> generate jar files">
+ <echo message="${begin.build.jars.log.message}"/>
+ <mkdir dir="${build.jars}"/>
+ <jar jarfile="${build.jars}/console-cms-${version}.jar">
+ <fileset dir="${build.classes}">
+ <include name="com/netscape/**"/>
+ </fileset>
+ </jar>
+ <jar jarfile="${build.jars}/console-cms-${version}_en.jar">
+ <fileset dir=".">
+ <include name="CMSAdminRS.properties"/>
+ </fileset>
+ </jar>
+ <echo message="${end.build.jars.log.message}"/>
+ </target>
+
+
+ <target name="build_jni_headers"
+ depends="compile_java"
+ description="--> generate jni header files">
+ <echo message="${begin.build.jni.headers.log.message}"/>
+ <echo message="${empty.build.jni.headers.log.message}"/>
+ <echo message="${end.build.jni.headers.log.message}"/>
+ </target>
+
+
+ <target name="build"
+ depends="build_jars,build_jni_headers"
+ description="--> build classes, jars, and jni headers">
+ <echo message="${notify.build.log.message}"/>
+ </target>
+
+
+ <target name="compile_junit_tests"
+ depends="build"
+ description="--> compile junit test source code">
+ <echo message="${begin.compile.junit.tests.log.message}"/>
+ <echo message="${empty.compile.junit.tests.log.message}"/>
+ <echo message="${end.compile.junit.tests.log.message}"/>
+ </target>
+
+
+ <target name="run_junit_tests"
+ depends="compile_junit_tests"
+ description="--> execute junit tests">
+ <echo message="${begin.run.junit.tests.log.message}"/>
+ <echo message="${empty.run.junit.tests.log.message}"/>
+ <echo message="${end.run.junit.tests.log.message}"/>
+ </target>
+
+
+ <target name="verify"
+ depends="run_junit_tests"
+ description="--> build and execute junit tests">
+ <echo message="${notify.verify.log.message}"/>
+ </target>
+
+
+ <target name="clean_javadocs"
+ depends=""
+ description="--> remove javadocs directory">
+ <echo message="${begin.clean.javadocs.log.message}"/>
+ <echo message="${empty.clean.javadocs.log.message}"/>
+ <echo message="${end.clean.javadocs.log.message}"/>
+ </target>
+
+
+ <target name="compose_javadocs"
+ depends="build"
+ description="--> generate javadocs">
+ <echo message="${begin.compose.javadocs.log.message}"/>
+ <echo message="${empty.compose.javadocs.log.message}"/>
+ <echo message="${end.compose.javadocs.log.message}"/>
+ </target>
+
+
+ <target name="document"
+ depends="clean_javadocs,compose_javadocs"
+ description="--> remove old javadocs and compose new javadocs">
+ <echo message="${notify.document.log.message}"/>
+ </target>
+
+
+ <target name="distribute_binaries"
+ depends="document"
+ description="--> create the zip and gzipped tar binary distributions">
+ <echo message="${begin.distribute.binaries.log.message}"/>
+ <mkdir dir="${dist.base.binaries}"/>
+
+ <echo message="${begin.binary.wrappers.log.message}"/>
+ <echo message="${empty.binary.wrappers.log.message}"/>
+ <echo message="${end.binary.wrappers.log.message}"/>
+
+ <echo message="${begin.binary.zip.log.message}"/>
+ <copy file="./templates/pki_console_wrapper"
+ tofile="./build/pkiconsole"/>
+ <exec executable="sed">
+ <arg value="-i"/>
+ <arg value="s/\[PKI_PRODUCT\]/${product.prefix}/g"/>
+ <arg value="./build/pkiconsole"/>
+ </exec>
+ <echo message="${end.binary.zip.log.message}"/>
+
+ <echo message="${begin.binary.tar.log.message}"/>
+ <zip destfile="${dist.base.binaries}/${dist.name}.zip">
+ <zipfileset dir="./build/jars"
+ filemode="755"
+ prefix="usr/share/java/${product.prefix}">
+ <include name="**"/>
+ </zipfileset>
+ <zipfileset dir="./build"
+ filemode="755"
+ prefix="usr/bin">
+ <include name="pkiconsole"/>
+ </zipfileset>
+ <zipfileset dir="."
+ filemode="755"
+ prefix="usr/share/doc/${product.name}-${version}">
+ <include name="LICENSE"/>
+ </zipfileset>
+ </zip>
+ <echo message="${end.binary.tar.log.message}"/>
+
+ <echo message="${begin.binary.gtar.log.message}"/>
+ <tar longfile="gnu"
+ destfile="${dist.base.binaries}/${dist.name}.tar">
+ <tarfileset dir="./build/jars"
+ mode="755"
+ prefix="${dist.name}/usr/share/java/${product.prefix}">
+ <include name="**"/>
+ </tarfileset>
+ <tarfileset dir="./build"
+ mode="755"
+ prefix="usr/bin">
+ <include name="pkiconsole"/>
+ </tarfileset>
+ <tarfileset dir="."
+ mode="755"
+ prefix="${dist.name}/usr/share/doc/${product.name}-${version}">
+ <include name="LICENSE"/>
+ </tarfileset>
+ </tar>
+ <echo message="${end.binary.gtar.log.message}"/>
+
+ <echo message="${end.distribute.binaries.log.message}"/>
+ <gzip destfile="${dist.base.binaries}/${dist.name}.tar.gz"
+ src="${dist.base.binaries}/${dist.name}.tar"/>
+ <delete file="${dist.base.binaries}/${dist.name}.tar"/>
+ <delete dir="${dist.name}"/>
+ <checksum fileext=".md5">
+ <fileset dir="${dist.base.binaries}/">
+ <include name="**/*"/>
+ <exclude name="**/*.asc"/>
+ <exclude name="**/*.md5"/>
+ </fileset>
+ </checksum>
+ <checksum fileext=".sha1"
+ algorithm="SHA">
+ <fileset dir="${dist.base.binaries}/">
+ <include name="**/*"/>
+ <exclude name="**/*.asc"/>
+ <exclude name="**/*.md5"/>
+ </fileset>
+ </checksum>
+ <echo message="${end.binary.gtar.log.message}"/>
+
+ <echo message="${end.distribute.binaries.log.message}"/>
+ </target>
+
+
+ <target name="distribute_source"
+ depends=""
+ description="--> create the zip and gzipped tar source distributions">
+ <echo message="${begin.distribute.source.log.message}"/>
+ <mkdir dir="${dist.base.source}"/>
+
+ <echo message="${begin.source.zip.log.message}"/>
+ <zip destfile="${dist.base.source}/${src.dist.name}.zip">
+ <zipfileset dir="."
+ filemode="755"
+ prefix="${src.dist.name}">
+ <include name="${product.name}.spec"/>
+ <include name="LICENSE"/>
+ <include name="build.xml"/>
+ <include name="CMSAdminRS.properties"/>
+ <include name="config/product*.xml"/>
+ <include name="config/release*.xml"/>
+ <include name="release"/>
+ <include name="src/**"/>
+ <include name="templates/**"/>
+ </zipfileset>
+ </zip>
+ <echo message="${end.source.zip.log.message}"/>
+
+ <echo message="${begin.source.tar.log.message}"/>
+ <tar longfile="gnu"
+ destfile="${dist.base.source}/${src.dist.name}.tar">
+ <tarfileset dir="."
+ mode="755"
+ prefix="${src.dist.name}">
+ <include name="${product.name}.spec"/>
+ <include name="LICENSE"/>
+ <include name="build.xml"/>
+ <include name="CMSAdminRS.properties"/>
+ <include name="config/product*.xml"/>
+ <include name="config/release*.xml"/>
+ <include name="release"/>
+ <include name="src/**"/>
+ <include name="templates/**"/>
+ </tarfileset>
+ </tar>
+ <echo message="${end.source.tar.log.message}"/>
+
+ <echo message="${begin.source.gtar.log.message}"/>
+ <gzip destfile="${dist.base.source}/${src.dist.name}.tar.gz"
+ src="${dist.base.source}/${src.dist.name}.tar"/>
+ <delete file="${dist.base.source}/${src.dist.name}.tar"/>
+ <delete dir="${dist.name}"/>
+ <checksum fileext=".md5">
+ <fileset dir="${dist.base.source}/">
+ <include name="**/*"/>
+ <exclude name="**/*.asc"/>
+ <exclude name="**/*.md5"/>
+ </fileset>
+ </checksum>
+ <checksum fileext=".sha1"
+ algorithm="SHA">
+ <fileset dir="${dist.base.source}/">
+ <include name="**/*"/>
+ <exclude name="**/*.asc"/>
+ <exclude name="**/*.md5"/>
+ </fileset>
+ </checksum>
+ <echo message="${end.source.gtar.log.message}"/>
+
+ <echo message="${end.distribute.source.log.message}"/>
+ </target>
+
+
+ <target name="distribute"
+ depends="distribute_binaries,distribute_source"
+ description="--> create binary and source component distributions">
+ <echo message="${notify.distribute.log.message}"/>
+ </target>
+
+
+ <target name="main"
+ depends="clean,distribute"
+ description="--> clean, build, verify, document, distribute [default]">
+ <echo message="${notify.main.log.message}"/>
+ </target>
+
+</project>
+