<?xml version="1.0"?> <!-- Ant Buildfile for MOA SP/SS Server Authors: Patrick Peck, Gregor Karlinger $Id$ --> <project name="moa-spss-server" default="deploy-catalina" basedir="."> <property environment="env"/> <property name="script-suffix" value="${env.SCRIPT_SUFFIX}"/> <property name="version" value="1.1.0"/> <property name="src" value="src"/> <property name="lib" value="lib"/> <property name="res" value="res"/> <property name="data" value="data"/> <property name="deploy.conf" value="${data}/test/conf"/> <property name="doc" value="doc"/> <property name="tmp" value="tmp"/> <property name="compile" value="${tmp}/compile"/> <property name="tools" value="${tmp}/tools"/> <property name="tmp.doc" value="${tmp}/doc"/> <property name="api-doc" value="${tmp}/api-doc"/> <property name="api-doc.internal" value="${tmp}/api-doc-internal"/> <property name="prj.build" value="../build"/> <property name="prj.common" value="../common"/> <property name="dist" value="${tmp}/dist"/> <property name="dist.ws" value="${dist}/ws"/> <property name="dist.ws.endorsed13" value="${dist.ws}/endorsed13"/> <property name="dist.ws.conf" value="${dist.ws}/conf"/> <property name="dist.ws-zip" value="${dist}/ws-zip"/> <property name="dist.lib" value="${dist}/lib"/> <property name="dist.lib-zip" value="${dist}/lib-zip"/> <property name="dist.src" value="${dist}/src"/> <property name="dist.src-zip" value="${dist}/src-zip"/> <property name="lib.axis" value="${lib}/axis-1.0"/> <property name="lib.jaxp" value="${lib}/jaxp-1.2_01"/> <property name="lib.jaxen" value="${lib}/jaxen-1.0"/> <property name="lib.xerces" value="${lib}/xerces-j-2.0.2"/> <property name="lib.xalan" value="${lib}/xalan-j-2.2"/> <property name="lib.jsse" value="${lib}/jsse-1.0.3_01"/> <property name="lib.postgres-jdbc" value="${lib}/postgres-jdbc2-7.3"/> <property name="lib.iaik-moa" value="${lib}/iaik-moa-20030703"/> <property name="lib.junit" value="${lib}/junit-3.8.1"/> <property name="lib.servlet" value="${lib}/servlet-2.3"/> <property name="lib.commons-logging" value="${lib}/commons-logging-1.0.2"/> <property name="lib.commons-discovery" value="${lib}/commons-discovery-0.2"/> <property name="lib.log4j" value="${lib}/log4j-1.2.7"/> <property name="lib.idoclet" value="${lib}/iDoclet-1.0"/> <path id="compile.classpath"> <pathelement location="${lib.axis}/axis.jar"/> <pathelement location="${lib.axis}/jaxrpc.jar"/> <pathelement location="${lib.axis}/saaj.jar"/> <pathelement location="${lib.jaxp}/jaxp-api.jar"/> <pathelement location="${lib.jaxp}/dom.jar"/> <pathelement location="${lib.jaxp}/sax.jar"/> <pathelement location="${lib.xerces}/xerces.jar"/> <pathelement location="${lib.jaxen}/jaxen-core.jar"/> <pathelement location="${lib.jaxen}/jaxen-dom.jar"/> <pathelement location="${lib.jaxen}/saxpath.jar"/> <pathelement location="${lib.xalan}/xalan.jar"/> <pathelement location="${lib.junit}/junit.jar"/> <fileset dir="${lib.jsse}" /> <pathelement location="${lib.commons-logging}/commons-logging-api.jar"/> <pathelement location="${lib.commons-discovery}/commons-discovery.jar"/> <pathelement location="${lib.servlet}/servlet-2_3-fcs-classfiles.zip"/> <pathelement location="${lib.iaik-moa}/iaik-moa-full.jar"/> <pathelement location="${lib.iaik-moa}/ixsil.jar"/> <pathelement location="${lib.iaik-moa}/iaik_jce_full.jar"/> <pathelement location="${lib.iaik-moa}/iaik_ecc.jar"/> <pathelement location="${env.MOA_COMMON_TEST_JAR}"/> </path> <target name="init"> <description>set up directories etc.</description> <tstamp/> <mkdir dir="${tmp}"/> <mkdir dir="${compile}"/> <mkdir dir="${tools}"/> <mkdir dir="${api-doc}"/> <mkdir dir="${api-doc.internal}"/> <mkdir dir="${dist}"/> <mkdir dir="${dist.ws}"/> <mkdir dir="${dist.ws-zip}"/> <mkdir dir="${dist.lib}"/> <mkdir dir="${dist.lib-zip}"/> <mkdir dir="${dist.src}"/> <mkdir dir="${dist.src-zip}"/> </target> <target name="compile" depends="init"> <description>compile everything</description> <javac srcdir="${src}" destdir="${compile}" classpathref="compile.classpath" debug="on"> </javac> </target> <target name="package-ws" depends="compile"> <description>package the server war file</description> <war warfile="${dist.ws}/moa-spss.war" webxml="web.xml"> <lib dir="${lib.xalan}"/> <lib dir="${lib.jaxp}"/> <lib dir="${lib.log4j}"/> <lib dir="${lib.postgres-jdbc}"/> <lib dir="${lib.axis}"/> <lib dir="${lib.jaxen}"/> <lib dir="${lib.iaik-moa}" excludes="iaik_jce_full.jar, win32/**, linux/**, solaris/**, signed/**"/> <lib file="${lib.commons-logging}/commons-logging.jar"/> <lib file="${lib.commons-discovery}/commons-discovery.jar"/> <lib file="${env.MOA_COMMON_JAR}"/> <classes dir="${compile}" excludes="test/**"/> <classes dir="${res}"/> <classes file="${data}/deploy/conf/moa-spss/log4j.properties"/> <webinf file="server-config.wsdd"/> <webinf dir="${data}/deploy" includes="conf/**"/> <zipfileset file="${res}/resources/wsdl/MOA-SPSS-1.1.xsd" prefix="resources/schemas"/> </war> </target> <target name="package-lib" depends="compile"> <description>package the library jar file</description> <jar destfile="${dist.lib}/moa-spss.jar"> <fileset dir="${compile}" excludes="test/**"/> <fileset dir="${res}"/> <fileset dir="${data}/deploy/conf/moa-spss" includes="log4j.properties"/> </jar> </target> <target name="package-tools" depends="compile"> <description>package the configuration tools</description> <jar destfile="${tools}/tools.jar"> <fileset dir="${compile}" includes="at/**/tools/**"/> </jar> </target> <target name="api-doc-internal" depends="init"> <description>create JavaDoc for the server internal classes</description> <javadoc defaultexcludes="yes" destdir="${api-doc.internal}" author="true" version="true" use="true" windowtitle="MOA SP/SS Server Internal API"> <packageset dir="${prj.common}/src"> <exclude name="test/**"/> </packageset> <packageset dir="src"> <exclude name="test/**"/> <exclude name="at/gv/egovernment/moa/spss/api/**"/> </packageset> <group title="Exception Classes" packages="at.gv.egovernment.moa.spss.server"> </group> <group title="MOA Configuration"> <package name="at.gv.egovernment.moa.spss.server.config"/> <package name="at.gv.egovernment.moa.spss.server.iaik.config"/> </group> <group title="Web Service Handling"> <package name="at.gv.egovernment.moa.spss.server.service"/> <package name="at.gv.egovernment.moa.spss.server.transaction"/> </group> <group title="Mapping MOA API calls to the IAIK API" packages="at.gv.egovernment.moa.spss.server.invoke"> </group> <group title="Implementations of IAIK interfaces" packages="at.gv.egovernment.moa.spss.server.iaik.*"> </group> <group title="Utilities"> <package name="at.gv.egovernment.moa.util"/> <package name="at.gv.egovernment.moa.spss.server.util"/> </group> <group title="Logging"> <package name="at.gv.egovernment.moa.logging"/> <package name="at.gv.egovernment.moa.spss.server.logging"/> </group> <group title="External Tools" packages="at.gv.egovernment.moa.spss.server.tools"> </group> <link offline="false" href="http://java.sun.com/j2se/1.3/docs/api/"/> <doctitle><![CDATA[<h1>MOA SP/SS Server Internal API</h1>]]></doctitle> <classpath refid="compile.classpath"/> </javadoc> </target> <target name="api-doc" depends="init"> <description>create JavaDoc for the SP/SS API</description> <javadoc defaultexcludes="yes" destdir="${api-doc}" author="false" version="false" use="true" Overview="${src}/at/gv/egovernment/moa/spss/overview.htm" windowtitle="MOA SP/SS API"> <packageset dir="src"> <include name="at/gv/egovernment/moa/spss/**"/> <exclude name="at/gv/egovernment/moa/spss/server/**"/> <exclude name="at/gv/egovernment/moa/spss/api/impl/**"/> <exclude name="test/**"/> </packageset> <packageset dir="${prj.common}/src"> <exclude name="test/**"/> </packageset> <group title="API Factory and Services"> <package name="at.gv.egovernment.moa.spss.api"/> </group> <group title="Exceptions"> <package name="at.gv.egovernment.moa.spss"/> </group> <group title="API Objects for Signature Creation"> <package name="at.gv.egovernment.moa.spss.api.xmlsign"/> </group> <group title="API Objects for CMS Signature Verification"> <package name="at.gv.egovernment.moa.spss.api.cmsverify"/> </group> <group title="API Objects for XML Signature Verification"> <package name="at.gv.egovernment.moa.spss.api.xmlverify"/> </group> <group title="Common API Objects"> <package name="at.gv.egovernment.moa.spss.api.common"/> </group> <group title="Builders and Parsers to convert API Objects to and from XML"> <package name="at.gv.egovernment.moa.spss.api.xmlbind"/> </group> <group title="Utilities"> <package name="at.gv.egovernment.moa.util"/> <package name="at.gv.egovernment.moa.spss.util"/> </group> <group title="Logging"> <package name="at.gv.egovernment.moa.logging"/> </group> <link offline="false" href="http://java.sun.com/j2se/1.3/docs/api/"/> <doclet name="iContract.doclet.Standard" path="${lib.idoclet}/iDoclet.jar"> <param name="-use"/> </doclet> <doctitle><![CDATA[<h1>MOA SP/SS API</h1>]]></doctitle> <classpath refid="compile.classpath"/> </javadoc> </target> <target name="dist-ws" depends="package-ws, package-tools"> <description>create the webservice distributable</description> <copy toDir="${dist.ws}/tomcat"> <fileset dir="${data}/deploy/tomcat"/> </copy> <copy toDir="${dist.ws}/conf"> <fileset dir="${data}/deploy/conf"/> </copy> <copy toDir="${dist.ws}/ext13"> <fileset dir="${lib.iaik-moa}" includes="iaik_jce_full.jar"/> <fileset dir="${lib.jsse}"/> </copy> <copy toDir="${dist.ws}/ext14"> <fileset dir="${lib.iaik-moa}/signed"/> </copy> <copy toDir="${dist.ws}/endorsed13"> <fileset dir="${lib.xerces}"/> </copy> <copy toDir="${dist.ws}/endorsed14"> <fileset dir="${lib.xerces}"/> <fileset dir="${lib.xalan}"/> </copy> <copy toDir="${dist.ws}/tools"> <fileset dir="${tools}"/> <fileset dir="${lib.iaik-moa}"> <include name="iaik_jce_full.jar"/> <include name="iaik-moa-full.jar"/> <include name="iaik_ecc.jar"/> </fileset> <fileset dir="${lib.log4j}"/> <fileset dir="${data}/deploy/tools"/> </copy> <copy toDir="${dist.ws}/pkcs11"> <fileset dir="${lib.iaik-moa}" includes="win32/**, linux/**, solaris/**"/> </copy> <fixcrlf srcdir="${dist.ws}" includes="**/*.sh" eol="lf" eof="remove"/> </target> <target name="dist-ws-doc" depends="dist-ws, api-doc"> <description> create the webservice-distributable, including all documentation </description> <copy todir="${dist.ws}/doc"> <fileset dir="${doc}" excludes="api-doc-internal/**"/> </copy> <copy toDir="${dist.ws}/doc/api-doc"> <fileset dir="${api-doc}"/> </copy> </target> <target name="dist-ws-zip" depends="dist-ws-doc"> <description> create the zipped webservice distributable </description> <zip zipfile="${dist.ws-zip}/moa-spss-${version}.zip"> <zipfileset dir="${dist.ws}" prefix="moa-spss-${version}"/> </zip> </target> <target name="dist-lib" depends="package-lib"> <description>create the library distributable</description> <copy todir="${dist.lib}/doc"> <fileset dir="${doc}"/> </copy> <copy todir="${dist.lib}" file="${env.MOA_COMMON_JAR}"/> <copy todir="${dist.lib}/lib"> <fileset dir="${lib.jaxp}"/> <fileset dir="${lib.xerces}"/> <fileset dir="${lib.jaxen}"/> <fileset dir="${lib.xerces}"/> <fileset dir="${lib.xalan}"/> <fileset dir="${lib.postgres-jdbc}"/> <fileset dir="${lib.iaik-moa}" excludes="signed/**, iaik_jce_full.jar"/> <fileset dir="${lib.commons-logging}"/> <fileset dir="${lib.log4j}"/> <fileset dir="${lib.commons-discovery}"/> </copy> <copy toDir="${dist.lib}/conf"> <fileset dir="${data}/deploy/conf"/> </copy> <copy toDir="${dist.lib}/ext13"> <fileset dir="${lib.iaik-moa}" includes="iaik_jce_full.jar"/> <fileset dir="${lib.jsse}"/> </copy> <copy toDir="${dist.lib}/ext14"> <fileset dir="${lib.iaik-moa}/signed"/> </copy> <copy toDir="${dist.ws}/tools"> <fileset dir="${tools}"/> <fileset dir="${lib.iaik-moa}"> <include name="iaik_jce_full.jar"/> <include name="iaik-moa-full.jar"/> <include name="iaik_ecc.jar"/> </fileset> <fileset dir="${lib.log4j}"/> <fileset dir="${data}/deploy/tools"/> </copy> <fixcrlf srcdir="${dist.lib}" includes="**/*.sh" eol="lf" eof="remove"/> </target> <target name="dist-lib-doc" depends="dist-lib, api-doc"> <description> create the library distributable, including all documentation </description> <copy todir="${dist.lib}/doc"> <fileset dir="${doc}" excludes="api-doc-internal/**"/> </copy> <copy toDir="${dist.lib}/doc/api-doc"> <fileset dir="${api-doc}"/> </copy> </target> <target name="dist-lib-zip" depends="dist-lib-doc"> <description> create the zipped library distributable </description> <zip zipfile="${dist.lib-zip}/moa-spss-${version}-lib.zip"> <zipfileset dir="${dist.lib}" prefix="moa-spss-${version}-lib"/> </zip> </target> <target name="dist-src"> <description>create the source distributable</description> <copy toDir="${dist.src}/build"> <fileset dir="${prj.build}"/> </copy> <copy toDir="${dist.src}/common"> <fileset dir="${prj.common}" excludes="tmp/**, bin/**"/> </copy> <copy toDir="${dist.src}/spss.server"> <fileset dir="." excludes="tmp/**, bin/**"/> </copy> <fixcrlf srcdir="${dist.src}" includes="**/*.sh" eol="lf" eof="remove"/> </target> <target name="dist-src-doc" depends="dist-src, api-doc-internal"> <copy toDir="${dist.src}/spss.server/doc/api-doc-internal"> <fileset dir="${api-doc.internal}"/> </copy> </target> <target name="dist-src-zip" depends="dist-src-doc"> <zip zipfile="${dist.src-zip}/moa-spss-${version}-src.zip"> <zipfileset dir="${dist.src}" prefix="moa-spss-${version}-src"/> </zip> </target> <target name="dist-all" depends="dist-ws-zip, dist-lib-zip, dist-src-zip"> <description>create all distributables</description> </target> <target name="deploy-catalina" depends="dist-ws" if="env.CATALINA_HOME"> <description> deploy the webservice to catalina (needs CATALINA_HOME defined) </description> <delete dir="${env.CATALINA_HOME}/webapps/moa-spss"/> <copy file="${dist.ws}/moa-spss.war" toDir="${env.CATALINA_HOME}/webapps"/> <!-- copy endorsed jars --> <copy toDir="${env.CATALINA_HOME}/common/endorsed"> <fileset dir="${dist.ws.endorsed13}"/> </copy> <!-- copy sample configuration --> <copy toDir="${env.CATALINA_HOME}/conf"> <fileset dir="${deploy.conf}"/> </copy> </target> <target name="clean"> <description>clean temporary files</description> <delete dir="${tmp}"/> </target> </project>