diff software/mpdl-services/mpiwg-mpdl-cms-web/build/build.xml @ 23:e845310098ba

diverse Korrekturen
author Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de>
date Tue, 27 Nov 2012 12:35:19 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/software/mpdl-services/mpiwg-mpdl-cms-web/build/build.xml	Tue Nov 27 12:35:19 2012 +0100
@@ -0,0 +1,57 @@
+<!DOCTYPE project>
+<project name="mpiwg-mpdl-cms-web" default="dist" basedir="../">
+  <description>mpiwg-mpdl-cms-web</description>
+  <!-- global properties -->
+  <property name="baseLibFile" location="../mpiwg-mpdl-cms/dist/mpiwg-mpdl-cms.jar"/>
+  <property name="src" location="src"/>
+  <property name="lib" location="WebContent/WEB-INF/lib"/>
+  <property name="libTomcat" location="/Applications/java/apache-tomcat-7.0.26/lib"/>
+  <property name="webappTomcat" location="/Applications/java/apache-tomcat-7.0.26/webapps"/>
+  <property name="build" location="build/classes"/>
+  <property name="dist" location="dist"/>
+
+	<path id="classpath">
+    <fileset dir="${lib}" includes="**/*.jar"/>
+    <fileset dir="${libTomcat}" includes="**/*.jar"/>
+  </path>
+  
+  <target name="init">
+    <!-- Create time stamp -->
+    <tstamp/>
+    <mkdir dir="${build}"/>
+    <mkdir dir="${dist}"/>
+    <copy file="${baseLibFile}" todir="${lib}"/>
+  </target>
+
+  <target name="compile" depends="init" description="compile">
+    <javac srcdir="${src}" destdir="${build}" classpathref="classpath" includeantruntime="false"/>
+  </target>
+
+  <target name="dist" depends="compile" description="generate the distribution">
+    <delete file="WebContent/WEB-INF/classes/constants.properties"/>
+    <copy file="conf/constants.properties" tofile="WebContent/WEB-INF/classes/constants.properties"/>
+    <jar jarfile="${dist}/mpiwg-mpdl-cms-web.jar" basedir="${build}"/>
+    <copy file="dist/mpiwg-mpdl-cms-web.jar" todir="${lib}"/>
+    <war destfile="dist/mpiwg-mpdl-cms-web.war" webxml="WebContent/WEB-INF/web.xml">
+      <fileset dir="WebContent"/>
+      <lib dir="WebContent/WEB-INF/lib"/>
+    </war>
+    <copy file="dist/mpiwg-mpdl-cms-web.war" todir="${webappTomcat}"/>
+  </target>
+
+  <target name="dist-remote-thrax" depends="compile" description="generate the distribution">
+    <delete file="WebContent/WEB-INF/classes/constants.properties"/>
+    <copy file="conf/constants-thrax.properties" tofile="WebContent/WEB-INF/classes/constants.properties"/>
+    <jar jarfile="dist-remote/mpiwg-mpdl-cms-web.jar" basedir="${build}"/>
+    <copy file="dist-remote/mpiwg-mpdl-cms-web.jar" todir="${lib}"/>
+    <war destfile="dist-remote/mpiwg-mpdl-cms-web.war" webxml="WebContent/WEB-INF/web.xml">
+      <fileset dir="WebContent"/>
+      <lib dir="WebContent/WEB-INF/lib"/>
+    </war>
+  </target>
+
+  <target name="clean" description="clean" >
+    <delete dir="${build}"/>
+    <delete file="${dist}/mpiwg-mpdl-cms-web.jar"/>
+  </target>
+</project>
\ No newline at end of file