diff build.xml @ 3:cf06b77a8bbd

Committed branch of the e4D repos sti-gwt branch 16384. git-svn-id: http://dev.dariah.eu/svn/repos/eu.dariah.de/ap1/sti-gwt-dariah-geobrowser@36 f2b5be40-def6-11e0-8a09-b3c1cc336c6b
author StefanFunk <StefanFunk@f2b5be40-def6-11e0-8a09-b3c1cc336c6b>
date Tue, 17 Jul 2012 13:34:40 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build.xml	Tue Jul 17 13:34:40 2012 +0000
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<project name="sti-gwt" default="compile" basedir=".">
+	<property name="srcdir" location="src"/>
+	<property name="builddir" location="build"/>
+	<path id="classpath">
+		<pathelement location="${srcdir}"/>
+		<pathelement location="${builddir}"/>
+		<fileset dir="lib">
+			<include name="*.jar"/>
+		</fileset>
+		<!--
+    <fileset dir="war/WEB-INF/lib">
+      <include name="*.jar"/>
+    </fileset>
+    -->
+	</path>
+
+	<target name="clean" description="Clean up the generated directory">
+		<delete dir="${builddir}"/>
+	</target>
+
+	<target name="war" description="Create a WAR file" depends="compile">
+		<war destfile="e4d.war" webxml="build/WEB-INF/web.xml">
+			<fileset dir="build"/>
+		</war>
+	</target>
+
+	<target name="compile" description="Start the compiler" depends="compileGWT">
+		<mkdir dir="${builddir}/WEB-INF/classes"/>
+		<javac includeantruntime="false" classpathref="classpath" srcdir="src" destdir="${builddir}/WEB-INF/classes"/>
+	</target>
+	
+	<!-- Quick and dirty hack from http://pavelgj.blogspot.com/2007/02/gwt-ant-compile-macro.html -->
+	<target name="compileGWT" description="Start the GWT compiler">
+		<copy todir="${builddir}">
+			<fileset dir="war" />
+		</copy>
+		<gwtCompile module="econnect.wp3_3.Sti" classpathref="classpath" output="${builddir}"/>
+	</target>
+
+	<macrodef name="gwtCompile">
+		<attribute name="module"/>
+		<attribute name="classpathref" default="classpath"/>
+		<attribute name="output" default="${builddir}"/>
+		<sequential>
+			<java classpathref="@{classpathref}" classname="com.google.gwt.dev.Compiler" fork="true">
+				<arg value="-war"/>
+				<arg value="@{output}"/>
+				<arg value="@{module}"/>
+			</java>
+		</sequential>
+	</macrodef>
+</project>