blob: 7a5043c3c1b534b0efed46a86d7315894e4018a1 [file] [log] [blame]
<?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.
-->
<!--
Notes: If you're running the main target, then there is no need to call clean first.
Each of the main targets for the modules will call clean themselves before proceeding.
-->
<project name="BlazeDS" default="main" basedir=".">
<property file="${basedir}/env.properties"/>
<property environment="env"/>
<!-- properties -->
<property file="${basedir}/build.properties" />
<property name="modules.core.dir" value="${basedir}/core"/>
<property name="download.dir" value="${basedir}/in"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="servlet.dir" value="${lib.dir}/javax/servlet/servlet-api/${servlet.version}"/>
<property name="activemq.dir" value="${lib.dir}/org/apache/activemq"/>
<property name="activemq.zip.file" value="${basedir}/in/apache-activemq-${activemq.version}-bin.zip"/>
<property name="codec.dir" value="${lib.dir}/commons-codec/commons-codec/${codec.version}"/>
<property name="codec.zip.file" value="${basedir}/in/apache-codec-${codec.version}-bin.zip"/>
<property name="collections.dir" value="${lib.dir}/commons-collections/commons-collections/${collections.version}"/>
<property name="collections.zip.file" value="${basedir}/in/apache-collections-${collections.version}-bin.zip"/>
<!-- needed?
<property name="fileupload.zip.file" value="${basedir}/in/apache-fileupload-1.1.zip"/>
-->
<property name="httpclient.dir" value="${lib.dir}/commons-httpclient/commons-httpclient/${httpclient.version}"/>
<property name="httpclient.zip.file" value="${basedir}/in/apache-httpclient-${httpclient.version}-bin.zip"/>
<property name="logging.dir" value="${lib.dir}/commons-logging/commons-logging/${logging.version}"/>
<property name="logging.zip.file" value="${basedir}/in/apache-logging-1.1.1-bin.zip"/>
<!--
<property name="hsqldb.zip.file" value="${basedir}/in/hsqldb_1_8_0_10.zip"/>
<property name="jms.zip.file" value="${basedir}/in/openjms-0.7.6.1.zip"/>
-->
<property name="jms.jar" value="geronimo-jms_1.1_spec-1.1.1.jar" />
<property name="jms.dir" value="${lib.dir}/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1"/>
<property name="log4j.dir" value="${lib.dir}/log4j/log4j/${log4j.version}"/>
<property name="log4j.zip.file" value="${basedir}/in/logging-log4j-${log4j.version}.zip"/>
<property name="spring.dir" value="${lib.dir}/org/springframework/spring-core/${spring-version}.RELEASE"/>
<property name="spring.zip.file" value="${basedir}/in/spring-framework-${spring.version}.RELEASE.zip"/>
<property name="springsecurity.zip.file" value="${basedir}/in/spring-security-3.0.3.RELEASE.zip"/>
<!--
<property name="springflex.jar.file" value="${basedir}/lib/spring/spring-flex-core-1.5.2.RELEASE.jar"/>
<property name="taglibs.zip.file" value="${basedir}/in/jakarta-taglibs-standard-1.1.2.zip"/>
<property name="aopalliance.zip.file" value="${basedir}/in/aopalliance.zip"/>
<property name="backport.zip.file" value="${basedir}/in/backport-util-concurrent.zip"/>
<property name="cglib.jar.file" value="${basedir}/lib/spring/cglib-nodep-2.1_3.jar"/>
<property name="jackson.jar.file" value="${basedir}/lib/spring/jackson-core-asl-1.0.0.jar"/>
<property name="axis.zip.file" value="${basedir}/in/axis.zip"/>
-->
<property name="xalan.dir" value="${lib.dir}/xalan/xalan/${xalan.version}.RELEASE"/>
<property name="xalan.zip.file" value="${basedir}/in/xalan-j_${xalan.version}-bin-2jars.zip"/>
<property name="catalina4.dir" value="${lib.dir}/tomcat/catalina/${catalina4.version}"/>
<property name="catalina4.zip.file" value="${basedir}/in/jakarta-tomcat-${catalina4.version}.zip"/>
<property name="catalina.dir" value="${lib.dir}/org/apache/tomcat/catalina/${catalina.version}"/>
<property name="catalina7.dir" value="${lib.dir}/org/apache/tomcat/tomcat-catalina/${catalina7.version}"/>
<property name="dist.dir" value="${basedir}/dist"/>
<property name="qa.dir" value="${basedir}/qa"/>
<!--if CruiseControl is used, label is set to SVN revision number-->
<property name="label" value="dev"/>
<property name="build.number" value="${label}"/>
<property name="subproject.target" value="main" />
<property name="server.baseurl" value="http://localhost:8400"/>
<property name="tmp.dir" value="${basedir}/packagetemp/temp" />
<property name="local.sdk.dir" value="resources/flex_sdk" />
<property name="env.FLEX_HOME" value="${basedir}/../flex-sdk"/>
<!-- set FLEX_HOME from environment if not already set -->
<property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
<property name="ANT_HOME" value="${env.ANT_HOME}"/>
<condition property="ocx.dir" value="${env.WINDIR}/system32/Macromed/Flash/" >
<isset property="env.WINDIR"/>
</condition>
<condition property="ocx.dir" value="${env.WinDir}/system32/Macromed/Flash/" >
<isset property="env.WinDir"/>
</condition>
<property name="ocx.dir" value="${env.windir}/system32/Macromed/Flash/" />
<condition property="isFlex3" value="true">
<equals arg1="${sdk.version}" arg2="3"/>
</condition>
<condition property="installer.exe" value="${fp9.installer.exe}">
<equals arg1="${sdk.version}" arg2="3"/>
</condition>
<property name="installer.exe" value="${fp11.installer.exe}"/>
<condition property="installer.plugin.exe" value="${fp9.installer.plugin.exe}">
<equals arg1="${sdk.version}" arg2="3"/>
</condition>
<property name="installer.plugin.exe" value="${fp11.installer.plugin.exe}"/>
<target name="check-env"
depends="check-flex-home, load-more-properties, check-playerglobal-home" />
<target name="check-flex-home" unless="flexhome.exists"
description="Check FLEX_HOME for both a directory and a file">
<echo message="FLEX_HOME is ${env.FLEX_HOME}"/>
<available file="${env.FLEX_HOME}"
type="dir"
property="FLEX_HOME.set"/>
<fail message="The environment variable FLEX_HOME is not set to a directory"
unless="FLEX_HOME.set"/>
<property name="flex-sdk-description.xml"
value="${env.FLEX_HOME}/flex-sdk-description.xml"/>
<available file="${flex-sdk-description.xml}"
type="file"
property="flex-sdk-description.xml.exists"/>
<fail message="The file ${flex-sdk-description.xml} does not exist"
unless="flex-sdk-description.xml"/>
</target>
<target name="load-more-properties"
description="load the FLEX_HOME/build.properties to pick up playerglobal.version">
<property file="${FLEX_HOME}/build.properties" />
</target>
<target name="check-playerglobal-home" unless="playerglobal.swc.exists"
description="Check PLAYERGLOBAL_HOME for both a directory and a swc file">
<echo message="PLAYERGLOBAL_HOME is ${env.PLAYERGLOBAL_HOME}"/>
<echo message="playerglobal.version is ${playerglobal.version}"/>
<available file="${env.PLAYERGLOBAL_HOME}"
type="dir"
property="PLAYERGLOBAL_HOME.set"/>
<fail message="The environment variable PLAYERGLOBAL_HOME is not set to a directory"
unless="PLAYERGLOBAL_HOME.set"/>
<property name="playerglobal.swc"
value="${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>
<available file="${playerglobal.swc}"
type="file"
property="playerglobal.swc.exists"/>
<fail message="The file ${playerglobal.swc} does not exist"
unless="playerglobal.swc.exists"/>
<echo message="playerglobal.swc is ${playerglobal.swc}"/>
</target>
<target name="thirdparty-downloads" unless="no.thirdparty-downloads" description="Downloads all the required thirdparty code.">
<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>
</target>
<target name="main" depends="check-env,clean,thirdparty-downloads,sdk,common,core,proxy,remoting,opt,createMMSFile" description="full build">
<tstamp>
<format property="build.datetime" pattern="MM/dd/yyyy hh:mm:ss aa" />
</tstamp>
<echo>ant main target completed on ${build.datetime}</echo>
</target>
<target name="help">
<echo message="run ant -projecthelp to see the available targets"/>
</target>
<!-- must be setup before building other targets -->
<target name="sdk" description="get the sdk and add to the server">
<!--<ant antfile="${basedir}/sdk/build.xml"/> AJH: needed? -->
</target>
<target name="common" description="full build of the common module">
<ant antfile="${basedir}/common/build.xml" target="${subproject.target}"/>
</target>
<target name="core" description="full build of the core module">
<ant antfile="${basedir}/core/build.xml" target="${subproject.target}"/>
</target>
<target name="proxy" description="full build of the proxy module">
<ant antfile="${basedir}/proxy/build.xml" target="${subproject.target}"/>
</target>
<target name="remoting" description="full build of the remoting module">
<ant antfile="${basedir}/remoting/build.xml" target="${subproject.target}"/>
</target>
<target name="opt" description="full build of the opt module">
<ant antfile="${basedir}/opt/build.xml" target="${subproject.target}"/>
</target>
<target name="postbuilds">
<ant antfile="${basedir}/modules/core/build.xml" target="postbuilds"/>
</target>
<target name="createMMSFile"
description="create mms.cfg in order to enable local shared object access"
if="isWindows">
<!-- Sets the default maximum local shared object storage size to unlimited -->
<echo file="${ocx.dir}/mms.cfg" append="false">LocalStorageLimit=6</echo>
</target>
<target name="package" depends="package-clean" description="package task which creates zips">
<mkdir dir="${dist.dir}"/>
<!-- package qa apps -->
<!-- <ant antfile="${qa.dir}/apps/qa-manual/build.xml" target="package"/> -->
<ant antfile="${qa.dir}/apps/qa-regress/build.xml" target="package"/>
<ant antfile="${basedir}/apps/samples/build.xml" target="package"/>
<ant antfile="${basedir}/apps/samples-spring/build.xml" target="package"/>
<ant antfile="${basedir}/apps/blazeds/build.xml" target="package"/>
<ant antfile="${basedir}/apps/blazeds-spring/build.xml" target="package"/>
<ant antfile="${basedir}/apps/ds-console/build.xml" target="package"/>
<ant antfile="${appserver.dir}/build.xml" target="package"/>
<antcall target="package-oem" />
<copy todir="${dist.dir}/lib">
<fileset dir="${basedir}/lib">
<include name="flex-messaging-common.jar"/>
<include name="flex-messaging-core.jar"/>
</fileset>
</copy>
<antcall target="javadoc" />
<!-- add apps to Tomcat -->
<unzip src="${dist.dir}/blazeds.war" dest="${dist.dir}/tomcat/webapps/blazeds" />
<unzip src="${dist.dir}/blazeds-spring.war" dest="${dist.dir}/tomcat/webapps/blazeds-spring" />
<unzip src="${dist.dir}/samples.war" dest="${dist.dir}/tomcat/webapps/samples" />
<unzip src="${dist.dir}/samples-spring.war" dest="${dist.dir}/tomcat/webapps/samples-spring" />
<unzip src="${dist.dir}/ds-console.war" dest="${dist.dir}/tomcat/webapps/ds-console" />
<!-- generate turnkey zip -->
<antcall target="package-turnkey"/>
<!-- generate binary zip -->
<zip destfile="${dist.dir}/blazeds-bin-${manifest.Implementation-Version}.${label}.zip"
comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">
<fileset dir="${dist.dir}" includes="blazeds.war"/>
<zipfileset dir="${basedir}/collateral" includes="blazeds-bin-readme.htm" fullpath="blazeds-bin-readme.htm"/>
</zip>
<!-- generate src zip -->
<antcall target="package-src"/>
<!-- generate java amf client zip -->
<zip destfile="${dist.dir}/blazeds-java-amf.${label}.zip"
comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">
<fileset dir="${dist.dir}/lib" includes="*"/>
</zip>
<!-- geneate md5 checksums for the four zips -->
<checksum forceOverwrite="yes" format="MD5SUM">
<fileset dir="${dist.dir}">
<include name="blazeds-*.zip" />
</fileset>
</checksum>
<antcall target="package-automation" />
</target>
<target name="package-turnkey">
<zip destfile="${dist.dir}/blazeds-turnkey-${manifest.Implementation-Version}.${label}.zip"
comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">
<fileset dir="${dist.dir}" includes="blazeds.war,blazeds-spring.war,samples.war,samples-spring.war,ds-console.war"/>
<zipfileset dir="${dist.dir}/tomcat" prefix="tomcat" excludes="bin,bin/*,work/"/>
<zipfileset dir="${dist.dir}/tomcat/bin" prefix="tomcat/bin" filemode="744"/>
<zipfileset dir="${dist.dir}/docs" prefix="docs"/>
<zipfileset dir="${basedir}/resources" prefix="resources">
<exclude name="fds-ajax-bridge/build.xml"/>
<exclude name="clustering/JGroups-2.9.0.GA.src.zip"/>
<exclude name="flex_sdk/*.zip"/>
<exclude name="flex_sdk/*.htm"/>
<exclude name="flex_sdk/readme.txt"/>
</zipfileset>
<zipfileset dir="${basedir}/lib" prefix="resources/clustering" includes="jgroups*"/>
<zipfileset dir="${basedir}/lib" prefix="resources/lib" includes="flex-messaging*"/>
<zipfileset dir="${basedir}/collateral" includes="blazeds-turnkey-readme.htm" fullpath="blazeds-turnkey-readme.htm"/>
<zipfileset dir="${dist.dir}/sampledb" prefix="sampledb" filemode="744"/>
</zip>
</target>
<target name="package-src">
<zip destfile="${dist.dir}/blazeds-src-${manifest.Implementation-Version}.${label}.zip"
comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">
<zipfileset dir="${basedir}/collateral" includes="blazeds-src-readme.htm" fullpath="blazeds-src-readme.htm"/>
<fileset dir="${basedir}">
<include name="adobe.header"/>
<include name="build.properties"/>
<include name="build.xml"/>
<include name="readme.txt"/>
<include name="collateral/**/*"/>
<include name="development/**/*"/>
<include name="sampledb/**/*"/>
</fileset>
<!-- apps folder -->
<zipfileset dir="${basedir}/apps" prefix="apps">
<!-- blazeds app -->
<include name="blazeds/**/*"/>
<exclude name="blazeds/WEB-INF/lib/"/>
<exclude name="blazeds/WEB-INF/src/"/>
<!-- blazeds-spring app -->
<include name="blazeds-spring/**/*"/>
<exclude name="blazeds-spring/WEB-INF/lib/"/>
<exclude name="blazeds-spring/WEB-INF/src/"/>
<!-- ds-console app -->
<include name="ds-console/**/*"/>
<exclude name="ds-console/history/"/>
<exclude name="ds-console/*.swf"/>
<exclude name="ds-console/*.html"/>
<exclude name="ds-console/*.js"/>
<exclude name="ds-console/WEB-INF/lib/"/>
<exclude name="ds-console/WEB-INF/classes/"/>
<!-- samples app -->
<include name="samples/images/"/>
<include name="samples/*.htm"/>
<include name="samples/main.css"/>
<include name="samples/README.txt"/>
<include name="samples/build.xml"/>
<include name="samples/WEB-INF/"/>
<exclude name="samples/WEB-INF/classes/"/>
<exclude name="samples/WEB-INF/lib/b*"/>
<exclude name="samples/WEB-INF/lib/c*"/>
<exclude name="samples/WEB-INF/lib/f*"/>
<exclude name="samples/WEB-INF/flex-src/*.zip"/>
<exclude name="samples/WEB-INF/flex-src/**/datavisualization*.swc"/>
<!-- samples-spring app -->
<include name="samples-spring/images/"/>
<include name="samples-spring/*.htm"/>
<include name="samples-spring/main.css"/>
<include name="samples-spring/README.txt"/>
<include name="samples-spring/build.xml"/>
<include name="samples-spring/WEB-INF/"/>
<exclude name="samples-spring/WEB-INF/classes/"/>
<exclude name="samples-spring/WEB-INF/lib/b*"/>
<exclude name="samples-spring/WEB-INF/lib/c*"/>
<exclude name="samples-spring/WEB-INF/lib/f*"/>
<exclude name="samples-spring/WEB-INF/flex-src/*.zip"/>
<exclude name="samples-spring/WEB-INF/flex-src/**/datavisualization*.swc"/>
<!-- team app -->
<include name="team/**/*"/>
<exclude name="team/WEB-INF/lib/"/>
<exclude name="team/WEB-INF/classes/"/>
<exclude name="team/WEB-INF/flex/jars/"/>
<exclude name="team/WEB-INF/flex/libs/"/>
<exclude name="team/WEB-INF/flex/locale/"/>
<exclude name="team/WEB-INF/flex/*.ser"/>
<exclude name="team/WEB-INF/flex/flash-unicode-table.xml"/>
<exclude name="team/WEB-INF/flex/flex-sdk-description.xml"/>
<exclude name="team/WEB-INF/flex/mxml-manifest.xml"/>
</zipfileset>
<!-- qa folder -->
<zipfileset dir="${basedir}/qa" prefix="qa">
<!-- qa-manual app -->
<include name="apps/qa-manual/**/*"/>
<exclude name="apps/qa-manual/bugs/"/>
<!-- common excludes for both qa-manual and qa-regress apps -->
<exclude name="apps/**/WEB-INF/classes/"/>
<exclude name="apps/**/WEB-INF/lib/"/>
<exclude name="apps/**/WEB-INF/flex/jars/"/>
<exclude name="apps/**/WEB-INF/flex/libs/"/>
<exclude name="apps/**/WEB-INF/flex/locale/"/>
<exclude name="apps/**/WEB-INF/flex/*.ser"/>
<exclude name="apps/**/WEB-INF/flex/flash-unicode-table.xml"/>
<exclude name="apps/**/WEB-INF/flex/flex-sdk-description.xml"/>
<exclude name="apps/**/WEB-INF/flex/mxml-manifest.xml"/>
<exclude name="apps/**/WEB-INF/flex/flex-config.xml"/>
<exclude name="apps/**/WEB-INF/flex/flex-webtier-config.xml"/>
<exclude name="apps/**/WEB-INF/flex/messaging-config.xml"/>
<exclude name="apps/**/WEB-INF/flex/proxy-config.xml"/>
<exclude name="apps/**/WEB-INF/flex/remoting-config.xml"/>
<exclude name="apps/**/WEB-INF/flex/services-config.xml"/>
<!-- qa-regress app -->
<include name="apps/qa-regress/**/*"/>
<exclude name="apps/qa-regress/features/"/>
<exclude name="apps/qa-regress/lib/"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/bugs/"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/noproxy/"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/array*"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/attributesScript.mxml"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/deserializeDocLitArray.mxml"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/twoDimensionalArrayScript.mxml"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/DotNetDocLiteralTests/"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceAmpersandInWSDL.mxml"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceDotDotInWSDL.mxml"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceMethod*.mxml"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceSetEndpointURI.mxml"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceUseProxyFalseFault.mxml"/>
<exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceUseProxyTrue.mxml"/>
<exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/Query*.*"/>
<exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/*DotNet*"/>
<exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound2CFCTest.as"/>
<exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound3Compound1.as"/>
<exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound3Compound1_WhiteMesaTest.as"/>
<include name="features/**/*"/>
<include name="lib/**/*"/>
<exclude name="lib/tools/"/>
<exclude name="lib/ms*.jar"/>
<exclude name="lib/commons-codec-1.3.jar"/>
<exclude name="lib/commons-httpclient-3.1.jar"/>
<exclude name="lib/commons-logging.jar"/>
<exclude name="lib/qa-config.jar"/>
<exclude name="lib/qa-flexunit.jar"/>
<exclude name="lib/qa-mxunit.jar"/>
<exclude name="lib/qa-utils.jar"/>
<exclude name="lib/browserServer.jar"/>
<exclude name="lib/xalan.jar"/>
<include name="resources/config/*"/>
<include name="resources/frameworks/*"/>
<include name="resources/webtier/"/>
<include name="src/**/*"/>
<include name="build.*"/>
</zipfileset>
<!-- frameworks folder -->
<zipfileset dir="${basedir}/frameworks" prefix="frameworks">
<include name="**/datavisualization*.swc"/>
<include name="local-swcs/*"/>
</zipfileset>
<!-- lib folder -->
<zipfileset dir="${basedir}/lib" prefix="lib">
<include name="hsqldb/*"/>
<include name="spring/*"/>
<include name="commons*.*"/>
<exclude name="commons-logging.jar"/>
<exclude name="commons-collections.jar"/>
<include name="j*.*"/>
<include name="flex-w*.*"/>
<include name="flex-b*.*"/>
<include name="xalan*.*"/>
<include name="backport*.*"/>
<include name="cfgatewayadapter.jar"/>
<include name="concurrent.jar"/>
<include name="oscache.jar"/>
<include name="servlet.jar"/>
</zipfileset>
<!-- modules folder -->
<zipfileset dir="${basedir}/modules" prefix="modules">
<include name="**/src/**/*"/>
<include name="**/lib/*"/>
<include name="core/test/src/**/*"/>
<include name="**/AdobeInfo.xml"/>
<include name="**/build.xml"/>
<exclude name="rds/"/>
</zipfileset>
<!-- servers folder -->
<zipfileset dir="${basedir}/servers" prefix="servers">
<exclude name="apache-tomcat-6.0.29/lib/blazeds/"/>
<exclude name="apache-tomcat-6.0.29/conf/Catalina/localhost/qa-perf.xml"/>
<exclude name="apache-tomcat-6.0.29/logs/"/>
<exclude name="apache-tomcat-6.0.29/work/"/>
</zipfileset>
<!-- resources folder -->
<zipfileset dir="${basedir}/resources" prefix="resources">
<exclude name="security/tomcat/*.jar"/>
<exclude name="flex_sdk/*.zip"/>
</zipfileset>
</zip>
</target>
<!--
***************************************************************************
Target - package-automation
*************************************************************************** -->
<target name="package-automation" description="Create QA Automation package">
<zip destfile="${basedir}/dist/qa-automation.zip">
<zipfileset dir="${qa.dir}/automation"/>
</zip>
</target>
<target name="package-oem" description="Create OEM package">
<delete dir="${basedir}/packagetemp" failonerror="false" includeEmptyDirs="true"/>
<mkdir dir="${basedir}/dist"/>
<!-- Copy sdk zip and other community resources -->
<copy todir="${basedir}/packagetemp">
<fileset dir="${basedir}">
<include name="resources/**/*"/>
<exclude name="resources/flex_sdk/**/*"/>
</fileset>
</copy>
<!-- Copy community jars -->
<copy todir="${basedir}/packagetemp/lib">
<fileset dir="${basedir}/lib">
<include name="flex-messaging-common.jar"/>
<include name="flex-messaging-core.jar"/>
<include name="flex-messaging-proxy.jar"/>
<include name="flex-messaging-remoting.jar"/>
<include name="flex-messaging-opt.jar"/>
<include name="flex-bootstrap.jar"/>
<include name="flex-bootstrap-jsp.jar"/>
<include name="flex-webtier.jar"/>
<include name="flex-webtier-jsp.jar"/>
<include name="oscache.jar"/>
<include name="cfgatewayadapter.jar"/>
<include name="flex-rds-server.jar"/>
</fileset>
</copy>
<copy todir="${basedir}/packagetemp/console_src">
<fileset dir="${basedir}/apps/ds-console">
<include name="console/**/*"/>
<include name="*.mxml"/>
</fileset>
</copy>
<zip destfile="${basedir}/dist/blazeds-oem.zip">
<fileset dir="${dist.dir}" includes="ds-console.war"/>
<zipfileset dir="${basedir}/packagetemp"/>
</zip>
</target>
<target name="package-oem-small" depends="package-oem" description="Create Small OEM package">
<echo message="Creating smaller Flex_SDK. . ."/>
<mkdir dir="${tmp.dir}"/>
<unzip src="${basedir}/dist/blazeds-oem.zip" dest="${tmp.dir}"/>
<mkdir dir="${tmp.dir}/${local.sdk.dir}/expanded"/>
<unzip src="${basedir}/packagetemp/${local.sdk.dir}/${sdk.zip.file}" dest="${tmp.dir}/${local.sdk.dir}/expanded">
<!--<patternset>
<include name="ant/lib/flexTasks.jar" />
<include name="asdoc/**/*"/>
<include name="bin/*"/>
<include name="lib/*"/>
<include name="frameworks/*"/>
<include name="frameworks/libs/**"/>
<include name="frameworks/locale/**"/>
<include name="runtimes/player/**/*"/>
<include name="templates/**/*"/>
</patternset>-->
</unzip>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${tmp.dir}/${local.sdk.dir}" includes="${sdk.zip.file}" />
</delete>
<zip destfile="${tmp.dir}/${local.sdk.dir}/${sdk.zip.file}">
<fileset dir="${tmp.dir}/${local.sdk.dir}/expanded" includes="**/**"/>
</zip>
<delete dir="${tmp.dir}/${local.sdk.dir}/expanded" failonerror="false" />
<zip destfile="${basedir}/dist/blazeds-oem-small.zip">
<fileset dir="${tmp.dir}" includes="**/**"/>
</zip>
<delete dir="${tmp.dir}" failonerror="false" />
</target>
<target name="package-clean">
<delete failonerror="false" includeEmptyDirs="true">
<fileset dir="${dist.dir}" includes="**/*"/>
</delete>
</target>
<target name="clean" description="clean">
<ant antfile="${basedir}/sdk/build.xml" target="clean"/>
<ant antfile="${basedir}/remoting/build.xml" target="clean"/>
<ant antfile="${basedir}/proxy/build.xml" target="clean"/>
<ant antfile="${basedir}/common/build.xml" target="clean"/>
<ant antfile="${basedir}/core/build.xml" target="clean"/>
<ant antfile="${basedir}/opt/build.xml" target="clean"/>
<delete>
<fileset dir="." includes="TEST-*.xml"/>
</delete>
</target>
<target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything including thirdparty downloads."/>
<target name="thirdparty-clean" unless="no.thirdparty-clean" description="Removes all thirdparty downloads.">
<ant antfile="${basedir}/downloads.xml" target="clean" dir="${basedir}"/>
</target>
<target name="generated-clean">
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${basedir}/apps" includes="**/generated/*" />
</delete>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${basedir}/apps" includes="**/generated" />
</delete>
</target>
<target name="unit" description="Runs JUnit tests">
<ant antfile="${basedir}/modules/core/build.xml" target="unit">
<property name="feature" value="${feature}" /> <!-- runs subset of unit tests -->
</ant>
</target>
<!-- Don't try to start server if it is already running -->
<target name="check.server">
<condition property="server.running">
<http url="${server.baseurl}"/>
</condition>
</target>
<target name="set.extension" description="set vars per os">
<osfamily property="os.family"/>
<switch value="${os.family}">
<case value="windows">
<property name="shellext" value="bat"/>
</case>
<case value="unix">
<property name="shellext" value="sh"/>
</case>
<case value="mac">
<property name="shellext" value="sh"/>
</case>
</switch>
</target>
<target name="startserver" description="Start Tomcat Server" depends="set.extension, check.server"
unless="server.running">
<exec spawn="true" executable="${appserver.dir}/bin/catalina.${shellext}"
dir="${appserver.dir}/bin">
<arg line="start" />
</exec>
</target>
<target name="stopserver" description="Stop Tomcat Server"
depends="set.extension">
<exec spawn="true" executable="${appserver.dir}/bin/catalina.${shellext}"
dir="${appserver.dir}/bin">
<arg line="stop" />
</exec>
</target>
<target name="waitforAppserverToStart" >
<echo message="Waiting for appserver to start: requesting ${server.baseurl}/qa-regress"/>
<waitfor maxwait="120" maxwaitunit="second" checkevery="15" timeoutproperty="bTimeout">
<http url="${server.baseurl}/qa-regress"/>
</waitfor>
<switch value="${bTimeout}">
<case value="true">
<property name="bAppServerStarted" value="false"/>
</case>
<default>
<property name="bAppServerStarted" value="true"/>
</default>
</switch>
<echo>Flex has started: ${bAppServerStarted} ...continuing</echo>
</target>
<target name="checkintests" description="checkintests">
<!-- run flexunit-->
<ant antfile="${qa.dir}/apps/qa-regress/testsuites/flexunit/build.xml" target="main" >
<property name="basedir" value="${qa.dir}" />
<property name="feature" value="checkintests" /> <!-- runs rpc and messaging -->
<property name="alwaysshowreport" value="false" /> <!-- will only show report if there are failures -->
</ant>
<!-- JUnit tests already start the server, if necessary
<antcall target="startserver"/>
-->
<!-- run java unit tests -->
<property name="feature" value="checkintests-all"/>
<antcall target="unit" >
<param name="feature" value="${feature}" /> <!-- runs subset of unit tests -->
</antcall>
<antcall target="stopserver"/>
</target>
<target name="parseresults">
<java classname="utils.TestResultsParser">
<classpath>
<pathelement location="${qa.dir}/classes"/>
<fileset dir="${qa.dir}/lib">
<include name="*.jar" />
</fileset>
</classpath>
<arg line="${qa.dir}/sdk/testsuites/mxunit/reports"/>
</java>
</target>
<target name="ocx" description="Update the ActiveX player to the latest. You must CLOSE YOUR BROWSERS for this to work.">
<property name="ant-contrib.jar" location="${env.ANT_HOME}/lib/ant-contrib-1.0b2.jar"/>
<available file="${basedir}/qa/automation/bin/${uninstaller.exe}" property="uninstaller.exists" />
<condition property="uninstall.fp" value="true">
<and>
<equals arg1="${uninstaller.exists}" arg2="true" />
<not>
<equals arg1="${skip.uninstall}" arg2="true" />
</not>
</and>
</condition>
<antcall target="actual.uninstall.fp" />
<echo>Installing the new player.</echo>
<exec dir="${basedir}/bin" executable="${basedir}/bin/${installer.exe}">
<arg line="-install"/>
</exec>
<echo>Installing the plugin player.</echo>
<exec dir="${basedir}/bin" executable="${basedir}/bin/${installer.plugin.exe}">
<arg line="-install"/>
</exec>
</target>
<target name="actual.uninstall.fp" depends="check.uninstall.fp" if="uninstall.fp">
<echo>Uninstalling the old ActiveX and Plugin players.</echo>
<exec dir="${basedir}" executable="${basedir}/qa/automation/bin/${uninstaller.exe}" >
<arg line="-uninstall" />
</exec>
</target>
<target name="check.uninstall.fp" unless="uninstall.fp" >
<echo>Uninstall was skipped.</echo>
<echo> - skip.uninstall? ${skip.uninstall}</echo>
</target>
<target name="javadoc">
<delete dir="${basedir}/docs" failonerror="false" includeEmptyDirs="true" />
<ant antfile="${basedir}/modules/core/build.xml" target="javadoc" >
<property name="build.number" value="${build.number}"/>
</ant>
<copy todir="${dist.dir}/docs" >
<fileset dir="${basedir}/docs" includes="javadoc.zip"/>
</copy>
</target>
</project>