view build.xml @ 89:3700846b8590 trimmed_data tip

bug: removed leading / in url
author Sebastian Kruse <skruse@mpiwg-berlin.mpg.de>
date Fri, 15 Mar 2013 12:53:55 +0100
parents cf06b77a8bbd
children
line wrap: on
line source

<?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>