| <project name="requestfactory" default="build" basedir="."> |
| <property name="gwt.root" location=".." /> |
| <property name="project.tail" value="requestfactory" /> |
| <import file="${gwt.root}/common.ant.xml" /> |
| |
| <!-- Remove all output files --> |
| <target name="clean" description="Cleans this project's output files"> |
| <delete file="${gwt.build.lib}/requestfactory-client.jar" /> |
| <delete file="${gwt.build.lib}/requestfactory-client-src.jar" /> |
| <delete file="${gwt.build.lib}/requestfactory-client+src.jar" /> |
| <delete file="${gwt.build.lib}/requestfactory-server.jar" /> |
| <delete file="${gwt.build.lib}/requestfactory-server-src.jar" /> |
| <delete file="${gwt.build.lib}/requestfactory-server+src.jar" /> |
| <delete file="${gwt.build.lib}/requestfactory-test+src.jar" /> |
| </target> |
| |
| <!-- Build a jar file containing a subset of requestfactory --> |
| <macrodef name="requestfactory-jar"> |
| <!-- |
| "target" should be one of {client,server,all}[(+|-)src] or test+src. |
| -src includes .java files only, +src includes .java and .class files |
| --> |
| <attribute name="target" default="client"/> |
| <sequential> |
| <java failonerror="true" fork="true" |
| classname="com.google.web.bindery.requestfactory.server.RequestFactoryJarExtractor"> |
| <classpath> |
| <fileset dir="${gwt.build.lib}" includes="gwt-user.jar,gwt-dev.jar" /> |
| <fileset dir="${gwt.tools.redist}" includes="json/r2_20080312/json-1.5.jar" /> |
| <pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar" /> |
| <pathelement path="${gwt.build.out}/user/bin" /> |
| <pathelement path="${gwt.build.out}/dev/bin-test" /> |
| <pathelement path="${gwt.build.out}/user/bin-test" /> |
| </classpath> |
| <arg value="@{target}"/> |
| <arg file="${gwt.build.lib}/requestfactory-@{target}.jar"/> |
| </java> |
| </sequential> |
| </macrodef> |
| |
| <!-- Targets for individual jars --> |
| |
| <target name="requestfactory-client" description="Build RequestFactory client jar"> |
| <requestfactory-jar target="client"/> |
| </target> |
| |
| <target name="requestfactory-client-src" description="Build RequestFactory client source jar"> |
| <requestfactory-jar target="client-src"/> |
| </target> |
| |
| <target name="requestfactory-client+src" description="Build RequestFactory client source/class jar"> |
| <requestfactory-jar target="client+src"/> |
| </target> |
| |
| <target name="requestfactory-server" description="Build RequestFactory server jar"> |
| <requestfactory-jar target="server"/> |
| </target> |
| |
| <target name="requestfactory-server-src" description="Build RequestFactory server source jar"> |
| <requestfactory-jar target="server-src"/> |
| </target> |
| |
| <target name="requestfactory-server+src" description="Build RequestFactory server source/class jar"> |
| <requestfactory-jar target="server+src"/> |
| </target> |
| |
| <!-- This target requires classes from ../build/{dev,user}/bin-test --> |
| <target name="requestfactory-test+src" description="Build RequestFactory test source/class jar"> |
| <requestfactory-jar target="test+src" /> |
| </target> |
| |
| <!-- Build all client jars --> |
| <target name="clientjars" depends="requestfactory-client,requestfactory-client-src,requestfactory-client+src" description="Build requestfactory client jars" /> |
| |
| <!-- Build all server jars --> |
| <target name="serverjars" depends="requestfactory-server,requestfactory-server-src,requestfactory-server+src" description="Build requestfactory server jars" /> |
| |
| <!-- Default target, build client and server jars. |
| Assumes the 'user' target has been built in the trunk directory |
| --> |
| <target name="build" depends="clientjars,serverjars" /> |
| |
| <!-- Run RequestFactoryJreSuite from the requestfactory-test+src jar. |
| Assumes test classes have been built in the trunk directory |
| --> |
| <target name="test" depends="requestfactory-test+src" description="Run RequestFactoryJreSuite"> |
| <java failonerror="true" fork="true" |
| classname="com.google.web.bindery.requestfactory.RequestFactoryJreSuite"> |
| <jvmarg value="-Xss8m" /> |
| <classpath> |
| <fileset dir="${gwt.tools.lib}" includes="tomcat/servlet-api-2.5.jar" /> |
| <fileset dir="${gwt.tools.lib}" includes="apache/log4j/log4j-1.2.16.jar" /> |
| <fileset dir="${gwt.tools.lib}" includes="slf4j/slf4j-api/slf4j-api-1.6.1.jar" /> |
| <fileset dir="${gwt.tools.lib}" includes="slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar" /> |
| <fileset dir="${gwt.tools.lib}" includes="hibernate/validator/hibernate-validator-4.1.0.Final.jar" /> |
| <fileset dir="${gwt.tools.lib}" includes="javax/validation/validation-api-1.0.0.GA.jar" /> |
| <fileset dir="${gwt.tools.lib}" includes="javax/xml/bind/jaxb-api-2.1.jar" /> |
| <fileset dir="${gwt.build.lib}" includes="requestfactory-test+src.jar" /> |
| </classpath> |
| </java> |
| </target> |
| |
| </project> |