cuba/modules/web-war/build.xml
2008-12-29 15:15:03 +00:00

67 lines
2.5 KiB
XML

<?xml version="1.0"?>
<project xmlns:ext="http://haulmont.com/schema/ant"
name="cuba-web-war" default="build-module" basedir=".">
<property name="project.dir" location="../.."/>
<property name="root.dir" location="${project.dir}/.."/>
<property name="module.name" value="web-war"/>
<property name="module.jar" value="24cuba.war"/>
<import file="${root.dir}/build-inc-mod.xml"/>
<property file="${root.dir}/build.properties"/>
<property file="${project.dir}/lib.properties"/>
<property name="web.src.dir" location="${module.dir}/web"/>
<property name="widgets.out.dir" value="${build.dir}/${module.name}/ITMILL/widgetsets"/>
<path id="compile-cp">
<fileset refid="common-lib-fs"/>
<fileset refid="server-lib-fs"/>
<pathelement location="${prod.out.dir}/core"/>
<pathelement location="${prod.out.dir}/gui"/>
<pathelement location="${prod.out.dir}/web"/>
</path>
<path id="test-compile-cp">
<fileset refid="common-lib-fs"/>
<fileset refid="server-lib-fs"/>
</path>
<target name="clean-module" depends="base-mod.clean-module">
<delete dir="${build.dir}/${module.name}"/>
</target>
<target name="build-module">
<echo>==> building ${project.dir} ${module.name}</echo>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/${module.name}"/>
<copy todir="${build.dir}/${module.name}">
<fileset dir="${web.src.dir}" includes="**/*"/>
</copy>
<antcall target="build-gwt"/>
<jar basedir="${build.dir}/${module.name}" destfile="${build.dir}/${module.jar}"/>
</target>
<target name="build-gwt">
<echo>==> building gwt module...</echo>
<java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="128m">
<arg value="-out"/>
<arg value="${widgets.out.dir}"/>
<arg value="com.haulmont.cuba.toolkit.gwt.WidgetSet"/>
<classpath>
<pathelement path="${java.src.dir}"/>
<pathelement location="${lib.server.dir}/itmill-toolkit-${itmill-toolkit.version}.jar"/>
<pathelement location="${lib.gwt.dir}/gwt-user-${gwt-user.version}.jar"/>
<pathelement location="${lib.gwt.dir}/gwt-dev-windows-${gwt-dev-windows.version}.jar"/>
</classpath>
</java>
</target>
<target name="deploy-module" depends="undeploy-module, base-mod.deploy-module"/>
</project>