<?xml version="1.0"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | |
limitations under the License. | |
--> | |
<!-- | |
To use the fds-ajax-bridge, run this build file | |
ant main: Cleans and builds the fds-ajax bridge on team application | |
ant qa: Builds the fds-ajax bridge on qa-manual application | |
--> | |
<project name="fds-ajax-bridge" default="main" basedir="../../"> | |
<property name="blazeds.dir" location="${basedir}"/> | |
<property name="dist.dir" location="${blazeds.dir}/dist" /> | |
<property name="frameworks.dir" location="${blazeds.dir}/frameworks"/> | |
<property name="bridge.dir" value="${blazeds.dir}/resources/fds-ajax-bridge"/> | |
<!-- properties to do a test compile of the swf --> | |
<property name="app.war" location="${blazeds.dir}/apps/team" /> | |
<property name="config.file" value="${app.war}/WEB-INF/flex/services-config.xml"/> | |
<property name="qa.app.war" location="${blazeds.dir}/qa/apps/qa-manual" /> | |
<property name="qa.config.file" value="${qa.app.war}/WEB-INF/flex/services-config.xml"/> | |
<!--override the value of class path if the build is being instrumented for code coverage --> | |
<condition property="classpath.lib.folder" value="../../lib"> | |
<istrue value="${build.is.instrumented}"/> | |
</condition> | |
<property name="classpath.lib.folder" value="${blazeds.dir}/lib" /> | |
<path id="classpath"> | |
<fileset dir="${app.war}/WEB-INF/flex/jars" includes="*.jar"/> | |
<fileset dir="${classpath.lib.folder}" includes="clover.jar"/> | |
</path> | |
<target name="main" depends="clean,dev" description="Cleans and builds the fds-ajax bridge on dev application"/> | |
<target name="clean" > | |
<delete quiet="true" includeEmptyDirs="true"> | |
<fileset dir="${bridge.dir}" includes="FDMSBridge.swf"/> | |
</delete> | |
</target> | |
<target name="dev" description="Builds the fds-ajax bridge on dev application"> | |
<echo message="Compiling FDMSBridge.swf"/> | |
<java classname="flex2.tools.Compiler" dir="${frameworks.dir}" fork="true" failonerror="true" classpathref="classpath"> | |
<jvmarg line="-ea -DAS3 -DAVMPLUS -Xms32m -Xmx384m -Dsun.io.useCanonCaches=false "/> | |
<arg line="--verbose-stacktraces --source-path=${frameworks.dir} -o=${bridge.dir}/FDMSBridge.swf ${bridge.dir}/actionscript/FDMSBridge.as"/> | |
</java> | |
<echo message="Copying FABridge and FDMSBridge files"/> | |
<copy file="${bridge.dir}/javascript/FDMSLib.js" todir="${app.war}/features/ajax/includes/js" overwrite="true"/> | |
<copy file="${bridge.dir}/javascript/FABridge.js" todir="${app.war}/features/ajax/includes/js" overwrite="true"/> | |
<copy file="${bridge.dir}/FDMSBridge.swf" todir="${app.war}/features/ajax/includes/swf" overwrite="true"/> | |
</target> | |
<target name="qa" description="Builds the fds-ajax bridge on qa-manual application"> | |
<echo message="Compiling FDMSBridge.swf"/> | |
<java classname="flex2.tools.Compiler" dir="${frameworks.dir}" fork="true" failonerror="true"> | |
<classpath> | |
<fileset dir="${qa.app.war}/WEB-INF/flex/jars" includes="*.jar"/> | |
</classpath> | |
<jvmarg line="-ea -DAS3 -DAVMPLUS -Xms32m -Xmx384m -Dsun.io.useCanonCaches=false "/> | |
<arg line="--verbose-stacktraces --source-path ${frameworks.dir} --services=${qa.config.file} ${bridge.dir}/actionscript/FDMSBridge.as -context-root=qa-manual -o ${bridge.dir}/FDMSBridge.swf"/> | |
</java> | |
<echo message="Copying FABridge and FDMSBridge files"/> | |
<copy file="${bridge.dir}/javascript/FDMSLib.js" todir="${qa.app.war}/ajax/includes/js" overwrite="true"/> | |
<copy file="${bridge.dir}/javascript/FABridge.js" todir="${qa.app.war}/ajax/includes/js" overwrite="true"/> | |
<copy file="${bridge.dir}/FDMSBridge.swf" todir="${qa.app.war}/ajax/includes/swf" overwrite="true"/> | |
</target> | |
</project> |