<!-- ======================================================================
project: cxraiffeisendataexport
description: Build file for the Cash eXpress Raiffeisen Data Export Web App.
====================================================================== -->
<project name="cxraiffeisendataexport" default="build-application">
<condition property="build.base.dir" value=".." else="../../..">
<available file="../cx/build.xml" />
</condition>
<!-- 3rd party library directories -->
<property name="frameworks.dir" location="${build.base.dir}/3rdparty/frameworks" />
<property name="spring.dir" location="${build.base.dir}/3rdparty/frameworks/spring/lib" />
<property name="spring.extras.dir" location="${build.base.dir}/3rdparty/frameworks/spring-extras/lib" />
<property name="jaxws.dir" location="${build.base.dir}/3rdparty/frameworks/jax-ws/lib" />
<property name="logging.dir" location="${build.base.dir}/3rdparty/frameworks/logging/lib" />
<property name="commons.dir" location="${build.base.dir}/3rdparty/frameworks/commons/lib" />
<property name="gwt.dir" location="${build.base.dir}/3rdparty/frameworks/gwt" />
<property name="excel.jar.dir" location="${build.base.dir}/3rdparty/utils/excel/lib" />
<property name="json.dir" location="${build.base.dir}/3rdparty/utils/json/lib" />
<property name="javaee.dir" location="${build.base.dir}/3rdparty/frameworks/javaee" />
<property name="charts.dir" location="${build.base.dir}/3rdparty/frameworks/gwt/library/charts" />
<!-- project dependencies -->
<property name="cxcommons.src.dir" location="${build.base.dir}/cxcommons/src" />
<property name="cxcommons.build.classes.dir" location="${build.base.dir}/cxcommons/build/classes" />
<property name="cxcommons.springschemas.dir" location="${build.base.dir}/cxcommons/spring-schemas" />
<property name="cxcommons.dist.jar.dir" location="${build.base.dir}/cxcommons/dist/jar" />
<property name="cxws.dist.classes.dir" location="${build.base.dir}/cxws/dist/classes" />
<property name="cxws.dist.jar.dir" location="${build.base.dir}/cxws/dist/jar" />
<property name="cxws.dist.wsdl.dir" location="${build.base.dir}/cxws/dist/wsdl" />
<property name="cxapi.dist.jar.dir" location="${build.base.dir}/cxapi/dist/jar" />
<property name="cxdataexportfilter.dist.jar.dir" location="${build.base.dir}/cxdataexportfilter/dist/jar" />
<property name="cxui.webroot.dir" location="${build.base.dir}/cxui/Webroot" />
<!-- project directories -->
<property name="server.src.path" value="uk/finsolint/cashexpress/cxraiffeisendataexport/gwt/server" />
<property name="client.src.path" value="uk/finsolint/cashexpress/cxraiffeisendataexport/gwt/client" />
<property name="module.src.path" value="uk/finsolint/cashexpress/cxraiffeisendataexport/gwt" />
<property name="src.dir" location="src" />
<property name="client.src.dir" location="src/${client.src.path}" />
<property name="module.src.dir" location="src/${module.src.path}" />
<property name="build.dir" location="build" />
<property name="build.webroot.dir" location="build/WebRoot" />
<property name="dist.dir" location="dist" />
<property name="dist.war.dir" location="${dist.dir}" />
<property name="webroot.dir" location="WebRoot" />
<!-- project target artefacts -->
<property name="war.name" value="cxbalancereport" />
<property name="cxui.jar" value="cxbalancereport.jar" />
<property name="cxuishared.jar" value="cxuishared.jar" />
<!-- GWT modules to compile
Currently only supports 1 module!
-->
<property name="gwt.module.package" value="uk.finsolint.cashexpress.cxraiffeisendataexport.gwt" />
<property name="gwt.module.name.raiffeisen" value="RaiffeisenDataExport" />
<property name="build.gwt.dir" location="${build.dir}/gwt" />
<property name="build.gwt.src.dir" location="${build.gwt.dir}/src" />
<property name="build.gwt.src.module.dir" location="${build.gwt.src.dir}/${module.src.path}" />
<property name="build.gwt.src.client.dir" location="${build.gwt.src.dir}/${client.src.path}" />
<property name="build.gwt.src.i18n.client.dir" location="${build.gwt.src.dir}/${client.src.path}/ui/i18n" />
<property name="build.gwt.gen.dir" location="${build.gwt.dir}/gen" />
<property name="build.gwt.work.dir" location="${build.gwt.dir}/work" />
<property name="build.gwt.extra.dir" location="${build.gwt.dir}/extra" />
<property name="gwt.local.workers" value="6" />
<!-- classpaths -->
<path id="jaxws.classpath">
<fileset dir="${jaxws.dir}">
<include name="webservices-rt.jar" />
</fileset>
</path>
<path id="cxcommons.classpath">
<fileset dir="${cxcommons.dist.jar.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="cxws.classpath">
<fileset dir="${cxws.dist.jar.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="cxapi.classpath">
<fileset dir="${cxapi.dist.jar.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="cxdataexportfilter.classpath">
<fileset dir="${cxdataexportfilter.dist.jar.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="gwt.client.classpath">
<!-- Google dirs -->
<!-- NOTE: May need to add others if special GWT packages used -->
<fileset dir="${gwt.dir}">
<include name="gwt-api-checker.jar" />
<include name="gwt-dev.jar" />
<include name="gwt-user.jar" />
<include name="validation-api-1.0.0.GA-sources.jar" />
<include name="validation-api-1.0.0.GA.jar" />
</fileset>
</path>
<path id="gwt.server.classpath">
<fileset dir="${gwt.dir}">
<include name="gwt-servlet.jar" />
<include name="gwt-servlet-deps.jar" />
</fileset>
</path>
<path id="spring.mvc.classpath">
<fileset dir="${spring.dir}">
<include name="org.springframework.web-3.0.6.RELEASE.jar" />
<include name="org.springframework.web.servlet-3.0.6.RELEASE.jar" />
<include name="org.springframework.beans-3.0.6.RELEASE.jar" />
<include name="org.springframework.context-3.0.6.RELEASE.jar" />
<include name="org.springframework.core-3.0.6.RELEASE.jar" />
</fileset>
</path>
<path id="spring.runtime.classpath">
<fileset dir="${spring.dir}">
<include name="org.springframework.context.support-3.0.6.RELEASE.jar" />
<include name="org.springframework.asm-3.0.6.RELEASE.jar" />
<include name="org.springframework.expression-3.0.6.RELEASE.jar" />
</fileset>
<fileset dir="${spring.extras.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="logging.classpath">
<fileset dir="${logging.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="commons.classpath">
<fileset dir="${commons.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="javaee.classpath">
<fileset dir="${javaee.dir}">
<include name="javaee-api-5.jar" />
</fileset>
</path>
<path id="excel.classpath">
<fileset dir="${excel.jar.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="json.classpath">
<fileset dir="${json.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<path id="charts.classpath">
<fileset dir="${charts.dir}">
<include name="gwt-rcharts1.1.jar" />
<include name="org.moxieapps.gwt.highcharts-1.6.0.jar" />
</fileset>
</path>
<path id="dependencies.classpath">
<path refid="jaxws.classpath" />
<!-- Only needed because of ServerSideException!-->
<path refid="cxcommons.classpath" />
<path refid="cxws.classpath" />
<path refid="cxdataexportfilter.classpath" />
<path refid="gwt.client.classpath" />
<path refid="gwt.server.classpath" />
<path refid="spring.mvc.classpath" />
<path refid="logging.classpath" />
<path refid="commons.classpath" />
<path refid="javaee.classpath" />
<path refid="excel.classpath" />
<path refid="json.classpath" />
<path refid="charts.classpath" />
</path>
<path id="runtime.dependencies.classpath">
<path refid="jaxws.classpath" />
<!-- Only needed because of ServerSideException!-->
<path refid="cxcommons.classpath" />
<path refid="cxws.classpath" />
<path refid="cxdataexportfilter.classpath" />
<path refid="gwt.server.classpath" />
<path refid="spring.mvc.classpath" />
<path refid="spring.runtime.classpath" />
<path refid="logging.classpath" />
<path refid="commons.classpath" />
<path refid="excel.classpath" />
<path refid="json.classpath" />
<path refid="charts.classpath" />
</path>
<!-- =================================
target: build-application
desc: This is the default task, it builds the complete web service from scratch.
================================= -->
<target name="build-application" depends="clean, compile-gwt-module, compile-application-code, jar-files, war-application, post-build-tidy-up">
</target>
<target name="clean">
<delete dir="${build.dir}" failonerror="true" />
<delete dir="${dist.dir}" failonerror="true" />
<!-- Get rid of code compiled by GWT -->
<delete dir="${webroot.dir}/${gwt.module.package}.${gwt.module.name.raiffeisen}" failonerror="true" />
</target>
<target name="post-build-tidy-up" if="dev.build">
<delete dir="${build.dir}" defaultexcludes="no" />
</target>
<!-- =================================
target: compile-application-code
desc: This builds all of the web service classes. It assumes that the source code
path contains all the files for this web service, that is:
the web service definition
the web service business logic
any client-stubs for web services _it_ connects to
================================= -->
<target name="compile-application-code">
<mkdir dir="${build.dir}/classes" />
<javac classpathref="dependencies.classpath" destdir="${build.dir}/classes" debug="yes" failonerror="yes">
<src path="${src.dir}" />
<!-- This will still allow client files to be compiled, but only if referenced by the server-side code -->
<exclude name="${client.src.path}/**" />
</javac>
<javac classpathref="dependencies.classpath" destdir="${build.dir}/classes" debug="yes" failonerror="yes">
<src path="${src.dir}" />
<include name="${client.src.path}/config/commons/**" />
</javac>
</target>
<!-- =================================
target: jar-files
desc: Jar up both this layer's application
================================= -->
<target name="jar-files" depends="copy-resources">
<mkdir dir="${build.webroot.dir}/WEB-INF/lib" />
<jar destfile="${build.webroot.dir}/WEB-INF/lib/${cxui.jar}">
<fileset dir="${build.dir}/classes">
<exclude name="**/SessionExpiryController.class" />
</fileset>
</jar>
<jar destfile="${build.webroot.dir}/WEB-INF/lib/${cxuishared.jar}">
<fileset dir="${build.dir}/classes">
<include name="**/SessionExpiryController.class" />
</fileset>
</jar>
</target>
<!-- =================================
target: copy-resources
desc: Puts resource files in area for jar'ing
================================= -->
<target name="copy-resources">
<copy todir="${build.dir}/classes">
<fileset dir="${src.dir}">
<include name="**/*.properties" />
</fileset>
</copy>
<!-- Include images, etc.... -->
</target>
<!-- =================================
target: copy-files-into-web-inf
desc: This is a central task for coping a number of the files required by the WAR that are
not so easy to place within the WAR task itself.
================================= -->
<target name="copy-files-into-web-inf">
<mkdir dir="${build.webroot.dir}" />
<!-- Copy all WAR files (root may contain HTML pages, module dir contains JS) -->
<copy todir="${build.webroot.dir}">
<fileset dir="${webroot.dir}">
<include name="**/*" />
<exclude name="WEB-INF/web.xml" />
</fileset>
</copy>
<!-- Copy cxui CSS -->
<copy todir="${build.webroot.dir}/css">
<fileset dir="${cxui.webroot.dir}/css">
<include name="**/*" />
</fileset>
</copy>
<!-- Copy cxui fonts -->
<copy todir="${build.webroot.dir}/fonts">
<fileset dir="${cxui.webroot.dir}/fonts">
<include name="**/*" />
</fileset>
</copy>
<!-- Add dependencies otherwise get lots of class loading issues (e.g. DispatcherServlet) -->
<copy todir="${build.webroot.dir}/WEB-INF/lib">
<path>
<path refid="runtime.dependencies.classpath" />
</path>
<fileset dir="${cxapi.dist.jar.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${cxapi.dist.jar.dir}/dependencies">
<include name="*.jar" />
</fileset>
</copy>
</target>
<target name="war-application" depends="copy-files-into-web-inf">
<mkdir dir="${dist.war.dir}" />
<war destfile="${dist.war.dir}/${war.name}.war" webxml="${webroot.dir}/WEB-INF/web.xml">
<classes file="${src.dir}/applicationContext.xml" />
<classes file="${src.dir}/log4j.xml" />
<classes file="${cxcommons.springschemas.dir}/spring-beans-2.5.xsd" />
<classes file="${cxcommons.springschemas.dir}/spring-jax-ws-core.xsd" />
<classes file="${cxcommons.springschemas.dir}/spring-jax-ws-servlet.xsd" />
<fileset dir="${build.webroot.dir}">
<include name="**/*.*" />
<!-- Comment this in to remove GWT symbol maps (but be aware they dont take up much room when compressed) -->
<!-- <exclude name="WEB-INF/deploy/**"/> -->
</fileset>
</war>
<!-- Do not copy dependencies as this is an end-point app -->
<!--
<mkdir dir="${dist.war.dir}/dependencies"/>
<copy todir="${dist.war.dir}/dependencies">
<path>
<path refid="runtime.dependencies.classpath"/>
</path>
</copy>
-->
</target>
<!-- =================================
target: compile-gwt-module
desc: This task compiles akll the client-side code into javascript.
================================= -->
<target name="compile-gwt-module">
<!-- Add the module files code -->
<mkdir dir="${build.gwt.src.module.dir}" />
<copy todir="${build.gwt.src.module.dir}" overwrite="true">
<fileset dir="${module.src.dir}">
<include name="*.gwt.xml" />
</fileset>
</copy>
<!-- Copy the source to a new folder so we can add the product-specific code. Required because GWT compiler will only compile 1 source dir -->
<mkdir dir="${build.gwt.src.client.dir}" />
<copy todir="${build.gwt.src.client.dir}">
<fileset dir="${client.src.dir}">
<include name="**/*" />
</fileset>
</copy>
<!-- Add cxcommons code used by GWT clemnt -->
<copy todir="${build.gwt.src.client.dir}" overwrite="true">
<fileset dir="${cxcommons.src.dir}/uk/finsolint/cashexpress/cxui/gwt/client">
<include name="**/*" />
</fileset>
</copy>
<!-- Invoke the GWT compiler, outputting to the war/${gwt.module dir} (the same path as the .gwt.xml file) -->
<echo>Compiling client</echo>
<java classname="com.google.gwt.dev.Compiler" fork="true" failonerror="yes">
<arg value="-war" />
<arg value="${webroot.dir}" />
<arg value="-style" />
<arg value="PRETTY" />
<arg value="${gwt.module.package}.${gwt.module.name.raiffeisen}" />
<arg value="-gen" />
<arg value="${build.gwt.gen.dir}" />
<arg value="-workDir" />
<arg value="${build.gwt.work.dir}" />
<arg value="-localWorkers" />
<arg value="${gwt.local.workers}" />
<arg value="-extra" />
<arg value="${build.gwt.extra.dir}" />
<jvmarg value="-Xmx768m" />
<!-- Work-round for IBM-JVM bug - gives "NoClassDefFoundError: _j2se_j9=71168" if not included -->
<jvmarg value="-Dgwt.jjs.javaArgs=-Xmx512m" />
<classpath>
<path refid="gwt.client.classpath" />
<path refid="charts.classpath" />
<!-- Client source dir -->
<pathelement location="${build.gwt.src.dir}" />
</classpath>
</java>
<!--<move file="${webroot.dir}/${gwt.module.package}.${gwt.module.name.raiffeisen}" tofile="${webroot.dir}/${gwt.module.package}.CasheXpress"/>
<move file="${webroot.dir}/${gwt.module.package}.CasheXpress/${gwt.module.package}.${gwt.module.name.raiffeisen}.nocache.js" tofile="${webroot.dir}/${gwt.module.package}.CasheXpress/${gwt.module.package}.CasheXpress.nocache.js"/> -->
<!-- Delete copy post compilation, because we don't really want duplicate source code available in eclipse... -->
<delete dir="${build.gwt.src.dir}" />
</target>
<!-- Configure path to GWT SDK -->
<property name="gwt.sdk" location="C:\Users\Tim.Hill\AppData\Local\MyEclipse Blue Edition\Common\plugins\com.google.gwt.eclipse.sdkbundle_2.6.0\gwt-2.6.0" />
<path id="project.class.path">
<pathelement location="war/WEB-INF/classes" />
<pathelement location="${gwt.sdk}/gwt-user.jar" />
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar" />
<!-- Add any additional non-server libs (such as JUnit) -->
<fileset dir="WebRoot/WEB-INF/lib" includes="**/*.jar" />
</path>
<target name="codeserver" description="Run Code Server mode">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.codeserver.CodeServer">
<classpath>
<pathelement location="src" />
<path refid="project.class.path" />
<pathelement location="${gwt.sdk}/gwt-codeserver.jar" />
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA.jar" />
<pathelement location="${gwt.sdk}/validation-api-1.0.0.GA-sources.jar" />
<pathelement location="${charts.dir}/gwt-rcharts1.1.jar" />
<pathelement location="${charts.dir}/org.moxieapps.gwt.highcharts-1.6.0.jar" />
</classpath>
<jvmarg value="-Xmx1024M" />
<arg value="-bindAddress" />
<arg value="0.0.0.0" />
<arg line="-port" />
<arg value="9876" />
<arg value="-workDir" />
<arg value="C:\Users\Tim.Hill\tomcat-TRUNK\webapps\cxbalancereport\WEB-INF\deploy" />
<arg line="-src" />
<arg value="WebRoot/src" />
<arg value="uk.finsolint.cashexpress.cxraiffeisendataexport.gwt.RaiffeisenDataExport" />
</java>
</target>
</project>
<project name="cxraiffeisendataexport-deploy" default="deploywars" basedir=".">
<description>Deploys the previously-built CX application</description>
<!-- <property name="war.deploy.location" location="C:\finsolint\reference\tomcat\Tomcat 6.0\webapps"/> -->
<target name="deploy-check-set">
<!-- Check tomcat location is set -->
<condition property="deploy.set">
<isset property="war.deploy.location"/>
</condition>
</target>
<target name="deploy-not-set" depends="deploy-check-set" unless="deploy.set">
<fail message="You MUST set the war.deploy.location property (use Window->Preferences: Ant->Runtime: Properties tab)"/>
</target>
<target name="deploywars" depends="deploy-not-set" if="deploy.set">
<!-- Copy the wars to tomcat -->
<copy todir="${war.deploy.location}">
<fileset dir="dist">
<include name="*.war"/>
</fileset>
</copy>
</target>
</project>
Hi there,
Tim
-- I am attempting to use SDM for the development of an app that runs under Tomcat. I have had a read through http://geekbybit.blogspot.co.uk/2013/03/diy-working-with-gwt-codeserver-tomcat.html and have tried to adapt the instructions to fit with our setup here (for example, we launch tomcat via eclipse rather than on command line). All seems good until I try and compile, but then none of my changes are picked up. I have attached the build and deploy ant scripts as I am certain that these are both relevant and where the problem(s) lie (I have pretty much zero knowledge of Ant).
If anyone would be kind enough to have a look, it would be very much appreciated.
Cheers
Tim
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment