Author: rmeggins
Update of /cvs/dirsec/dsmlgw In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27669
Modified Files: build.xml Log Message: add packaging and war tasks
Index: build.xml =================================================================== RCS file: /cvs/dirsec/dsmlgw/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- build.xml 18 Apr 2008 16:43:38 -0000 1.2 +++ build.xml 21 Apr 2008 17:58:54 -0000 1.3 @@ -19,6 +19,7 @@ <project name="dsmlgw" default="dist" basedir=".">
<property file="build.properties" /> + <property file="${user.home}/build.properties" />
<!-- ******************** Adjustable Properties *********************** --> <property name="globaldist.dir" location="/usr/share/java" /> @@ -41,7 +42,7 @@ <property name="axis.jar" location="${axis.lib.dir}/axis.jar" /> <property name="ldapjdk.jar" location="${ldapdist.dir}/ldapjdk.jar" /> <property name="activation.jar" location="${globaldist.dir}/activation.jar" /> - <property name="codec.jar" location="${globaldist.dir}/jakarta-commons-codec.jar" /> + <property name="codec.jar" location="${globaldist.dir}/commons-codec.jar" />
<!-- These are the jars needed at run time, in addition to the ones above needed for building @@ -64,6 +65,7 @@ <property name="build.dir" value="${mcom.root}/built/dsmlgw" /> <!-- place to write final jar file and webapps files/dirs --> <property name="dist.dir" value="${mcom.root}/../dist/dsmlgw" /> + <!-- see if we are using the binary axis package and if it is local --> <available file="${axisdist.dir}/webapps/axis" type="dir" property="haveaxisbinpkg"/> @@ -94,7 +96,7 @@ </echo> </target>
- <target name="unzipaxisbinlocal" description="unzip a local axis bin tgz" if="havelocalaxisbin"> + <target name="unzipaxisbinlocal" description="unzip a local axis bin tgz" unless="havelocalaxisbin"> <gunzip dest="${dist.dir}/${axisbin.tar}" src="${axisbin.dir}/${axisbin.tgz}" /> </target>
@@ -105,7 +107,7 @@
<!-- the useaxisbinpkg target is based on the package axis-bin-1_4.tar.gz available from ws.apache.org download --> - <target name="useaxisbinpkg" description="extract the webapps part of the binary axis tgz" if="haveaxisbinpkg" depends="unzipaxisbinlocal,unzipaxisbinremote"> + <target name="useaxisbinpkg" description="extract the webapps part of the binary axis tgz" unless="havelocalaxisbin" depends="unzipaxisbinlocal,unzipaxisbinremote"> <untar src="${dist.dir}/${axisbin.tar}" dest="${dist.dir}"> <patternset> <include name="${axisname}/webapps/axis/**" /> @@ -116,13 +118,47 @@ <delete file="${dist.dir}/${axisbin.tar}" /> </target>
+ <target name="copywebappsdir" description="copy webapps dir from axis bin dist" + if="havelocalaxisbin"> + <mkdir dir="${dist.dir}/webapps"/> + <copy todir="${dist.dir}/webapps"> + <fileset dir="${axisdist.dir}/webapps"> + <exclude name="**/samples/**"/> + </fileset> + </copy> + </target> + <target name="mkwebappsdirs" description="make the webapps directory layout" unless="haveaxisbinpkg"> <mkdir dir="${dist.dir}/webapps/axis/WEB-INF/lib" /> <mkdir dir="${dist.dir}/webapps/axis/WEB-INF/classes" /> </target>
- <target name="pkgwebapp" description="create the webapps layout, prepare for WAR" depends="dist,useaxisbinpkg,mkwebappsdirs"> + <target name="pkgwebapp" description="create the webapps layout, prepare for WAR" depends="dist,useaxisbinpkg,copywebappsdir"> + <!-- install jar files required at runtime --> + <copy file="${dist.dir}/dsmlgw.jar" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/> + <!-- ldapjdk.jar should already be on the system - create symlink during setup + <copy file="${ldapjdk.jar}" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/> + --> + <copy file="${codec.jar}" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/> + <copy file="${activation.jar}" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/> + <copy file="${mail.jar}" todir="${dist.dir}/webapps/axis/WEB-INF/lib"/> + <!-- install config files and etc. --> + <copy file="misc/dsmlgw.cfg" todir="${dist.dir}/webapps/axis/WEB-INF/classes"/> + <copy file="misc/dsmlgw-deploy.wsdd" todir="${dist.dir}/webapps/axis/WEB-INF/classes"/> + <copy file="misc/logging.properties" todir="${dist.dir}/webapps/axis/WEB-INF/classes"/> + <copy file="misc/log4j.properties" todir="${dist.dir}/webapps/axis/WEB-INF/classes"/> + </target> + + <target name="makewar" description="create the WAR file" depends="pkgwebapp"> + <war destfile="${dist.dir}/dsmlgw.war" webxml="${dist.dir}/webapps/axis/WEB-INF/web.xml"> + <lib dir="${dist.dir}/webapps/axis/WEB-INF/lib"/> + <classes dir="${dist.dir}/webapps/axis/WEB-INF/classes"/> + <fileset dir="${dist.dir}/webapps/axis"> + <exclude name="**/WEB-INF/lib/**"/> + <exclude name="**/WEB-INF/classes/**"/> + </fileset> + </war> </target>
<target name="prepare" description="prepares the output directories">
389-commits@lists.fedoraproject.org