Browse files

Ant build script for creating the .war file

  • Loading branch information...
1 parent 5b95d0b commit df850d8b76adda386235a033b8c929c7255cad77 @claudiugh claudiugh committed Jan 26, 2012
Showing with 35 additions and 0 deletions.
  1. +34 −0 build.xml
  2. +1 −0 server/build.xml
View
34 build.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="OpenTSDB - tsdash" basedir="." default="war">
+ <description>
+ Global build file for tsdash
+ </description>
+
+ <property name="server" location="server" />
+ <property name="ui" location="ui" />
+ <property name="conf" location="conf" />
+
+ <target name="server">
+ <echo>Building the server component...</echo>
+ <ant target="dist" dir="${server}" />
+ </target>
+
+ <target name="ui">
+ <echo>Building the UI...</echo>
+ <ant target="build" dir="${ui}" />
+ </target>
+
+ <target name="war" depends="server,ui">
+ <echo>Packing the .war file</echo>
+ <war destfile="tsdash.war" webxml="${conf}/web.xml">
+ <lib dir="${server}/lib" />
+ <lib file="${server}/build/tsdash-server.jar" />
+ <fileset dir="${ui}/war" excludes="WEB-INF/">
+ </fileset>
+ </war>
+ </target>
+
+ <target name="clean" description="Removes the .war file">
+ <delete file="tsdash.war" failonerror="false" />
+ </target>
+</project>
View
1 server/build.xml
@@ -22,6 +22,7 @@
<target name="dist" depends="compile"
description="generate the distribution" >
+ <delete file="${build}/tsdash-server.jar" quiet="true" />
<jar jarfile="${build}/tsdash-server.jar" basedir="${build}"/>
</target>

0 comments on commit df850d8

Please sign in to comment.