You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2013/12/24 07:48:40 UTC

[1/8] git commit: [flex-utilities] [refs/heads/develop] - new data format for ant_on_air installs

Updated Branches:
  refs/heads/develop b5b21e76b -> e4f33bbca


new data format for ant_on_air installs


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/dd196d13
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/dd196d13
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/dd196d13

Branch: refs/heads/develop
Commit: dd196d1303264a46aee3a1a10b3fe6dcbf0b9b85
Parents: b5b21e7
Author: Alex Harui <ah...@apache.org>
Authored: Thu Dec 19 15:35:04 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Dec 19 15:35:04 2013 -0800

----------------------------------------------------------------------
 .../src/installer/sdk-installer-config-4.0.xml  | 258 +++++++++++++++++++
 1 file changed, 258 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/dd196d13/installer/src/installer/sdk-installer-config-4.0.xml
----------------------------------------------------------------------
diff --git a/installer/src/installer/sdk-installer-config-4.0.xml b/installer/src/installer/sdk-installer-config-4.0.xml
new file mode 100644
index 0000000..c1bf644
--- /dev/null
+++ b/installer/src/installer/sdk-installer-config-4.0.xml
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+
+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.
+
+-->
+
+<!-- NOTE: this file format looks like this so it can be parsed by Ant's xmlproperty task.
+           The basic rule is that there can be no repeat tags as in:
+            <sometag>
+               <oneormoreofthistag />
+               <oneormoreofthistag />
+            </sometag>
+-->
+<config>
+	<version>
+		<latest>2.7.0</latest>
+	</version>
+    <!-- SDK Installer Application binary distribution
+     Notes:
+     - use full URL when binaries are NOT released yet, else use
+     path relative to mirror
+     - if path is relative, don't use starting slash -->
+    <installer name="SDKInstallerApp" path="flex/installer/2.6/binaries/" file="apache-flex-sdk-installer-2.6.0-bin" />
+    <!-- Mirror URL CGI -->
+    <mirror name="MirrorURLCGI" path="" file="single-mirror-url.cgi"/>
+	<products>
+        <!-- Apache Flex binary distribution
+         Notes:
+         - path is relative to mirror URL; don't use starting slash
+         - use http based url if you want to use an absolute url instead of mirror
+         - remove the extension from the file name -->
+        <ApacheFlexSDK name="Apache Flex SDK">
+            <versions>
+                <version4.9.1 id="4.9.1" path="http://archive.apache.org/dist/flex/4.9.1/binaries/" file="apache-flex-sdk-4.9.1-bin" />
+                <version4.10.0 id="4.10.0" path="http://archive.apache.org/dist/flex/4.10.0/binaries/" file="apache-flex-sdk-4.10.0-bin" />
+                <version4.11.0 id="4.11.0" path="http://archive.apache.org/dist/flex/4.11.0/binaries/" file="apache-flex-sdk-4.11.0-bin" />
+                <Nightly id="Nightly" path="https://builds.apache.org/job/flex-sdk_release/lastSuccessfulBuild/artifact/out/" file="apache-flex-sdk-4.11.0-bin" />
+            </versions>
+        </ApacheFlexSDK>
+        <ApacheFlexJS name="Apache FlexJS" >
+            <versions>
+                <Nightly id="FlexJSNightly" path="https://builds.apache.org/job/flex-asjs_release/lastSuccessfulBuild/artifact/out/" file="apache-flex-flexjs-0.0.1-bin" />
+            </versions>
+        </ApacheFlexJS>
+    </products>
+    <airsdk>
+        <linux>
+            <versions default="2.6">
+                <version2.6>
+                    <path id="air.sdk.path.linux.2.6">http://airdownload.adobe.com/air/lin/download/2.6/</path>
+                    <file id="air.sdk.file.linux.2.6">AdobeAIRSDK.tbz2</file>
+                </version2.6>
+            </versions>
+        </linux>
+        <windows>
+            <versions default="3.9">
+                <version2.6>
+                    <path id="air.sdk.path.windows.2.6">http://airdownload.adobe.com/air/win/download/2.6/</path>
+                    <file id="air.sdk.file.windows.2.6">AdobeAIRSDK.zip</file>
+                </version2.6>
+                <version2.7>
+                    <path id="air.sdk.path.windows.2.7">http://airdownload.adobe.com/air/win/download/2.7/</path>
+                    <file id="air.sdk.file.windows.2.7">AdobeAIRSDK.zip</file>
+                </version2.7>
+                <version3.0>
+                    <path id="air.sdk.path.windows.3.0">http://airdownload.adobe.com/air/win/download/3.0/</path>
+                    <file id="air.sdk.file.windows.3.0">AdobeAIRSDK.zip</file>
+                </version3.0>
+                <version3.1 label="tested">
+                    <path id="air.sdk.path.windows.3.1">http://airdownload.adobe.com/air/win/download/3.1/</path>
+                    <file id="air.sdk.file.windows.3.1">AdobeAIRSDK.zip</file>
+                </version3.1>
+                <version3.2>
+                    <path id="air.sdk.path.windows.3.2">http://airdownload.adobe.com/air/win/download/3.2/</path>
+                    <file id="air.sdk.file.windows.3.2">AdobeAIRSDK.zip</file>
+                </version3.2>
+                <version3.3>
+                    <path id="air.sdk.path.windows.3.3">http://airdownload.adobe.com/air/win/download/3.3/</path>
+                    <file id="air.sdk.file.windows.3.3">AdobeAIRSDK.zip</file>
+                </version3.3>
+                <version3.4 label="tested">
+                    <path id="air.sdk.path.windows.3.4">http://airdownload.adobe.com/air/win/download/3.4/</path>
+                    <file id="air.sdk.file.windows.3.4">AdobeAIRSDK.zip</file>
+                </version3.4>
+                <version3.5>
+                    <path id="air.sdk.path.windows.3.5">http://airdownload.adobe.com/air/win/download/3.5/</path>
+                    <file id="air.sdk.file.windows.3.5">AdobeAIRSDK.zip</file>
+                </version3.5>
+                <version3.6>
+                    <path id="air.sdk.path.windows.3.6">http://airdownload.adobe.com/air/win/download/3.6/</path>
+                    <file id="air.sdk.file.windows.3.6">AdobeAIRSDK.zip</file>
+                </version3.6>
+                <version3.7 label="tested">
+                    <path id="air.sdk.path.windows.3.7">http://airdownload.adobe.com/air/win/download/3.7/</path>
+                    <file id="air.sdk.file.windows.3.7">AdobeAIRSDK.zip</file>
+                </version3.7>
+                <version3.8 label="tested">
+                    <path id="air.sdk.path.windows.3.8">http://airdownload.adobe.com/air/win/download/3.8/</path>
+                    <file id="air.sdk.file.windows.3.8">AdobeAIRSDK.zip</file>
+                </version3.8>
+                <version3.9>
+                    <path id="air.sdk.path.windows.3.9">http://airdownload.adobe.com/air/win/download/3.9/</path>
+                    <file id="air.sdk.file.windows.3.9">AdobeAIRSDK.zip</file>
+                </version3.9>
+            </versions>
+        </windows>
+        <mac>
+            <versions default="3.9">
+                <version2.6>
+                    <path id="air.sdk.path.mac.2.6">http://airdownload.adobe.com/air/mac/download/2.6/</path>
+                    <file id="air.sdk.file.mac.2.6">AdobeAIRSDK.tbz2</file>
+                </version2.6>
+                <version2.7>
+                    <path id="air.sdk.path.mac.2.7">http://airdownload.adobe.com/air/mac/download/2.7/</path>
+                    <file id="air.sdk.file.mac.2.7">AdobeAIRSDK.tbz2</file>
+                </version2.7>
+                <version3.0>
+                    <path id="air.sdk.path.mac.3.0">http://airdownload.adobe.com/air/mac/download/3.0/</path>
+                    <file id="air.sdk.file.mac.3.0">AdobeAIRSDK.tbz2</file>
+                </version3.0>
+                <version3.1 label="tested">
+                    <path id="air.sdk.path.mac.3.1">http://airdownload.adobe.com/air/mac/download/3.1/</path>
+                    <file id="air.sdk.file.mac.3.1">AdobeAIRSDK.tbz2</file>
+                </version3.1>
+                <version3.2>
+                    <path id="air.sdk.path.mac.3.2">http://airdownload.adobe.com/air/mac/download/3.2/</path>
+                    <file id="air.sdk.file.mac.3.2">AdobeAIRSDK.tbz2</file>
+                </version3.2>
+                <version3.3>
+                    <path id="air.sdk.path.mac.3.3">http://airdownload.adobe.com/air/mac/download/3.3/</path>
+                    <file id="air.sdk.file.mac.3.3">AdobeAIRSDK.tbz2</file>
+                </version3.3>
+                <version3.4 label="tested">
+                    <path id="air.sdk.path.mac.3.4">http://airdownload.adobe.com/air/mac/download/3.4/</path>
+                    <file id="air.sdk.file.mac.3.4">AdobeAIRSDK.tbz2</file>
+                </version3.4>
+                <version3.5>
+                    <path id="air.sdk.path.mac.3.5">http://airdownload.adobe.com/air/mac/download/3.5/</path>
+                    <file id="air.sdk.file.mac.3.5">AdobeAIRSDK.tbz2</file>
+                </version3.5>
+                <version3.6>
+                    <path id="air.sdk.path.mac.3.6">http://airdownload.adobe.com/air/mac/download/3.6/</path>
+                    <file id="air.sdk.file.mac.3.6">AdobeAIRSDK.tbz2</file>
+                </version3.6>
+                <version3.7 label="tested">
+                    <path id="air.sdk.path.mac.3.7">http://airdownload.adobe.com/air/mac/download/3.7/</path>
+                    <file id="air.sdk.file.mac.3.7">AdobeAIRSDK.tbz2</file>
+                </version3.7>
+                <version3.8 label="tested">
+                    <path id="air.sdk.path.mac.3.8">http://airdownload.adobe.com/air/mac/download/3.8/</path>
+                    <file id="air.sdk.file.mac.3.8">AdobeAIRSDK.tbz2</file>
+                </version3.8>
+                <version3.9>
+                    <path id="air.sdk.path.mac.3.9">http://airdownload.adobe.com/air/mac/download/3.9/</path>
+                    <file id="air.sdk.file.mac.3.9">AdobeAIRSDK.tbz2</file>
+                </version3.9>
+            </versions>
+        </mac>
+    </airsdk>
+    <flashsdk>
+        <versions default="11.9">
+            <version10.2>
+                <path id="flash.sdk.path.10.2">http://download.macromedia.com/get/flashplayer/installers/archive/playerglobal/</path>
+                <file id="flash.sdk.file.10.2">playerglobal10_2.swc</file>
+                <swfversion id="flash.sdk.swfversion.10.2">11</swfversion>
+            </version10.2>
+            <version10.3>
+                <path id="flash.sdk.path.10.3">http://download.macromedia.com/get/flashplayer/installers/archive/playerglobal/</path>
+                <file id="flash.sdk.file.10.3">playerglobal10_3.swc</file>
+                <swfversion id="flash.sdk.swfversion.10.3">12</swfversion>
+            </version10.3>
+            <version11.0>
+                <path id="flash.sdk.path.11.0">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.0">playerglobal11_0.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.0">13</swfversion>
+            </version11.0>
+            <version11.1 label="tested">
+                <path id="flash.sdk.path.11.1">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.1">playerglobal11_1.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.1">14</swfversion>
+            </version11.1>
+            <version11.2>
+                <path id="flash.sdk.path.11.2">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.2">playerglobal11_2.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.2">15</swfversion>
+            </version11.2>
+            <version11.3>
+                <path id="flash.sdk.path.11.3">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.3">playerglobal11_3.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.3">16</swfversion>
+            </version11.3>
+            <version11.4 label="tested">
+                <path id="flash.sdk.path.11.4">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.4">playerglobal11_4.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.4">17</swfversion>
+            </version11.4>
+            <version11.5>
+                <path id="flash.sdk.path.11.5">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.5">playerglobal11_5.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.5">18</swfversion>
+            </version11.5>
+            <version11.6>
+                <path id="flash.sdk.path.11.6">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.6">playerglobal11_6.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.6">19</swfversion>
+            </version11.6>
+            <version11.7 label="tested">
+                <path id="flash.sdk.path.11.7">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.7">playerglobal11_7.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.7">20</swfversion>
+            </version11.7>
+            <version11.8 label="tested">
+                <path id="flash.sdk.path.11.8">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.8">playerglobal11_8.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.8">21</swfversion>
+            </version11.8>
+            <version11.9>
+                <path id="flash.sdk.path.11.9">http://download.macromedia.com/get/flashplayer/updaters/11/</path>
+                <file id="flash.sdk.file.11.9">playerglobal11_9.swc</file>
+                <swfversion id="flash.sdk.swfversion.11.9">22</swfversion>
+            </version11.9>
+        </versions>
+    </flashsdk>
+
+    <swfobject path="http://swfobject.googlecode.com/files/" file="swfobject_2_2.zip"/>
+
+    <BlazeDS path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="flex-messaging-common.jar"/>
+
+    <!-- FontSWF -->
+    <fontswf>
+        <afe path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="afe.jar"/>
+        <aglj40 path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="aglj40.jar"/>
+        <flex-fontkit path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="flex-fontkit.jar"/>
+        <rideau path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/lib/" file="rideau.jar"/>
+    </fontswf>
+    
+    <!-- For OSMF, we are including the file name along with the url.  This is to support the weird url format for OSMF2.0 which forces us to do the same -->
+    <!-- OSMF 1.x -->
+    <OSMF_SWC path="http://opensource.adobe.com/svn/opensource/flex/sdk/branches/4.y/frameworks/libs/" file="osmf.swc"/>
+    <!-- OSMF 2.0 -->
+    <OSMF_SWC_2.0 path="osmf.adobe/OSMF%202.0%20Release%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20release%20notes%29/" file="OSMF.swc"/>
+
+</config>


[4/8] git commit: [flex-utilities] [refs/heads/develop] - Add new steps needed by FlexJS and Falcon install

Posted by ah...@apache.org.
Add new steps needed by FlexJS and Falcon install


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/448c5154
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/448c5154
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/448c5154

Branch: refs/heads/develop
Commit: 448c515430fb04f1a67c7c7f742cef942ef94dcc
Parents: b1a7077
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 23 17:38:58 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 23 17:38:58 2013 -0800

----------------------------------------------------------------------
 ant_on_air/src/AntClasses.as                    |   4 +
 ant_on_air/src/org/apache/flex/ant/tags/And.as  |  57 ++++++++
 .../src/org/apache/flex/ant/tags/AntCall.as     |  78 +++++++++++
 .../src/org/apache/flex/ant/tags/AntTask.as     | 116 ++++++++++++++++
 ant_on_air/src/org/apache/flex/ant/tags/Arg.as  |  45 +++++++
 ant_on_air/src/org/apache/flex/ant/tags/Exec.as | 135 +++++++++++++++++++
 .../src/org/apache/flex/ant/tags/GlobMapper.as  |  50 +++++++
 .../src/org/apache/flex/ant/tags/Matches.as     |  59 ++++++++
 .../src/org/apache/flex/ant/tags/Param.as       |  50 +++++++
 .../src/org/apache/flex/ant/tags/PatternSet.as  |  95 +++++++++++++
 .../org/apache/flex/ant/tags/ReplaceFilter.as   |  50 +++++++
 .../src/org/apache/flex/ant/tags/Touch.as       |  59 ++++++++
 12 files changed, 798 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/AntClasses.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/AntClasses.as b/ant_on_air/src/AntClasses.as
index 91abdf1..d781e69 100644
--- a/ant_on_air/src/AntClasses.as
+++ b/ant_on_air/src/AntClasses.as
@@ -34,6 +34,7 @@ package
             import org.apache.flex.ant.tags.Delete; Delete;
             import org.apache.flex.ant.tags.Echo; Echo;
             import org.apache.flex.ant.tags.Equals; Equals;
+			import org.apache.flex.ant.tags.Exec; Exec;
             import org.apache.flex.ant.tags.Fail; Fail;
             import org.apache.flex.ant.tags.FileSet; FileSet;
             import org.apache.flex.ant.tags.FileSetExclude; FileSetExclude;
@@ -42,12 +43,15 @@ package
             import org.apache.flex.ant.tags.Input; Input;
             import org.apache.flex.ant.tags.IsSet; IsSet;
             import org.apache.flex.ant.tags.LoadProperties; LoadProperties;
+			import org.apache.flex.ant.tags.Matches; Matches;
             import org.apache.flex.ant.tags.Mkdir; Mkdir;
             import org.apache.flex.ant.tags.Not; Not;
             import org.apache.flex.ant.tags.OS; OS;
+			import org.apache.flex.ant.tags.Param; Param;
             import org.apache.flex.ant.tags.Property; Property;
             import org.apache.flex.ant.tags.PropertyFile; PropertyFile;
             import org.apache.flex.ant.tags.Replace; Replace;
+			import org.apache.flex.ant.tags.Touch; Touch;
             import org.apache.flex.ant.tags.Untar; Untar;
             import org.apache.flex.ant.tags.Unzip; Unzip;
             import org.apache.flex.ant.tags.XmlProperty; XmlProperty;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/And.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/And.as b/ant_on_air/src/org/apache/flex/ant/tags/And.as
new file mode 100644
index 0000000..eb824da
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/And.as
@@ -0,0 +1,57 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.IValueTagHandler;
+    import org.apache.flex.ant.tags.supportClasses.ParentTagHandler;
+    
+    [Mixin]
+    public class And extends ParentTagHandler implements IValueTagHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["and"] = And;
+        }
+
+        public function And()
+        {
+            super();
+        }
+        
+        public function getValue(context:Object):Object
+        {
+            ant.processChildren(xml, this);
+            if (numChildren > 0)
+            {
+                var value:IValueTagHandler = getChildAt(0) as IValueTagHandler;
+                // get the value from the children
+                var val:Object = IValueTagHandler(value).getValue(context);
+                if (!(val == "true" || val == true))
+                {
+                    return false;
+                }
+				return true;
+            }
+            return false;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/AntCall.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/AntCall.as b/ant_on_air/src/org/apache/flex/ant/tags/AntCall.as
new file mode 100644
index 0000000..b107ddd
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/AntCall.as
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import flash.events.Event;
+    
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.TaskHandler;
+    
+    [Mixin]
+    public class AntCall extends TaskHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["antcall"] = AntCall;
+        }
+
+        public function AntCall()
+        {
+            super();
+        }
+        
+        private function get target():String
+		{
+			return getAttributeValue("@target");
+		}
+        
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
+        {
+			super.execute(callbackMode, context);
+			
+			// I think properties set in the sub-script to not affect the main script
+			// so clone the properties here
+			var subContext:Object = {};
+			for (var p:String in context)
+				subContext[p] = context[p];
+
+			if (numChildren > 0)
+			{
+				for (var i:int = 0; i < numChildren; i++)
+				{
+					var param:Param = getChildAt(i) as Param;
+					subContext[param.name] = param.value;
+				}
+			}
+			var t:Target = ant.project.getTarget(target);
+			if (!t.execute(callbackMode, subContext))
+			{
+				t.addEventListener(Event.COMPLETE, completeHandler);
+				return false;
+			}
+            return true;
+        }
+		
+		private function completeHandler(event:Event):void
+		{
+			dispatchEvent(event);
+		}
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/AntTask.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/AntTask.as b/ant_on_air/src/org/apache/flex/ant/tags/AntTask.as
new file mode 100644
index 0000000..8815051
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/AntTask.as
@@ -0,0 +1,116 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import flash.events.Event;
+    import flash.events.KeyboardEvent;
+    import flash.events.ProgressEvent;
+    import flash.filesystem.File;
+    
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.TaskHandler;
+    
+    [Mixin]
+    public class AntTask extends TaskHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["ant"] = AntTask;
+        }
+
+        public function AntTask()
+        {
+            super();
+        }
+        
+        private function get file():String
+		{
+			return getAttributeValue("@antfile");
+		}
+		
+        private function get dir():String
+		{
+			return getAttributeValue("@dir");
+		}
+		
+        private function get target():String
+		{
+			return getAttributeValue("@target");
+		}
+                
+		private var subant:Ant;
+		
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
+        {
+            super.execute(callbackMode, context);
+	
+			// I think properties set in the sub-script to not affect the main script
+			// so clone the properties here
+			var subContext:Object = {};
+			for (var p:String in context)
+				subContext[p] = context[p];
+			if (subContext.hasOwnProperty("targets"))
+				delete subContext["targets"];
+			if (target)
+				subContext["targets"] = target;
+			
+			subant = new Ant();
+			subant.parentAnt = ant;
+			subant.output = ant.output;
+			var file:File = File.applicationDirectory;
+			file = file.resolvePath(dir + File.separator + this.file);
+			if (!subant.processXMLFile(file, subContext, true))
+			{
+				subant.addEventListener("statusChanged", statusHandler);
+				subant.addEventListener(Event.COMPLETE, completeHandler);
+				subant.addEventListener(ProgressEvent.PROGRESS, progressEventHandler);
+				// redispatch keyboard events off of ant so input task can see them
+				ant.addEventListener(KeyboardEvent.KEY_DOWN, ant_keyDownHandler);
+				return false;
+			}
+			else
+				completeHandler(null);
+            return true;
+        }
+		
+		private function completeHandler(event:Event):void
+		{
+			dispatchEvent(event);
+		}
+		
+		private function statusHandler(event:Event):void
+		{
+			ant.project.status = subant.project.status;
+			dispatchEvent(new Event(Event.COMPLETE));
+		}
+		
+		private function progressEventHandler(event:ProgressEvent):void
+		{
+			ant.dispatchEvent(event);
+		}
+		
+		private function ant_keyDownHandler(event:KeyboardEvent):void
+		{
+			subant.dispatchEvent(event);
+		}
+		
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/Arg.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Arg.as b/ant_on_air/src/org/apache/flex/ant/tags/Arg.as
new file mode 100644
index 0000000..47abb6f
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Arg.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.TagHandler;
+    
+    [Mixin]
+    public class Arg extends TagHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["arg"] = Arg;
+        }
+
+        public function Arg()
+        {
+            super();
+        }
+        
+        public function get value():String
+		{
+			return getAttributeValue("@value");
+		}
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Exec.as b/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
new file mode 100644
index 0000000..e10e728
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Exec.as
@@ -0,0 +1,135 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import flash.desktop.NativeProcess;
+    import flash.desktop.NativeProcessStartupInfo;
+    import flash.events.Event;
+    import flash.events.NativeProcessExitEvent;
+    import flash.events.ProgressEvent;
+    import flash.filesystem.File;
+    import flash.filesystem.FileMode;
+    import flash.filesystem.FileStream;
+    import flash.system.Capabilities;
+    import flash.utils.IDataInput;
+    
+    import mx.core.IFlexModuleFactory;
+    import mx.utils.StringUtil;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.TaskHandler;
+    
+    [Mixin]
+    public class Exec extends TaskHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["exec"] = Exec;
+        }
+
+        public function Exec()
+        {
+        }
+        
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
+        {
+			super.execute(callbackMode, context);
+			
+			var thisOS:String = Capabilities.os.toLowerCase();
+			var osArr:Array = osFamily.split(",");
+			var ok:Boolean = false;
+			for each (var p:String in osArr)
+			{
+				if (thisOS.indexOf(p.toLowerCase()) != -1)
+				{
+					ok = true;
+					break;
+				}
+			}
+			if (!ok) return true;
+			
+			var file:File = File.applicationDirectory;
+			if (Capabilities.os.toLowerCase().indexOf('win') == -1)
+				file = new File("/bin/bash");
+			else
+				file = file.resolvePath("C:\\Windows\\System32\\cmd.exe");
+			var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
+			nativeProcessStartupInfo.executable = file;
+			var args:Vector.<String> = new Vector.<String>();
+			if (Capabilities.os.toLowerCase().indexOf('win') == -1)
+				args.push("-c");
+			else
+				args.push("/c");
+			if (numChildren > 0)
+			{
+				var arg:Arg = getChildAt(0) as Arg;
+				args.push(fileName + " " + arg.value);
+			}
+			else
+				args.push(fileName);
+			nativeProcessStartupInfo.arguments = args;
+			process = new NativeProcess();
+			process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData); 
+			process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onOutputErrorData); 
+			process.start(nativeProcessStartupInfo);
+			process.addEventListener(NativeProcessExitEvent.EXIT, exitHandler);
+
+			return false;
+        }
+        
+        private function get fileName():String
+		{
+			return getAttributeValue("@executable");
+		}
+		
+        private function get osFamily():String
+		{
+			return getAttributeValue("@osfamily");
+		}
+		
+        private function get outputProperty():String
+		{
+			return getAttributeValue("@outputproperty");
+		}
+        
+        private var process:NativeProcess;
+        
+        private function exitHandler(event:NativeProcessExitEvent):void
+        {
+            dispatchEvent(new Event(Event.COMPLETE));
+        }
+
+        private function onOutputErrorData(event:ProgressEvent):void 
+        { 
+            var stdError:IDataInput = process.standardError; 
+            var data:String = stdError.readUTFBytes(process.standardError.bytesAvailable); 
+            trace("Got Error Output: ", data); 
+        }
+        
+        private function onOutputData(event:ProgressEvent):void 
+        { 
+            var stdOut:IDataInput = process.standardOutput; 
+            var data:String = stdOut.readUTFBytes(process.standardOutput.bytesAvailable); 
+            trace("Got: ", data);
+			if (outputProperty)
+				context[outputProperty] = data;
+        }
+
+    } 
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/GlobMapper.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/GlobMapper.as b/ant_on_air/src/org/apache/flex/ant/tags/GlobMapper.as
new file mode 100644
index 0000000..dfedeb8
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/GlobMapper.as
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.TagHandler;
+    
+    [Mixin]
+    public class GlobMapper extends TagHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["globmapper"] = GlobMapper;
+        }
+
+        public function GlobMapper()
+        {
+            super();
+        }
+        
+        public function get from():String
+		{
+			return getAttributeValue("@from");
+		}
+		
+        public function get to():String
+		{
+			return getAttributeValue("@to");
+		}
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/Matches.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Matches.as b/ant_on_air/src/org/apache/flex/ant/tags/Matches.as
new file mode 100644
index 0000000..2d32984
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Matches.as
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.IValueTagHandler;
+    import org.apache.flex.ant.tags.supportClasses.TagHandler;
+    
+    [Mixin]
+    public class Matches extends TagHandler implements IValueTagHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["matches"] = Matches;
+        }
+
+        public function Matches()
+        {
+            super();
+        }
+        
+        private function get string():String
+		{
+			return getAttributeValue("@string");
+		}
+			
+        private function get pattern():String
+		{
+			return getAttributeValue("@pattern");
+		}
+        
+        public function getValue(context:Object):Object
+        {
+			this.context = context;
+			var regex:RegExp = new RegExp(pattern);
+			var results:Array = string.match(regex);
+			return results && results.length > 0;
+        }
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/Param.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Param.as b/ant_on_air/src/org/apache/flex/ant/tags/Param.as
new file mode 100644
index 0000000..6e68c98
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Param.as
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.TagHandler;
+    
+    [Mixin]
+    public class Param extends TagHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["param"] = Param;
+        }
+
+        public function Param()
+        {
+            super();
+        }
+        
+        public function get name():String
+		{
+			return getAttributeValue("@name");
+		}
+		
+        public function get value():String
+		{
+			return getAttributeValue("@value");
+		}
+        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/PatternSet.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/PatternSet.as b/ant_on_air/src/org/apache/flex/ant/tags/PatternSet.as
new file mode 100644
index 0000000..ea66e65
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/PatternSet.as
@@ -0,0 +1,95 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.filesetClasses.SelectorUtils;
+    import org.apache.flex.ant.tags.filesetClasses.exceptions.BuildException;
+    import org.apache.flex.ant.tags.supportClasses.NamedTagHandler;
+    import org.apache.flex.ant.tags.supportClasses.ParentTagHandler;
+    
+    [Mixin]
+    public class PatternSet extends ParentTagHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["patternset"] = PatternSet;
+        }
+
+        public function PatternSet()
+        {
+            super();
+        }
+             
+		private var includes:Vector.<String>;
+		private var excludes:Vector.<String>;
+		
+		private var processedChildren:Boolean;
+		
+        public function matches(path:String):Boolean
+        {
+			if (!processedChildren)
+			{
+	            ant.processChildren(xml, this);
+				processedChildren = true;
+			}
+			
+			if (numChildren == 0)
+				return true;
+			
+			if (includes == null)
+			{
+	            var n:int = numChildren;
+	            var includes:Vector.<String> = new Vector.<String>();
+	            var excludes:Vector.<String> = new Vector.<String>();
+	            for (var i:int = 0; i < n; i++)
+	            {
+	                var tag:NamedTagHandler = getChildAt(i) as NamedTagHandler;
+	                if (tag is FileSetInclude)
+	                    includes.push(tag.name);
+	                else if (tag is FileSetExclude)
+	                    excludes.push(tag.name);
+	                else
+	                    throw new BuildException("Unsupported Tag at index " + i);
+	            }
+			}
+			var result:Boolean = false;
+			for each (var inc:String in includes)
+			{
+				if (SelectorUtils.match(inc, path))
+				{
+					result = true;
+					break;
+				}
+			}
+			for each (var exc:String in excludes)
+			{
+				if (SelectorUtils.match(exc, path))
+				{
+					result = false;
+					break;
+				}
+			}
+            return result;
+        }
+                
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/ReplaceFilter.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/ReplaceFilter.as b/ant_on_air/src/org/apache/flex/ant/tags/ReplaceFilter.as
new file mode 100644
index 0000000..e4f69d1
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/ReplaceFilter.as
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.TagHandler;
+    
+    [Mixin]
+    public class ReplaceFilter extends TagHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["replacefilter"] = ReplaceFilter;
+        }
+
+        public function ReplaceFilter()
+        {
+            super();
+        }
+        
+        public function get token():String
+		{
+			return getAttributeValue("@token");
+		}
+		
+        public function get value():String
+		{
+			return getAttributeValue("@value");
+		}
+                        
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/448c5154/ant_on_air/src/org/apache/flex/ant/tags/Touch.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Touch.as b/ant_on_air/src/org/apache/flex/ant/tags/Touch.as
new file mode 100644
index 0000000..e898cc3
--- /dev/null
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Touch.as
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.ant.tags
+{
+    import flash.filesystem.File;
+    import flash.filesystem.FileMode;
+    import flash.filesystem.FileStream;
+    
+    import mx.core.IFlexModuleFactory;
+    
+    import org.apache.flex.ant.Ant;
+    import org.apache.flex.ant.tags.supportClasses.TaskHandler;
+    
+    [Mixin]
+    public class Touch extends TaskHandler
+    {
+        public static function init(mf:IFlexModuleFactory):void
+        {
+            Ant.antTagProcessors["touch"] = Touch;
+        }
+
+        public function Touch()
+        {
+        }
+        
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
+        {
+            super.execute(callbackMode, context);
+			
+            var f:File = new File(fileName);
+            var fs:FileStream = new FileStream();
+            fs.open(f, FileMode.APPEND);
+            fs.close();
+            return true;
+        }
+        
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}        
+
+    } 
+}
\ No newline at end of file


[5/8] git commit: [flex-utilities] [refs/heads/develop] - fix bugs in fileset classes

Posted by ah...@apache.org.
fix bugs in fileset classes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/62d688c0
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/62d688c0
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/62d688c0

Branch: refs/heads/develop
Commit: 62d688c037e9d388bd954c5afa230dfa6066fdff
Parents: 448c515
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 23 17:40:28 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 23 17:40:28 2013 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as     | 2 +-
 .../src/org/apache/flex/ant/tags/filesetClasses/SelectorUtils.as | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/62d688c0/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as
index 0c1d9e2..ea3166b 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as
@@ -301,7 +301,7 @@ package org.apache.flex.ant.tags.filesetClasses
                 
                 var next:int = colon + 1;
                 root = path.substring(0, next);
-                var ca:Vector.<String> = Vector.<String>(path.split());
+                var ca:Vector.<String> = Vector.<String>(path.split(""));
                 root += sep;
                 //remove the initial separator; the root has it.
                 next = (ca[next] == sep) ? next + 1 : next;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/62d688c0/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/SelectorUtils.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/SelectorUtils.as b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/SelectorUtils.as
index b1d3056..de28992 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/SelectorUtils.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/SelectorUtils.as
@@ -304,8 +304,8 @@ package org.apache.flex.ant.tags.filesetClasses
         public static function match(pattern:String, str:String,
             caseSensitive:Boolean = true):Boolean 
         {
-                var patArr:Vector.<String> = Vector.<String>(pattern.split());
-                var strArr:Vector.<String> = Vector.<String>(str.split());
+                var patArr:Vector.<String> = Vector.<String>(pattern.split(""));
+                var strArr:Vector.<String> = Vector.<String>(str.split(""));
                 var patIdxStart:int = 0;
                 var patIdxEnd:int = patArr.length - 1;
                 var strIdxStart:int = 0;


[6/8] git commit: [flex-utilities] [refs/heads/develop] - refactor the way tags pick up their attributes

Posted by ah...@apache.org.
refactor the way tags pick up their attributes


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/56973c6d
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/56973c6d
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/56973c6d

Branch: refs/heads/develop
Commit: 56973c6d661466fb0ef94afaf5f2edea490fd650
Parents: 62d688c
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 23 17:40:45 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 23 17:40:45 2013 -0800

----------------------------------------------------------------------
 ant_on_air/src/org/apache/flex/ant/Ant.as       | 16 +++-
 .../src/org/apache/flex/ant/tags/Available.as   | 56 +++++++-------
 .../src/org/apache/flex/ant/tags/Checksum.as    | 51 +++++++------
 .../src/org/apache/flex/ant/tags/Condition.as   | 30 ++++----
 ant_on_air/src/org/apache/flex/ant/tags/Copy.as | 79 +++++++++++++++-----
 .../src/org/apache/flex/ant/tags/Delete.as      | 21 +++---
 ant_on_air/src/org/apache/flex/ant/tags/Echo.as | 39 +++++++---
 .../src/org/apache/flex/ant/tags/Entry.as       | 21 +++---
 .../src/org/apache/flex/ant/tags/Equals.as      | 40 +++++-----
 ant_on_air/src/org/apache/flex/ant/tags/Fail.as | 19 +++--
 .../src/org/apache/flex/ant/tags/FileSet.as     | 18 ++---
 ant_on_air/src/org/apache/flex/ant/tags/Get.as  | 30 ++++----
 .../src/org/apache/flex/ant/tags/Input.as       | 38 +++++-----
 .../src/org/apache/flex/ant/tags/IsSet.as       | 20 ++---
 .../org/apache/flex/ant/tags/LoadProperties.as  | 24 +-----
 .../src/org/apache/flex/ant/tags/Mkdir.as       | 11 +--
 ant_on_air/src/org/apache/flex/ant/tags/Not.as  |  2 +-
 ant_on_air/src/org/apache/flex/ant/tags/OS.as   | 19 ++---
 .../src/org/apache/flex/ant/tags/Project.as     | 21 +-----
 .../src/org/apache/flex/ant/tags/Property.as    | 41 +++++-----
 .../org/apache/flex/ant/tags/PropertyFile.as    | 25 +------
 .../src/org/apache/flex/ant/tags/Replace.as     | 57 +++++++++-----
 .../src/org/apache/flex/ant/tags/Target.as      | 42 +++++------
 .../src/org/apache/flex/ant/tags/Untar.as       | 33 ++++----
 .../src/org/apache/flex/ant/tags/Unzip.as       | 51 +++++++++----
 .../src/org/apache/flex/ant/tags/XmlProperty.as | 27 +++----
 .../tags/supportClasses/FileSetTaskHandler.as   |  7 +-
 .../ant/tags/supportClasses/NamedTagHandler.as  |  9 ---
 .../flex/ant/tags/supportClasses/TagHandler.as  | 35 ++++-----
 .../flex/ant/tags/supportClasses/TaskHandler.as | 14 ++--
 30 files changed, 457 insertions(+), 439 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/Ant.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/Ant.as b/ant_on_air/src/org/apache/flex/ant/Ant.as
index e3727f2..2dbfc8e 100644
--- a/ant_on_air/src/org/apache/flex/ant/Ant.as
+++ b/ant_on_air/src/org/apache/flex/ant/Ant.as
@@ -80,11 +80,24 @@ package org.apache.flex.ant
             return true;
         }
     
+		private var _functionToCall:Function;
+		
         /**
          *  Set by various classes to defer processing in callbackMode
          */
-        public var functionToCall:Function;
+        public function set functionToCall(value:Function):void
+		{
+			if (parentAnt)
+				parentAnt.functionToCall = value;
+			else
+				_functionToCall = value;
+		}
         
+		public function get functionToCall():Function
+		{
+			return _functionToCall;
+		}
+		
         /**
          *  If you set callbackMode = true, you must call this method until you receive
          *  the Event.COMPLETE 
@@ -105,6 +118,7 @@ package org.apache.flex.ant
         public var progressClass:Object;
         
         private var context:Object;
+		public var parentAnt:Ant;
         public var ant:Ant;
         public var project:Project;
 		

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Available.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Available.as b/ant_on_air/src/org/apache/flex/ant/tags/Available.as
index 219aa64..d7638c6 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Available.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Available.as
@@ -39,22 +39,37 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _file:String;
-        private var _type:String;
-        private var _property:String;
-        private var _value:String;
+        private function get file():String
+		{
+			return getNullOrAttributeValue("@file");
+		}
+		
+        private function get type():String
+		{
+			return getNullOrAttributeValue("@type");
+		}
+		
+        private function get property():String
+		{
+			return getNullOrAttributeValue("@property");
+		}
+		
+        private function get value():String
+		{
+			return getNullOrAttributeValue("@value");
+		}
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
-
-            if (_file == null) return false;
+			this.context = context;
+			
+            if (this.file == null) return false;
             
-            var file:File = new File(_file);
+            var file:File = new File(this.file);
             if (!file.exists)
                 return false;
             
-            if (_type == "dir" && !file.isDirectory)
+            if (type == "dir" && !file.isDirectory)
                 return false;
             
             return true;
@@ -63,23 +78,14 @@ package org.apache.flex.ant.tags
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);
-            var value:Object = getValue(context);
-                if (!context.hasOwnProperty(_property))
-                    context[_property] = _value != null ? _value : true;
+            var avail:Object = getValue(context);
+			if (avail)
+			{
+	            if (!context.hasOwnProperty(property))
+	                context[property] = value != null ? value : true;
+			}			
             return true;
         }
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                _file = value;
-            else if (name == "type")
-                _type = value;
-            if (name == "property")
-                _property = value;
-            if (name == "value")
-                _value = value;
-        }
-        
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as b/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
index 5e19157..b2f3737 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
@@ -45,28 +45,33 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var file:String;
-        private var toDir:String;
-        private var fileExt:String = ".md5";
-        private var verifyproperty:String;
-        private var readbuffersize:int = 8192;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                file = value;
-            else if (name == "todir")
-                toDir = value;
-            else if (name == "fileext")
-                fileExt = value;
-            else if (name == "verifyproperty")
-                verifyproperty = value;
-            else if (name == "readbuffersize")
-                verifyproperty = value;
-            else
-                super.processAttribute(name, value);
-        }
-        
+        private function get file():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get toDir():String
+		{
+			return getAttributeValue("@todir");
+		}
+		
+        private function get fileExt():String
+		{
+			var val:String = getNullOrAttributeValue("@fileext");
+			return val == null ? ".md5" : val;
+		}
+		
+        private function get verifyproperty():String
+		{
+			return getAttributeValue("@verifyproperty");
+		}
+		
+        private function get readbuffersize():int
+		{
+			var val:String = getNullOrAttributeValue("@readbuffersize");
+			return val == null ? 8192 : int(val);
+		}
+                
         private var md5:MD5Stream;
         private var fs:FileStream;
         
@@ -74,7 +79,7 @@ package org.apache.flex.ant.tags
         {
             super.execute(callbackMode, context);
          
-            var f:File = File.applicationDirectory.resolvePath(file);
+            var f:File = File.applicationDirectory.resolvePath(this.file);
             fs = new FileStream();
             fs.open(f, FileMode.READ);
             md5 = new MD5Stream();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Condition.as b/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
index ce565d1..9fe9063 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
@@ -23,7 +23,6 @@ package org.apache.flex.ant.tags
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.IValueTagHandler;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
 
@@ -44,15 +43,15 @@ package org.apache.flex.ant.tags
             super.execute(callbackMode, context);
             
             // if the property is not already set
-            if (_property && _value != null && !context.hasOwnProperty(_property))
+            if (property && !context.hasOwnProperty(property))
             {
                 var val:Object = computedValue;
                 if (val == "true" || val == true)
                 {
                     // set it if we should
-                    if (_value != null)
-                        val = _value;
-                    context[_property] = val;
+                    if (value != null)
+                        val = value;
+                    context[property] = val;
                 }            
             }
             return true;
@@ -65,16 +64,15 @@ package org.apache.flex.ant.tags
             return val;
         }
         
-        private var _property:String;
-        private var _value:Object;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "property")
-                _property = value;
-            else if (name == "value")
-                _value = value;
-        }
-        
+        private function get property():String
+		{
+			return getNullOrAttributeValue("@property");
+		}
+		
+        private function get value():Object
+		{
+			return getNullOrAttributeValue("@value");
+		}
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as b/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
index 8742bd3..32f66c4 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
@@ -24,6 +24,7 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.FileSetTaskHandler;
+    import org.apache.flex.xml.ITagHandler;
     
     [Mixin]
     public class Copy extends FileSetTaskHandler
@@ -38,27 +39,62 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var fileName:String;
-        private var toFileName:String;
-        private var toDirName:String;
-        private var overwrite:Boolean;
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get toFileName():String
+		{
+			return getAttributeValue("@toFile");
+		}
+		
+        private function get toDirName():String
+		{
+			return getAttributeValue("@toDir");
+		}
+		
+        private function get overwrite():Boolean
+		{
+			return getAttributeValue("@overwrite") == "true";
+		}
+		
+		private var mapper:GlobMapper;
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                fileName = value;
-            else if (name == "toFile")
-                toFileName = value;
-            else if (name == "toDir")
-                toDirName = value;
-            else if (name == "overwrite")
-                overwrite = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
-
+		private function mapFileName(name:String):String
+		{
+			var from:String = mapper.from;
+			if (from.indexOf(".*") == -1)
+				from = from.replace("*", ".*");
+			var regex:RegExp = new RegExp(from);
+			var results:Array = name.match(regex);
+			if (results && results.length == 1)
+			{
+				name = mapper.to.replace("*", results[0]);
+				return name;
+			}
+			return null;
+		}
+		
+		private var searchedForMapper:Boolean;
+		
         override protected function actOnFile(dir:String, fileName:String):void
         {
+			if (!searchedForMapper)
+			{
+				// look for a mapper
+				for (var i:int = 0; i < numChildren; i++)
+				{
+					var child:ITagHandler = getChildAt(i);
+					if (child is GlobMapper)
+					{
+						mapper = child as GlobMapper;
+						break;
+					}
+				}
+				searchedForMapper = true;
+			}
+
             var srcName:String;
             if (dir)
                 srcName = dir + File.separator + fileName;
@@ -66,6 +102,13 @@ package org.apache.flex.ant.tags
                 srcName = fileName;
             var srcFile:File = File.applicationDirectory.resolvePath(srcName);
             
+			if (mapper)
+			{
+				fileName = mapFileName(fileName);
+				if (fileName == null)
+					return;
+			}
+			
             var destName:String;
             if (toDirName)
                 destName = toDirName + File.separator + fileName;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as b/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
index 77aba9d..cae5795 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
@@ -38,19 +38,16 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var fileName:String;
-        private var dirName:String;
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get dirName():String
+		{
+			return getAttributeValue("@dir");
+		}
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                fileName = value;
-            else if (name == "dir")
-                dirName = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override protected function actOnFile(dir:String, fileName:String):void
         {
             var srcName:String;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as b/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
index fbcfa7f..349671c 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
@@ -18,6 +18,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.ant.tags
 {
+    import flash.filesystem.File;
+    import flash.filesystem.FileMode;
+    import flash.filesystem.FileStream;
+    
     import mx.core.IFlexModuleFactory;
     
     import org.apache.flex.ant.Ant;
@@ -37,25 +41,38 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var text:String;
+		private var _text:String;
+		
+        private function get text():String
+		{
+			if (_text != null)
+				return _text;
+			
+			return getAttributeValue("@text");
+		}
+		private function get fileName():String
+		{
+			return getNullOrAttributeValue("@file");
+		}
         
         public function setText(text:String):void
         {
-            this.text = text;    
+            _text = text;    
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "message")
-                text = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);
-            ant.output(ant.getValue(text, context));
+			if (fileName != null)
+			{
+				var f:File = new File(fileName);
+				var fs:FileStream = new FileStream();
+				fs.open(f, FileMode.WRITE);
+				fs.writeUTFBytes(ant.getValue(text, context));
+				fs.close();
+			}
+			else
+	            ant.output(ant.getValue(text, context));
             return true;
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Entry.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Entry.as b/ant_on_air/src/org/apache/flex/ant/tags/Entry.as
index 6435df6..7f56457 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Entry.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Entry.as
@@ -36,16 +36,15 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        public var key:String;
-        public var value:String;
-                
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "key")
-                key = value;
-            else if (name == value)
-                this.value = value;
-        }
-        
+        public function get key():String
+		{
+			return getAttributeValue("@key");
+		}
+		
+        public function get value():String
+		{
+			return getNullOrAttributeValue("@value");
+		}
+                        
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Equals.as b/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
index 6c4923c..2ff7dc1 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
@@ -38,15 +38,29 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var arg1:String;
-        private var arg2:String;
-        private var casesensitive:Boolean;
-        private var trim:Boolean;
+        private function get arg1():String
+		{
+			return getAttributeValue("@arg1");
+		}
+		
+        private function get arg2():String
+		{
+			return getAttributeValue("@arg2");
+		}
+		
+        private function get casesensitive():Boolean
+		{
+			return getAttributeValue("@casesensitive") == "true";
+		}
+		
+        private function get trim():Boolean
+		{
+			return getAttributeValue("@trim") == "true";
+		}
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
-
+			this.context = context;
 			var val1:String = arg1;
             var val2:String = arg2;
             if (casesensitive)
@@ -61,18 +75,6 @@ package org.apache.flex.ant.tags
             }
             return val1 == val2;
         }
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "arg1")
-                arg1 = value;
-            else if (name == "arg2")
-                arg2 = value;
-            else if (name == "casesensitive")
-                casesensitive = value == "true";
-            else if (name == "trim")
-                trim = value == "true";
-        }
-        
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Fail.as b/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
index 7f6cab4..319365a 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
@@ -36,21 +36,20 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var text:String;
+        private var _text:String;
+		private function get text():String
+		{
+			if (_text != null)
+				return _text;
+			
+			return getAttributeValue("@message");
+		}
         
         public function setText(text:String):void
         {
-            this.text = text;    
+            _text = text;    
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "message")
-                text = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as b/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
index 4b3d597..e169d7c 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
@@ -40,11 +40,9 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _dir:String;
-        
         public function get dir():String
         {
-            return _dir;
+            return getNullOrAttributeValue("@dir");
         }
         
         private var _value:Vector.<String>;
@@ -52,8 +50,8 @@ package org.apache.flex.ant.tags
         public function getValue(context:Object):Object
         {
             if (_value) return _value;
-            
-			processAttributes(xml.attributes(), context);
+            this.context = context;
+			
             ant.processChildren(xml, this);
             var ds:DirectoryScanner = new DirectoryScanner();
             var n:int = numChildren;
@@ -71,18 +69,12 @@ package org.apache.flex.ant.tags
             }
             ds.setIncludes(includes);
             ds.setExcludes(excludes);
-            if (_dir != null)
-                ds.setBasedir(_dir);
+            if (dir != null)
+                ds.setBasedir(dir);
             ds.scan();
             _value = ds.getIncludedFiles();
             return _value;
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "dir")
-                _dir = value;
-        }
-        
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Get.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Get.as b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
index 6512071..80ad7c3 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Get.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
@@ -34,7 +34,6 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.ITagHandler;
     
     [Mixin]
     public class Get extends TaskHandler
@@ -49,21 +48,20 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var src:String;
-        private var dest:String;
-        private var skipexisting:Boolean;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "src")
-                src = value;
-            else if (name == "dest")
-                dest = value;
-            else if (name == "skipexisting")
-                skipexisting = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
+        private function get src():String
+		{
+			return getAttributeValue("@src");
+		}
+		
+        private function get dest():String
+		{
+			return getAttributeValue("@dest");
+		}
+		
+        private function get skipexisting():Boolean
+		{
+			return getAttributeValue("@skipexisting") == "true";
+		}
         
         private var urlLoader:URLLoader;
         

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Input.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Input.as b/ant_on_air/src/org/apache/flex/ant/tags/Input.as
index 2567e43..3d90ba6 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Input.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Input.as
@@ -40,25 +40,27 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var text:String;
-        private var validArgs:Array;
-        private var property:String;
-        private var defaultValue:String;
+        private function get text():String
+		{
+			return getAttributeValue("@message");
+		}
+		
+        private function get validArgs():Array
+		{
+			var val:String = getNullOrAttributeValue("@validargs");
+			return val == null ? null : val.split(",");
+		}
+		
+        private function get property():String
+		{
+			return getAttributeValue("@addproperty");
+		}
+		
+        private function get defaultValue():String
+		{
+			return getAttributeValue("@defaultvalue");
+		}
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "message")
-                text = value;
-            else if (name == "validargs")
-                validArgs = value.split("");
-            else if (name == "addproperty")
-                property = value;
-            else if (name == "defaultvalue")
-                defaultValue = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as b/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
index 8b88e97..7fb0199 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
@@ -37,22 +37,18 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _property:String;
+        private function get property():String
+		{
+			return getNullOrAttributeValue("@property");
+		}
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
-
-			if (_property == null) return false;
+			this.context = context;
+			if (property == null) return false;
             
-            return context.hasOwnProperty(_property);
+            return context.hasOwnProperty(property);
         }
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "property")
-                _property = value;
-        }
-        
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as b/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
index ef68bd0..70ec113 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
@@ -18,23 +18,15 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.ant.tags
 {
-    import flash.desktop.NativeProcess;
-    import flash.desktop.NativeProcessStartupInfo;
-    import flash.events.Event;
-    import flash.events.NativeProcessExitEvent;
-    import flash.events.ProgressEvent;
     import flash.filesystem.File;
     import flash.filesystem.FileMode;
     import flash.filesystem.FileStream;
-    import flash.system.Capabilities;
-    import flash.utils.IDataInput;
     
     import mx.core.IFlexModuleFactory;
     import mx.utils.StringUtil;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class LoadProperties extends TaskHandler
@@ -80,18 +72,10 @@ package org.apache.flex.ant.tags
             return true;
         }
         
-        private var fileName:String;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "srcFile")
-            {
-                fileName = value;
-            }
-            else
-                super.processAttribute(name, value);
-        }
-        
+        private function get fileName():String
+		{
+			return getAttributeValue("@srcFile");
+		}        
 
     } 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as b/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
index c1c92d8..1ff1c09 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
@@ -38,7 +38,10 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _dir:String;
+        private function get _dir():String
+		{
+			return getAttributeValue("@dir");
+		}
         
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
@@ -50,11 +53,5 @@ package org.apache.flex.ant.tags
             return true;
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "dir")
-                _dir = value;
-       }
-        
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Not.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Not.as b/ant_on_air/src/org/apache/flex/ant/tags/Not.as
index 0aa38b0..f4273d3 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Not.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Not.as
@@ -39,7 +39,7 @@ package org.apache.flex.ant.tags
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
+			this.context = context;
             ant.processChildren(xml, this);
             if (numChildren == 1)
             {

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/OS.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/OS.as b/ant_on_air/src/org/apache/flex/ant/tags/OS.as
index a4e8ba2..5074573 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/OS.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/OS.as
@@ -39,22 +39,19 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var _family:String;
+        private function get family():String
+		{
+			return getNullOrAttributeValue("@family");
+		}
         
         public function getValue(context:Object):Object
         {
-			processAttributes(xml.attributes(), context);
+			this.context = context;
 			
-            if (_family == null) return false;
+            if (family == null) return false;
             
-            return Capabilities.os.toLowerCase().indexOf(_family.toLowerCase()) != -1;
+            return Capabilities.os.toLowerCase().indexOf(family.toLowerCase()) != -1;
         }
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "family")
-                _family = value;
-        }
-        
+                
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Project.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Project.as b/ant_on_air/src/org/apache/flex/ant/tags/Project.as
index 29e0392..f7a9903 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Project.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Project.as
@@ -27,7 +27,6 @@ package org.apache.flex.ant.tags
     import org.apache.flex.ant.tags.filesetClasses.Reference;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
     import org.apache.flex.xml.ITagHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class Project extends TaskHandler
@@ -72,32 +71,18 @@ package org.apache.flex.ant.tags
 			}
 		}
                 
-        private var _basedir:String;
-        
         public function get basedir():String
         {
-            return _basedir;
+            return getAttributeValue("@basedir");
         }
         
-        private var _defaultTarget:String;
-        
         public function get defaultTarget():String
         {
-            return _defaultTarget;
+            return getAttributeValue("@default");
         }
         
         private var targets:Array;
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "basedir")
-                _basedir = value;
-            else if (name == "default")
-                _defaultTarget = value;
-            else
-                super.processAttribute(name, value);
-        }
-
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
 			super.execute(callbackMode, context);
@@ -109,7 +94,7 @@ package org.apache.flex.ant.tags
             status = true;
             
             if (context.targets == null)
-                context.targets == _defaultTarget;
+                context.targets = defaultTarget;
             
             targets = context.targets.split(",");
             

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Property.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Property.as b/ant_on_air/src/org/apache/flex/ant/tags/Property.as
index adfa9c4..9e77fd8 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Property.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Property.as
@@ -89,41 +89,34 @@ package org.apache.flex.ant.tags
             return true;
         }
         
-        private var fileName:String;
-        private var value:String;
-        private var envPrefix:String;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-            {
-                fileName = value;
-            }
-            else if (name == "value")
-            {
-                this.value = value;
-            }
-            else if (name == "environment")
-            {
-                envPrefix = value;
-            }
-            else
-                super.processAttribute(name, value);
-        }
-        
+        private function get fileName():String
+		{
+			return getNullOrAttributeValue("@file");
+		}
+		
+        private function get value():String
+		{
+			return getAttributeValue("@value");
+		}
+		
+        private function get envPrefix():String
+		{
+			return getNullOrAttributeValue("@environment");
+		}
+                
         private var process:NativeProcess;
         
         public function requestEnvironmentVariables():void
         {
             var file:File = File.applicationDirectory;
-            if (Capabilities.os.indexOf('Mac OS') > -1)
+            if (Capabilities.os.toLowerCase().indexOf('win') == -1)
                 file = new File("/bin/bash");
             else
                 file = file.resolvePath("C:\\Windows\\System32\\cmd.exe");
             var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
             nativeProcessStartupInfo.executable = file;
             var args:Vector.<String> = new Vector.<String>();
-            if (Capabilities.os.indexOf('Mac OS') > -1)
+            if (Capabilities.os.toLowerCase().indexOf('win') == -1)
                 args.push("-c");
 			else
 				args.push("/c");

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as b/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
index 9d5e8a0..7217524 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
@@ -18,23 +18,14 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.ant.tags
 {
-    import flash.desktop.NativeProcess;
-    import flash.desktop.NativeProcessStartupInfo;
-    import flash.events.Event;
-    import flash.events.NativeProcessExitEvent;
-    import flash.events.ProgressEvent;
     import flash.filesystem.File;
     import flash.filesystem.FileMode;
     import flash.filesystem.FileStream;
-    import flash.system.Capabilities;
-    import flash.utils.IDataInput;
     
     import mx.core.IFlexModuleFactory;
-    import mx.utils.StringUtil;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class PropertyFile extends TaskHandler
@@ -69,18 +60,10 @@ package org.apache.flex.ant.tags
             return true;
         }
         
-        private var fileName:String;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-            {
-                fileName = value;
-            }
-            else
-                super.processAttribute(name, value);
-        }
-        
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}
 
     } 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Replace.as b/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
index 7eadd2f..81e418f 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
@@ -18,7 +18,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.ant.tags
 {
-    import flash.events.Event;
     import flash.filesystem.File;
     import flash.filesystem.FileMode;
     import flash.filesystem.FileStream;
@@ -27,7 +26,6 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.ITagHandler;
     
     [Mixin]
     public class Replace extends TaskHandler
@@ -42,21 +40,20 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var file:String;
-        private var token:String;
-        private var value:String;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-                file = value;
-            else if (name == "token")
-                token = value;
-            else if (name == "value")
-                this.value = value;
-            else
-                super.processAttribute(name, value);
-        }
+        private function get file():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get token():String
+		{
+			return getNullOrAttributeValue("@token");
+		}
+		
+        private function get value():String
+		{
+			return getAttributeValue("@value");
+		}
         
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
@@ -67,8 +64,30 @@ package org.apache.flex.ant.tags
             fs.open(f, FileMode.READ);
             var s:String = fs.readUTFBytes(fs.bytesAvailable);
             fs.close();
-            var regex:RegExp = new RegExp(token, "g");
-            s = s.replace(regex, value);
+			var tokens:Vector.<RegExp> = new Vector.<RegExp>();
+			var reps:Vector.<String> = new Vector.<String>();
+            var regex:RegExp;
+			if (token != null)
+			{
+				regex = new RegExp(token, "g");
+				tokens.push(regex);
+				reps.push(value);
+			}
+			if (numChildren > 0)
+			{
+				for (var i:int = 0; i < numChildren; i++)
+				{
+					var rf:ReplaceFilter = getChildAt(i) as ReplaceFilter;
+					regex = new RegExp(rf.token, "g");
+					tokens.push(regex);
+					reps.push(rf.value);
+				}
+			}
+			var n:int = tokens.length;
+			for (i = 0; i < n; i++)
+			{
+				s = s.replace(tokens[i], reps[i]);				
+			}
             fs.open(f, FileMode.WRITE);
             fs.writeUTFBytes(s);
             fs.close();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Target.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Target.as b/ant_on_air/src/org/apache/flex/ant/tags/Target.as
index 5f6abbf..b61eb10 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Target.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Target.as
@@ -37,29 +37,21 @@ package org.apache.flex.ant.tags
         {
         }
                 
-        private var project:Project;
-		private var ifProperty:String;
-		private var unlessProperty:String;
+		private function get ifProperty():String
+		{
+			return getNullOrAttributeValue("@if");
+		}
+		
+		private function get unlessProperty():String
+		{
+			return getNullOrAttributeValue("@unless");
+		}
 		
-        private var _depends:String;
-        
         public function get depends():String
         {
-            return _depends;
-        }
-                
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "depends")
-                _depends = value;
-			else if (name == "if")
-				ifProperty = value;
-			else if (name == "unless")
-				unlessProperty = value;
-            else
-                super.processAttribute(name, value);
+            return getNullOrAttributeValue("@depends");
         }
-        
+                        
         private var dependsList:Array;
         
         private function processDepends():Boolean
@@ -73,7 +65,7 @@ package org.apache.flex.ant.tags
             while (dependsList.length > 0)
             {
                 var depend:String = dependsList.shift();
-                var t:Target = project.getTarget(depend);
+                var t:Target = ant.project.getTarget(depend);
                 if (!t.execute(callbackMode, context))
                 {
                     t.addEventListener(Event.COMPLETE, dependCompleteHandler);
@@ -86,6 +78,12 @@ package org.apache.flex.ant.tags
         
         private function dependCompleteHandler(event:Event):void
         {
+			if (!ant.project.status)
+			{
+				if (!inExecute)
+					dispatchEvent(new Event(Event.COMPLETE));
+				return;
+			}
             processDepends();
         }
         
@@ -97,9 +95,9 @@ package org.apache.flex.ant.tags
 			
             inExecute = true;
             this.callbackMode = callbackMode;
-            if (_depends)
+            if (depends)
             {
-                dependsList = _depends.split(",");
+                dependsList = depends.split(",");
                 if (!processDepends())
                 {
                     inExecute = false;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as b/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
index ee119f1..fd9458c 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
@@ -44,23 +44,22 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var src:String;
-        private var dest:String;
-        private var overwrite:Boolean;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "src")
-                src = value;
-            else if (name == "dest")
-                dest = value;
-            else if (name == "overwrite")
-                overwrite = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
-        
-        private var destFile:File;
+        private function get src():String
+		{
+			return getAttributeValue("@src");
+		}
+		
+        private function get dest():String
+		{
+			return getAttributeValue("@dest");
+		}
+		
+        private function get overwrite():Boolean
+		{
+			return getAttributeValue("@overwrite") == "true";
+		}
+
+		private var destFile:File;
         
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
index 6ae9d36..959eca9 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
@@ -29,6 +29,7 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
+    import org.apache.flex.xml.ITagHandler;
     import org.as3commons.zip.Zip;
     import org.as3commons.zip.ZipEvent;
     import org.as3commons.zip.ZipFile;
@@ -46,27 +47,40 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        private var src:String;
-        private var dest:String;
-        private var overwrite:Boolean;
-        
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "src")
-                src = value;
-            else if (name == "dest")
-                dest = value;
-            else if (name == "overwrite")
-                overwrite = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
+		private function get src():String
+		{
+			return getAttributeValue("@src");
+		}
+		
+		private function get dest():String
+		{
+			return getAttributeValue("@dest");
+		}
+		
+		private function get overwrite():Boolean
+		{
+			return getAttributeValue("@overwrite") == "true";
+		}
         
         private var destFile:File;
+		private var patternSet:PatternSet;
         
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);
+			if (numChildren > 0)
+			{
+				// look for a patternset
+				for (var i:int = 0; i < numChildren; i++)
+				{
+					var child:ITagHandler = getChildAt(i);
+					if (child is PatternSet)
+					{
+						patternSet = child as PatternSet;
+						break;
+					}
+				}
+			}
          
             var srcFile:File = File.applicationDirectory.resolvePath(src);
             destFile = File.applicationDirectory.resolvePath(dest);
@@ -102,6 +116,11 @@ package org.apache.flex.ant.tags
         private function onFileLoaded(e:ZipEvent):void {
             try {
                 var fzf:ZipFile = e.file;
+				if (patternSet)
+				{
+					if (!(patternSet.matches(fzf.filename)))
+						return;
+				}
                 var f:File = destFile.resolvePath(fzf.filename);
                 var fs:FileStream = new FileStream();
                 
@@ -109,7 +128,7 @@ package org.apache.flex.ant.tags
                     // Is a directory, not a file. Dont try to write anything into it.
                     return;
                 }
-                
+                				
                 fs.open(f, FileMode.WRITE);
                 fs.writeBytes(fzf.content);
                 fs.close();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as b/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
index 9fda9b4..de818ee 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
@@ -26,7 +26,6 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class XmlProperty extends TaskHandler
@@ -88,23 +87,15 @@ package org.apache.flex.ant.tags
             }
         }
         
-        private var fileName:String;
-        private var collapse:Boolean;
+        private function get fileName():String
+		{
+			return getAttributeValue("@file");
+		}
+		
+        private function get collapse():Boolean
+		{
+			return getAttributeValue("@collapseAttributes") == "true";
+		}
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "file")
-            {
-                fileName = value;
-            }
-            else if (name == "collapseAttributes")
-            {
-                collapse = value == "true";
-            }
-            else
-                super.processAttribute(name, value);
-        }
-        
-
     } 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
index 9c3015b..d9d449b 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
@@ -22,7 +22,6 @@ package org.apache.flex.ant.tags.supportClasses
     import flash.events.ProgressEvent;
     import flash.filesystem.File;
     
-    import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.FileSet;
     
     /**
@@ -105,6 +104,12 @@ package org.apache.flex.ant.tags.supportClasses
                     }
                 }
             }
+			
+			if (current == numChildren)
+			{
+				dispatchEvent(new Event(Event.COMPLETE));
+				return;
+			}
         }
 
         private function actOnList():void

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
index a264bc7..99ed48f 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
@@ -40,14 +40,5 @@ package org.apache.flex.ant.tags.supportClasses
             return _name;
         }
         
-        /**
-         *  @private 
-         */
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "name")
-                _name = value;
-        }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
index 7834fe0..88ec3f4 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
@@ -60,26 +60,19 @@ package org.apache.flex.ant.tags.supportClasses
             this.xml = xml;
         }
         
-        /**
-         *  Loop through and process attributes.
-         *  @param xmlList XMLList The list of attributes.
-         *  @param context Object An object containing useful information.
-         */
-        protected function processAttributes(xmlList:XMLList, context:Object):void
-        {
-            var n:int = xmlList.length();
-            for (var i:int = 0; i < n; i++)
-                processAttribute(xmlList[i].name().toString(), ant.getValue(xmlList[i].toString(), context));
-        }
-        
-        /**
-         *  Process an attribute on the tag.
-         *  @param name String The attribute name.
-         *  @param value String The attribute value.
-         */
-        protected function processAttribute(name:String, value:String):void
-        {
-			trace("unknown attribute:", name);
-        }
+		protected function getAttributeValue(name:String):String
+		{
+			return ant.getValue(xml[name].toString(), context);	
+		}
+		
+		protected function getNullOrAttributeValue(name:String):String
+		{
+			var xmlList:XMLList = xml[name];
+			if (xmlList.length() == 0)
+				return null;
+			
+			return ant.getValue(xml[name].toString(), context);	
+		}
+		
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/56973c6d/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
index 38e3550..59422d2 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
@@ -28,7 +28,11 @@ package org.apache.flex.ant.tags.supportClasses
         {
         }
         
-        public var failonerror:Boolean = true;
+        public function get failonerror():Boolean
+		{
+			var val:String = getNullOrAttributeValue("@failonerror");
+			return val == null ? true : val == "true";
+		}
         
         protected var callbackMode:Boolean;
         
@@ -42,17 +46,9 @@ package org.apache.flex.ant.tags.supportClasses
         {
             this.callbackMode = callbackMode;
 			this.context = context;
-			processAttributes(xml.attributes(), context);
             ant.processChildren(xml, this);
             return true;
         }
         
-        override protected function processAttribute(name:String, value:String):void
-        {
-            if (name == "failonerror")
-                failonerror = value == "true";
-            else
-                super.processAttribute(name, value);
-        }
     }
 }
\ No newline at end of file


[3/8] git commit: [flex-utilities] [refs/heads/develop] - add more complexity to test to simulate what Ant needs to do to install FlexJS and Falcon

Posted by ah...@apache.org.
add more complexity to test to simulate what Ant needs to do to install FlexJS and Falcon


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/b1a70778
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/b1a70778
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/b1a70778

Branch: refs/heads/develop
Commit: b1a707780bbc092df8e68ab02d919b7a026f6d0d
Parents: 4b53170
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 23 17:36:29 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 23 17:36:29 2013 -0800

----------------------------------------------------------------------
 ant_on_air/tests/subant.xml |  67 ++++++++++++++++++++
 ant_on_air/tests/test.xml   | 129 ++++++++++++++++++++++++++++-----------
 2 files changed, 162 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b1a70778/ant_on_air/tests/subant.xml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/subant.xml b/ant_on_air/tests/subant.xml
new file mode 100644
index 0000000..f4b5afc
--- /dev/null
+++ b/ant_on_air/tests/subant.xml
@@ -0,0 +1,67 @@
+<?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.
+
+-->
+
+<project name="ant_on_air_test_subant" basedir="." default="subant">
+
+    <!--load environment variables prefixed with env -->
+    <property environment="env"/>
+
+    <!--location of property file -->
+    <property file="${basedir}/../build.properties" description="Properties for Ant On AIR project" />
+
+    <!--
+        Properties are immutable so value frozen first time property is set.
+        If FLEX_HOME is not set with -DFLEX_HOME=/path/to/flex/sdk on the ant command line
+        use the environment variable, if it exists. Else if windows, use FLEX_HOME_WIN
+        else use FLEX_HOME_MAC, which are both defined in build.properties.
+    -->
+    <condition property="FLEX_HOME" value="${env.FLEX_HOME}">
+        <isset property="env.FLEX_HOME" />
+    </condition>
+
+    <condition property="theOS" value="Windows">
+		<os family="windows"/>
+    </condition>
+    <condition property="theOS" value="Mac">
+		<os family="mac"/>
+    </condition>
+    <condition property="isMac" value="Mac">
+		<os family="mac"/>
+    </condition>
+
+    <condition property="success" value="success" >
+        <and>
+            <matches string="foobar" pattern=".*bar" />
+            <isset property="env.FLEX_HOME" />
+        </and>
+    </condition>
+    
+	<target name="subant">
+        <antcall target="paramtest">
+            <param name="foo" value="bar" />
+        </antcall>
+        <echo>subant reported ${success}</echo>
+    </target>
+    
+    <target name="paramtest">
+        <echo>paramtest said ${foo} should say bar</echo>
+    </target>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b1a70778/ant_on_air/tests/test.xml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/test.xml b/ant_on_air/tests/test.xml
index 46e2d74..907a5af 100644
--- a/ant_on_air/tests/test.xml
+++ b/ant_on_air/tests/test.xml
@@ -45,8 +45,23 @@
     <condition property="isMac" value="Mac">
 		<os family="mac"/>
     </condition>
+    <condition property="isWindows" value="Windows">
+		<os family="windows"/>
+    </condition>
 
-	<target name="test">
+	<target name="test" depends="copy-test,confirm-delete,delete-test">
+        <exec executable="where.exe" osfamily="windows" outputproperty="java.executable" failonerror="true">
+            <arg value="java"/>
+        </exec>
+        <exec executable="which" osfamily="mac" outputproperty="java.executable" failonerror="true">
+            <arg value="java"/>
+        </exec>
+        <echo>java is at ${java.executable}</echo>
+        <ant dir="${basedir}" antfile="subant.xml" />
+        <echo>Test is complete</echo>
+    </target>
+    
+    <target name="copy-test" >
 		<echo>FLEX_HOME is ${FLEX_HOME}. DEBUG is ${DEBUG_FLAG}. The OS is ${theOS}</echo>
         <mkdir dir="${basedir}/temp" />
         <copy file="${basedir}/test.xml" toFile="${basedir}/temp/copied.xml" />
@@ -64,19 +79,20 @@
                 <include name="**/**" />
                 <exclude name="**/Ant.as" />
             </fileset>
+            <globmapper from="*" to="Z*" />
         </copy>
-        <available file="${basedir}/temp/org/apache/flex/ant/Ant.as" property="ant.doesnt.exist" value="got copied" />
+        <available file="${basedir}/temp/Zorg/apache/flex/ant/Ant.as" property="ant.doesnt.exist" value="got copied" />
         <fail message="Ant.as was copied to temp">
             <condition>
-                <available file="${basedir}/temp/org/apache/flex/ant/Ant.as" />
+                <available file="${basedir}/temp/Zorg/apache/flex/ant/Ant.as" />
             </condition>
         </fail>
         <echo>Ant.as ${ant.doesnt.exist}. Should NOT say: got copied</echo>
-        <available file="${basedir}/temp/org/apache/flex/ant/tags/Project.as" property="project.doesnt.exist" value="got copied" />
+        <available file="${basedir}/temp/Zorg/apache/flex/ant/tags/Project.as" property="project.doesnt.exist" value="got copied" />
         <fail message="Project.as was not copied to temp">
             <condition>
                 <not>
-                    <available file="${basedir}/temp/org/apache/flex/ant/tags/Project.as" />
+                    <available file="${basedir}/temp/Zorg/apache/flex/ant/tags/Project.as" />
                 </not>
             </condition>
         </fail>
@@ -116,7 +132,25 @@
             </condition>
         </fail>
         <mkdir dir="${basedir}/temp/unzip" />
-        <unzip src="${basedir}/temp/apache-rat-0.10-src.zip" dest="${basedir}/temp/unzip" />
+        <unzip src="${basedir}/temp/apache-rat-0.10-src.zip" dest="${basedir}/temp/unzip">
+            <patternset>
+                <include name="apache-rat-0.10/pom.xml" />
+                <include name="apache-rat-0.10/RE*.txt" />
+                <exclude name="apache-rat-0.10/RELEASE_NOTES.txt" />
+            </patternset>
+        </unzip>
+        <fail message="unzip did not exclude expected files">
+            <condition>
+                <available file="${basedir}/temp/unzip/apache-rat-0.10/RELEASE_NOTES.txt" />
+            </condition>
+        </fail>
+        <fail message="unzip did not include expected files">
+            <condition>
+                <not>
+                    <available file="${basedir}/temp/unzip/apache-rat-0.10/README.txt" />
+                </not>
+            </condition>
+        </fail>
         <fail message="unzip did not result in expected files">
             <condition>
                 <not>
@@ -133,15 +167,7 @@
                 </not>
             </condition>
         </fail>
-        <mkdir dir="${basedir}/temp/untar" />
-        <untar src="${basedir}/temp/apache-rat-0.10-src.tar.gz" dest="${basedir}/temp/untar" />
-        <fail message="untar did not result in expected files">
-            <condition>
-                <not>
-                    <available file="${basedir}/temp/untar/apache-rat-0.10/pom.xml" />
-                </not>
-            </condition>
-        </fail>
+        <antcall target="macunzip" />
         <propertyfile file="${basedir}/temp/custom.properties" >
             <entry key="somekey" value="somevalue" />
             <entry key="somekey1" value="somevalue1" />
@@ -154,6 +180,9 @@
             </condition>
         </fail>
         <replace file="${basedir}/temp/custom.properties" token="somekey" value="replacedkey" />
+        <replace file="${basedir}/temp/custom.properties">
+            <replacefilter token="key" value="ky" />
+        </replace>
         <loadproperties srcFile="${basedir}/temp/custom.properties" />
         <fail message="replace did not work: found somekey">
             <condition>
@@ -162,27 +191,52 @@
         </fail>
         <fail message="replace did not work: did not find replacedkey">
             <condition>
-                <equals arg1="${replacedkey}" arg2="somevalue" />
+                <not>
+                    <equals arg1="${replacedky}" arg2="somevalue" />
+                </not>
             </condition>
         </fail>
         <fail message="replace did not work: did not find replacedkey1">
             <condition>
-                <equals arg1="${replacedkey1}" arg2="somevalue1" />
+                <not>
+                    <equals arg1="${replacedky1}" arg2="somevalue1" />
+                </not>
             </condition>
         </fail>
-        <input message="Ok to delete temp directory?"
-            validargs="yn"
-            addproperty="oktodelete" />
+        <echo file="${basedir}/temp/echotest.properties">echotest=good
+        </echo>
+        <loadproperties srcFile="${basedir}/temp/echotest.properties" />
+        <fail message="echo to file did not work: missing property">
+            <condition>
+                <not>
+                    <isset property="echotest" />
+                </not>
+            </condition>
+        </fail>
+        <touch file="${basedir}/temp/touchtest.txt" />
+        <available file="${basedir}/temp/touchtest.txt" property="touch.test" value="passed" />
+        <fail message="touch test failed">
+            <condition>
+                <not>
+                    <available file="${basedir}/temp/touchtest.txt" />
+                </not>
+            </condition>
+        </fail>
+        <echo>Touch test ${touch.test}. Should say: passed</echo>
+        
+    </target>
+    
+    <target name="delete-test" >
         <fail message="you were supposed to hit 'y'" >
             <condition>
                 <equals arg1="n" arg2="${oktodelete}" />
             </condition>
         </fail>
         <delete dir="${basedir}/temp" />
-        <available file="${basedir}/temp/org/apache/flex/ant/tags/Project.as" property="project.doesnt.exist.after.delete" value="didn't get deleted" />
+        <available file="${basedir}/temp/Zorg/apache/flex/ant/tags/Project.as" property="project.doesnt.exist.after.delete" value="didn't get deleted" />
         <fail message="temp/copied.xml was not deleted">
             <condition>
-                <available file="${basedir}/temp/org/apache/flex/ant/tags/Project.as" />
+                <available file="${basedir}/temp/Zorg/apache/flex/ant/tags/Project.as" />
             </condition>
         </fail>
         <echo>Project.as ${project.doesnt.exist.after.delete}. Should NOT say: didn't get deleted</echo>
@@ -210,6 +264,24 @@
         </fail>
 	</target>
 
+    <target name="macunzip" unless="isWindows">
+        <mkdir dir="${basedir}/temp/untar" />
+        <untar compression="gzip" src="${basedir}/temp/apache-rat-0.10-src.tar.gz" dest="${basedir}/temp/untar" />
+        <fail message="untar did not result in expected files">
+            <condition>
+                <not>
+                    <available file="${basedir}/temp/untar/apache-rat-0.10/pom.xml" />
+                </not>
+            </condition>
+        </fail>
+    </target>
+    
+    <target name="confirm-delete" unless="exitwhendone">
+        <input message="Ok to delete temp directory?"
+            validargs="y,n"
+            addproperty="oktodelete" />
+    </target>
+    
     <target name="build" depends="init,compile"
         description="Compiles SWC"/>
 
@@ -217,22 +289,11 @@
         description="Creates the deploy folders and sets app extension"/>
 
     <target name="clean" description="Cleans up old files.">
-        <delete dir="${LIBRARY_DIR}" failOnError="false" includeEmptyDirs="true" />
+        <delete dir="${basedir}/temp" failOnError="false" includeEmptyDirs="true" />
     </target>
 
     <target name="compile" 
         description="Compiles the SWC.">
-        <compc 
-            output="${LIBRARY_DIR}/${LIBRARY_NAME}.swc"
-            debug="${DEBUG_FLAG}"
-            failonerror="true"
-            fork="true"
-            maxmemory="512m">
-            <source-path path-element="${SOURCE_DIR}"/>
-            <external-library-path file="${AIR_HOME}/frameworks/libs/air/airglobal.swc" append="true"/>
-			<include-classes>AntClasses</include-classes>
-
-        </compc>
     </target>
 
 </project>


[2/8] git commit: [flex-utilities] [refs/heads/develop] - refactor so context is passed in execute() and attributes are also processed lazily. Looks like AntCall creates its own context so we can't assume a context until execute()

Posted by ah...@apache.org.
refactor so context is passed in execute() and attributes are also processed lazily.  Looks like AntCall creates its own context so we can't assume a context until execute()


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/4b53170a
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/4b53170a
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/4b53170a

Branch: refs/heads/develop
Commit: 4b53170a891a7e006993dc0e40875e41702e2ef9
Parents: dd196d1
Author: Alex Harui <ah...@apache.org>
Authored: Thu Dec 19 15:37:33 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Dec 19 15:37:33 2013 -0800

----------------------------------------------------------------------
 ant_on_air/build.xml                            |  8 +++
 ant_on_air/src/AntClasses.as                    |  3 +
 ant_on_air/src/org/apache/flex/ant/Ant.as       | 49 +++++++++------
 .../src/org/apache/flex/ant/tags/Available.as   | 12 ++--
 .../src/org/apache/flex/ant/tags/Checksum.as    |  4 +-
 .../src/org/apache/flex/ant/tags/Condition.as   |  6 +-
 ant_on_air/src/org/apache/flex/ant/tags/Copy.as |  4 +-
 .../src/org/apache/flex/ant/tags/Delete.as      |  4 +-
 ant_on_air/src/org/apache/flex/ant/tags/Echo.as |  4 +-
 .../src/org/apache/flex/ant/tags/Equals.as      |  8 ++-
 ant_on_air/src/org/apache/flex/ant/tags/Fail.as |  8 +--
 .../src/org/apache/flex/ant/tags/FileSet.as     |  5 +-
 ant_on_air/src/org/apache/flex/ant/tags/Get.as  |  8 +--
 .../src/org/apache/flex/ant/tags/Input.as       |  4 +-
 .../src/org/apache/flex/ant/tags/IsSet.as       |  6 +-
 .../org/apache/flex/ant/tags/LoadProperties.as  |  9 +--
 .../src/org/apache/flex/ant/tags/Mkdir.as       |  4 +-
 ant_on_air/src/org/apache/flex/ant/tags/Not.as  |  7 ++-
 ant_on_air/src/org/apache/flex/ant/tags/OS.as   |  4 +-
 .../src/org/apache/flex/ant/tags/Project.as     | 36 +++++++----
 .../src/org/apache/flex/ant/tags/Property.as    | 10 +---
 .../org/apache/flex/ant/tags/PropertyFile.as    | 10 +---
 .../src/org/apache/flex/ant/tags/Replace.as     |  4 +-
 .../src/org/apache/flex/ant/tags/Target.as      | 63 +++++++++++---------
 .../src/org/apache/flex/ant/tags/Untar.as       |  6 +-
 .../src/org/apache/flex/ant/tags/Unzip.as       |  8 +--
 .../src/org/apache/flex/ant/tags/XmlProperty.as |  9 +--
 .../flex/ant/tags/filesetClasses/DataType.as    |  4 +-
 .../ant/tags/filesetClasses/DirectoryScanner.as |  4 +-
 .../flex/ant/tags/filesetClasses/FileUtils.as   |  4 +-
 .../ant/tags/filesetClasses/TokenizedPath.as    |  2 +-
 .../tags/supportClasses/FileSetTaskHandler.as   | 13 ++--
 .../ant/tags/supportClasses/IValueTagHandler.as |  8 ++-
 .../ant/tags/supportClasses/NamedTagHandler.as  |  3 +
 .../flex/ant/tags/supportClasses/TagHandler.as  |  9 ++-
 .../flex/ant/tags/supportClasses/TaskHandler.as | 13 ++--
 .../src/org/apache/flex/xml/ITagHandler.as      |  3 +-
 .../src/org/apache/flex/xml/XMLTagProcessor.as  |  8 +--
 ant_on_air/tests/AntTest.mxml                   |  4 +-
 ant_on_air/tests/test.xml                       |  4 +-
 40 files changed, 210 insertions(+), 172 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/build.xml
----------------------------------------------------------------------
diff --git a/ant_on_air/build.xml b/ant_on_air/build.xml
index 8d6d5fc..5f06203 100644
--- a/ant_on_air/build.xml
+++ b/ant_on_air/build.xml
@@ -137,4 +137,12 @@
         </exec>
     </target>
 
+    <target name="debug-test" >
+        <delete dir="${basedir}/tests/temp" failonerror="false" />
+        <exec executable="${AIR_HOME}/bin/${adl}" dir="${basedir}/tests" failonerror="true">
+            <arg value="-runtime" />
+            <arg value="${AIR_HOME}/runtimes/air/${runtime}" />
+            <arg value="${basedir}/tests/AntTest-app.xml" />
+        </exec>
+    </target>
 </project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/AntClasses.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/AntClasses.as b/ant_on_air/src/AntClasses.as
index ab6b80b..91abdf1 100644
--- a/ant_on_air/src/AntClasses.as
+++ b/ant_on_air/src/AntClasses.as
@@ -24,6 +24,9 @@ package
         {
             import org.apache.flex.ant.Ant; Ant;
             import org.apache.flex.ant.tags.Project; Project;
+			import org.apache.flex.ant.tags.And; And;
+			import org.apache.flex.ant.tags.AntTask; AntTask;
+			import org.apache.flex.ant.tags.AntCall; AntCall;
             import org.apache.flex.ant.tags.Available; Available;
             import org.apache.flex.ant.tags.Checksum; Checksum;
             import org.apache.flex.ant.tags.Condition; Condition;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/Ant.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/Ant.as b/ant_on_air/src/org/apache/flex/ant/Ant.as
index 1dc97c6..e3727f2 100644
--- a/ant_on_air/src/org/apache/flex/ant/Ant.as
+++ b/ant_on_air/src/org/apache/flex/ant/Ant.as
@@ -57,6 +57,7 @@ package org.apache.flex.ant
          */
         public function processXMLFile(file:File, context:Object = null, callbackMode:Boolean = true):Boolean
         {
+			Ant.ants.push(this);
             this.file = file;
             var fs:FileStream = new FileStream();
             fs.open(file, FileMode.READ);
@@ -68,13 +69,14 @@ package org.apache.flex.ant
             if (!context)
                 context = {};
             this.context = context;
-            var project:Project = processXMLTag(xml, context) as Project;
-            Ant.project = project;
-            if (!project.execute(callbackMode))
+            var project:Project = processXMLTag(xml) as Project;
+            this.project = project;
+            if (!project.execute(callbackMode, context))
             {
                 project.addEventListener(Event.COMPLETE, completeHandler);
                 return false;                
             }
+			Ant.ants.pop();
             return true;
         }
     
@@ -103,13 +105,19 @@ package org.apache.flex.ant
         public var progressClass:Object;
         
         private var context:Object;
-        public static var ant:Ant;
-        public static var project:Project;
-        public static function log(msg:String, level:int):void
-        {
-            ant.output(msg);
-        }
-                
+        public var ant:Ant;
+        public var project:Project;
+		
+		// the stack of ant instances (ant can call <ant/>)
+		public static var ants:Array = [];
+		
+		public static function get currentAnt():Ant
+		{
+			if (ants.length == 0)
+				return null;
+			return ants[ants.length - 1] as Ant;
+		}
+		
         private function completeHandler(event:Event):void
         {
             dispatchEvent(event);
@@ -149,19 +157,19 @@ package org.apache.flex.ant
                     if (c != -1)
                     {
                         var token:String = input.substring(i + 2, c);
-                        if (context.hasOwnProperty(token))
+						if (token == "basedir")
+						{
+							var basedir:String = context.basedir;
+							rep = file.parent.resolvePath(basedir).nativePath;
+							input = input.replace("${" + token + "}", rep);
+							i += rep.length - token.length - 3;
+						}
+						else if (context.hasOwnProperty(token))
                         {
                             var rep:String = context[token];
                             input = input.replace("${" + token + "}", rep);
                             i += rep.length - token.length - 3;
                         }
-                        else if (token == "basedir")
-                        {
-                            var basedir:String = context.project.basedir;
-                            rep = file.parent.resolvePath(basedir).nativePath;
-                            input = input.replace("${" + token + "}", rep);
-                            i += rep.length - token.length - 3;
-                        }
                     }
                 }
                 i++;
@@ -170,6 +178,11 @@ package org.apache.flex.ant
             return input;
         }
         
+		public static function log(s:String, level:int):void
+		{
+			currentAnt.output(s);	
+		}
+		
         /**
          *  Output for Echo.  Defaults to trace().
          */

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Available.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Available.as b/ant_on_air/src/org/apache/flex/ant/tags/Available.as
index 9942359..219aa64 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Available.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Available.as
@@ -44,8 +44,10 @@ package org.apache.flex.ant.tags
         private var _property:String;
         private var _value:String;
         
-        public function get value():Object
+        public function getValue(context:Object):Object
         {
+			processAttributes(xml.attributes(), context);
+
             if (_file == null) return false;
             
             var file:File = new File(_file);
@@ -58,12 +60,12 @@ package org.apache.flex.ant.tags
             return true;
         }
 
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
-            if (value)
+            super.execute(callbackMode, context);
+            var value:Object = getValue(context);
                 if (!context.hasOwnProperty(_property))
-                    context[_property] = _value;
+                    context[_property] = _value != null ? _value : true;
             return true;
         }
         

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as b/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
index 8881eaa..5e19157 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Checksum.as
@@ -70,9 +70,9 @@ package org.apache.flex.ant.tags
         private var md5:MD5Stream;
         private var fs:FileStream;
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
          
             var f:File = File.applicationDirectory.resolvePath(file);
             fs = new FileStream();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Condition.as b/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
index dd5238f..ce565d1 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Condition.as
@@ -39,9 +39,9 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
             
             // if the property is not already set
             if (_property && _value != null && !context.hasOwnProperty(_property))
@@ -61,7 +61,7 @@ package org.apache.flex.ant.tags
         public function get computedValue():Object
         {
             // get the value from the children
-            var val:Object = IValueTagHandler(getChildAt(0)).value;
+            var val:Object = IValueTagHandler(getChildAt(0)).getValue(context);
             return val;
         }
         

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as b/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
index b1c0c46..8742bd3 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
@@ -76,9 +76,9 @@ package org.apache.flex.ant.tags
             srcFile.copyTo(destFile, overwrite);
         }
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            var retVal:Boolean = super.execute(callbackMode);
+            var retVal:Boolean = super.execute(callbackMode, context);
             if (numChildren > 0)
                 return retVal;
             

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as b/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
index 0d5b010..77aba9d 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
@@ -65,9 +65,9 @@ package org.apache.flex.ant.tags
                 delFile.deleteFile();
         }
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            var retVal:Boolean = super.execute(callbackMode);
+            var retVal:Boolean = super.execute(callbackMode, context);
             if (numChildren > 0)
                 return retVal;
             

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as b/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
index 2e92f18..fbcfa7f 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
@@ -52,9 +52,9 @@ package org.apache.flex.ant.tags
                 super.processAttribute(name, value);
         }
 
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
             ant.output(ant.getValue(text, context));
             return true;
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Equals.as b/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
index 66af57b..6c4923c 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Equals.as
@@ -43,9 +43,11 @@ package org.apache.flex.ant.tags
         private var casesensitive:Boolean;
         private var trim:Boolean;
         
-        public function get value():Object
+        public function getValue(context:Object):Object
         {
-            var val1:String = arg1;
+			processAttributes(xml.attributes(), context);
+
+			var val1:String = arg1;
             var val2:String = arg2;
             if (casesensitive)
             {
@@ -69,7 +71,7 @@ package org.apache.flex.ant.tags
             else if (name == "casesensitive")
                 casesensitive = value == "true";
             else if (name == "trim")
-                casesensitive = value == "true";
+                trim = value == "true";
         }
         
     }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Fail.as b/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
index e08619c..7f6cab4 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Fail.as
@@ -51,15 +51,15 @@ package org.apache.flex.ant.tags
                 super.processAttribute(name, value);
         }
 
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
             if (numChildren == 1)
             {
                 var child:Condition = getChildAt(0) as Condition;
                 if (child)
                 {
-                    child.execute(false);
+                    child.execute(false, context);
                     var val:Object = child.computedValue;
                     if (!(val == "true" || val == true))
                     {
@@ -69,7 +69,7 @@ package org.apache.flex.ant.tags
             }
             if (text)
                 ant.output(ant.getValue(text, context));
-            Ant.project.status = false;
+            ant.project.status = false;
             return true;
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as b/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
index c6fb109..4b3d597 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/FileSet.as
@@ -49,11 +49,12 @@ package org.apache.flex.ant.tags
         
         private var _value:Vector.<String>;
         
-        public function get value():Object
+        public function getValue(context:Object):Object
         {
             if (_value) return _value;
             
-            ant.processChildren(xml, context, this);
+			processAttributes(xml.attributes(), context);
+            ant.processChildren(xml, this);
             var ds:DirectoryScanner = new DirectoryScanner();
             var n:int = numChildren;
             var includes:Vector.<String> = new Vector.<String>();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Get.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Get.as b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
index d11c194..6512071 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Get.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
@@ -67,9 +67,9 @@ package org.apache.flex.ant.tags
         
         private var urlLoader:URLLoader;
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
          
             if (skipexisting)
             {
@@ -90,14 +90,14 @@ package org.apache.flex.ant.tags
         
         private function ioErrorEventHandler(event:IOErrorEvent):void
         {
-            Ant.project.status = false;
+            ant.project.status = false;
             dispatchEvent(new Event(Event.COMPLETE));
             event.preventDefault();
         }
             
         private function securityErrorHandler(event:SecurityErrorEvent):void
         {
-            Ant.project.status = false;
+            ant.project.status = false;
             dispatchEvent(new Event(Event.COMPLETE));
             event.preventDefault();
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Input.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Input.as b/ant_on_air/src/org/apache/flex/ant/tags/Input.as
index 52210f2..2567e43 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Input.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Input.as
@@ -59,9 +59,9 @@ package org.apache.flex.ant.tags
                 super.processAttribute(name, value);
         }
 
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
             if (text)
                 ant.output(ant.getValue(text, context));
             if (validArgs)

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as b/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
index 3ea565d..8b88e97 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/IsSet.as
@@ -39,9 +39,11 @@ package org.apache.flex.ant.tags
         
         private var _property:String;
         
-        public function get value():Object
+        public function getValue(context:Object):Object
         {
-            if (_property == null) return false;
+			processAttributes(xml.attributes(), context);
+
+			if (_property == null) return false;
             
             return context.hasOwnProperty(_property);
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as b/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
index 54ffb5f..ef68bd0 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/LoadProperties.as
@@ -48,13 +48,10 @@ package org.apache.flex.ant.tags
         {
         }
         
-        override public function init(xml:XML, context:Object, xmlProcessor:XMLTagProcessor):void
-        {
-            super.init(xml, context, xmlProcessor);
-        }
-        
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
+			super.execute(callbackMode, context);
+			
             var f:File = new File(fileName);
             var fs:FileStream = new FileStream();
             fs.open(f, FileMode.READ);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as b/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
index 3c41623..c1c92d8 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
@@ -40,9 +40,9 @@ package org.apache.flex.ant.tags
         
         private var _dir:String;
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
             
             var dir:File = new File(_dir);
             dir.createDirectory();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Not.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Not.as b/ant_on_air/src/org/apache/flex/ant/tags/Not.as
index 3ea0b7e..0aa38b0 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Not.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Not.as
@@ -37,14 +37,15 @@ package org.apache.flex.ant.tags
             super();
         }
         
-        public function get value():Object
+        public function getValue(context:Object):Object
         {
-            ant.processChildren(xml, context, this);
+			processAttributes(xml.attributes(), context);
+            ant.processChildren(xml, this);
             if (numChildren == 1)
             {
                 var value:IValueTagHandler = getChildAt(0) as IValueTagHandler;
                 // get the value from the children
-                var val:Object = IValueTagHandler(value).value;
+                var val:Object = IValueTagHandler(value).getValue(context);
                 if (!(val == "true" || val == true))
                 {
                     return true;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/OS.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/OS.as b/ant_on_air/src/org/apache/flex/ant/tags/OS.as
index cc81459..a4e8ba2 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/OS.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/OS.as
@@ -41,8 +41,10 @@ package org.apache.flex.ant.tags
         
         private var _family:String;
         
-        public function get value():Object
+        public function getValue(context:Object):Object
         {
+			processAttributes(xml.attributes(), context);
+			
             if (_family == null) return false;
             
             return Capabilities.os.toLowerCase().indexOf(_family.toLowerCase()) != -1;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Project.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Project.as b/ant_on_air/src/org/apache/flex/ant/tags/Project.as
index 91f8f98..29e0392 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Project.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Project.as
@@ -52,20 +52,26 @@ package org.apache.flex.ant.tags
         {
         }
         
+		private var _status:Boolean;
         /**
          *  true if tasks completed successfully.
          *  Do not monitor this property to determine if the project is done executing.
          *  This property is set to true and a failing task sets it to false.
          */
-        public var status:Boolean;
-        
-        override public function init(xml:XML, context:Object, xmlProcessor:XMLTagProcessor):void
-        {
-            context.project = this;
-            super.init(xml, context, xmlProcessor);
-            ant.processChildren(xml, context, this);
-        }
-        
+        public function get status():Boolean
+		{
+			return _status;
+		}
+		
+		public function set status(value:Boolean):void
+		{
+			if (_status != value)
+			{
+				_status = value;
+				ant.dispatchEvent(new Event("statusChanged"));
+			}
+		}
+                
         private var _basedir:String;
         
         public function get basedir():String
@@ -92,10 +98,14 @@ package org.apache.flex.ant.tags
                 super.processAttribute(name, value);
         }
 
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
+			super.execute(callbackMode, context);
+			
             this.callbackMode = callbackMode;
-            
+			
+            context.basedir = basedir;
+			
             status = true;
             
             if (context.targets == null)
@@ -128,7 +138,7 @@ package org.apache.flex.ant.tags
                 if (child is TaskHandler)
                 {
                     var task:TaskHandler = TaskHandler(child);
-                    if (!task.execute(callbackMode))
+                    if (!task.execute(callbackMode, context))
                     {
                         task.addEventListener(Event.COMPLETE, childCompleteHandler);
                         return false;
@@ -187,7 +197,7 @@ package org.apache.flex.ant.tags
         public function executeTarget(targetName:String):Boolean
         {
             var t:Target = getTarget(targetName);
-            if (!t.execute(callbackMode))
+            if (!t.execute(callbackMode, context))
             {
                 t.addEventListener(Event.COMPLETE, completeHandler);
                 return false;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Property.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Property.as b/ant_on_air/src/org/apache/flex/ant/tags/Property.as
index 0d7619c..adfa9c4 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Property.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Property.as
@@ -34,7 +34,6 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class Property extends TaskHandler
@@ -48,13 +47,10 @@ package org.apache.flex.ant.tags
         {
         }
         
-        override public function init(xml:XML, context:Object, xmlProcessor:XMLTagProcessor):void
-        {
-            super.init(xml, context, xmlProcessor);
-        }
-        
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
+			super.execute(callbackMode, context);
+			
             if (name && value && !context.hasOwnProperty(name))
                 context[name] = value;
             else if (fileName != null)

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as b/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
index 25c1627..9d5e8a0 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/PropertyFile.as
@@ -48,14 +48,10 @@ package org.apache.flex.ant.tags
         {
         }
         
-        override public function init(xml:XML, context:Object, xmlProcessor:XMLTagProcessor):void
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.init(xml, context, xmlProcessor);
-        }
-        
-        override public function execute(callbackMode:Boolean):Boolean
-        {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
+			
             var f:File = new File(fileName);
             var fs:FileStream = new FileStream();
             fs.open(f, FileMode.WRITE);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Replace.as b/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
index 0a1fe04..7eadd2f 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Replace.as
@@ -58,9 +58,9 @@ package org.apache.flex.ant.tags
                 super.processAttribute(name, value);
         }
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
 
             var f:File = File.applicationDirectory.resolvePath(file);
             var fs:FileStream = new FileStream();

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Target.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Target.as b/ant_on_air/src/org/apache/flex/ant/tags/Target.as
index 92b82da..5f6abbf 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Target.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Target.as
@@ -24,7 +24,6 @@ package org.apache.flex.ant.tags
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
-    import org.apache.flex.xml.XMLTagProcessor;
     
     [Mixin]
     public class Target extends TaskHandler
@@ -37,16 +36,11 @@ package org.apache.flex.ant.tags
         public function Target()
         {
         }
-        
-        override public function init(xml:XML, context:Object, xmlProcessor:XMLTagProcessor):void
-        {
-            this.xml = xml;
-            project = context.project as Project;
-            super.init(xml, context, xmlProcessor);
-        }
-        
+                
         private var project:Project;
-        
+		private var ifProperty:String;
+		private var unlessProperty:String;
+		
         private var _depends:String;
         
         public function get depends():String
@@ -58,16 +52,14 @@ package org.apache.flex.ant.tags
         {
             if (name == "depends")
                 _depends = value;
+			else if (name == "if")
+				ifProperty = value;
+			else if (name == "unless")
+				unlessProperty = value;
             else
                 super.processAttribute(name, value);
         }
         
-        override protected function processAttributes(xmlList:XMLList, context:Object):void
-        {
-            super.processAttributes(xmlList, context);
-            context.currentTarget = this;
-        }
-        
         private var dependsList:Array;
         
         private function processDepends():Boolean
@@ -82,7 +74,7 @@ package org.apache.flex.ant.tags
             {
                 var depend:String = dependsList.shift();
                 var t:Target = project.getTarget(depend);
-                if (!t.execute(callbackMode))
+                if (!t.execute(callbackMode, context))
                 {
                     t.addEventListener(Event.COMPLETE, dependCompleteHandler);
                     return false;
@@ -99,8 +91,10 @@ package org.apache.flex.ant.tags
         
         private var inExecute:Boolean;
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
+			super.execute(callbackMode, context);
+			
             inExecute = true;
             this.callbackMode = callbackMode;
             if (_depends)
@@ -120,9 +114,8 @@ package org.apache.flex.ant.tags
         
         private function continueOnToSteps():Boolean
         {
-            if (!Ant.project.status)
+            if (!ant.project.status)
                 return true;
-            ant.processChildren(xml, context, this);
             return processSteps();
         }
         
@@ -130,6 +123,24 @@ package org.apache.flex.ant.tags
         
         private function processSteps():Boolean
         {
+			if (ifProperty != null)
+			{
+				if (!context.hasOwnProperty(ifProperty))
+				{
+					dispatchEvent(new Event(Event.COMPLETE));
+					return true;
+				}
+			}
+			
+			if (unlessProperty != null)
+			{
+				if (context.hasOwnProperty(unlessProperty))
+				{
+					dispatchEvent(new Event(Event.COMPLETE));
+					return true;
+				}
+			}
+			
             if (current == numChildren)
             {
                 dispatchEvent(new Event(Event.COMPLETE));
@@ -139,18 +150,12 @@ package org.apache.flex.ant.tags
             while (current < numChildren)
             {
                 var step:TaskHandler = getChildAt(current++) as TaskHandler;
-                if (step.ifProperty != null)
-                    if (!context.hasOwnProperty(step.ifProperty))
-                        continue;
-                if (step.unlessProperty != null)
-                    if (context.hasOwnProperty(step.unlessProperty))
-                        continue;
-                if (!step.execute(callbackMode))
+                if (!step.execute(callbackMode, context))
                 {
                     step.addEventListener(Event.COMPLETE, completeHandler);
                     return false;
                 }
-                if (!Ant.project.status)
+                if (!ant.project.status)
                 {
                     if (!inExecute)
                         dispatchEvent(new Event(Event.COMPLETE));
@@ -168,7 +173,7 @@ package org.apache.flex.ant.tags
 
         private function completeHandler(event:Event):void
         {
-            if (!Ant.project.status)
+            if (!ant.project.status)
             {
                 dispatchEvent(new Event(Event.COMPLETE));
                 return;                

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as b/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
index a7a27f2..ee119f1 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
@@ -62,9 +62,9 @@ package org.apache.flex.ant.tags
         
         private var destFile:File;
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
          
             var srcFile:File = File.applicationDirectory.resolvePath(src);
             destFile = File.applicationDirectory.resolvePath(dest);
@@ -105,7 +105,7 @@ package org.apache.flex.ant.tags
             var output:String = _process.standardError.readUTFBytes(_process.standardError.bytesAvailable);
             ant.output(output);
             if (failonerror)
-                Ant.project.status = false;
+                ant.project.status = false;
             dispatchEvent(new Event(Event.COMPLETE));
         }
         

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
index 3424ea7..6ae9d36 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
@@ -64,9 +64,9 @@ package org.apache.flex.ant.tags
         
         private var destFile:File;
         
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
          
             var srcFile:File = File.applicationDirectory.resolvePath(src);
             destFile = File.applicationDirectory.resolvePath(dest);
@@ -116,7 +116,7 @@ package org.apache.flex.ant.tags
                 
             } catch (error:Error) {
                 if (failonerror)
-                    Ant.project.status = false;
+                    ant.project.status = false;
             }
         }
         
@@ -135,7 +135,7 @@ package org.apache.flex.ant.tags
             fzip.removeEventListener(Event.COMPLETE, onUnzipComplete);            
             fzip.removeEventListener(ErrorEvent.ERROR, onUnzipError);
             if (failonerror)
-                Ant.project.status = false;
+                ant.project.status = false;
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as b/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
index f5f126d..9fda9b4 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/XmlProperty.as
@@ -40,13 +40,10 @@ package org.apache.flex.ant.tags
         {
         }
         
-        override public function init(xml:XML, context:Object, xmlProcessor:XMLTagProcessor):void
-        {
-            super.init(xml, context, xmlProcessor);
-        }
-        
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
+			super.execute(callbackMode, context);
+			
             var f:File = new File(fileName);
             var fs:FileStream = new FileStream();
             fs.open(f, FileMode.READ);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DataType.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DataType.as b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DataType.as
index 1efa665..16acca7 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DataType.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DataType.as
@@ -121,7 +121,7 @@ package org.apache.flex.ant.tags.filesetClasses
         protected function dieOnCircularReference(stack:Vector.<String> = null, project:Project = null):void
         {
             if (!project)
-                project = Ant.project;
+                project = Ant.currentAnt.project;
             
             if (!stack)
                 stack = new Vector.<String>();
@@ -190,7 +190,7 @@ package org.apache.flex.ant.tags.filesetClasses
         protected function getCheckedRef(p:Project = null):Object 
         {
             if (!p)
-                p = Ant.project;
+                p = Ant.currentAnt.project;
             return getCheckedRefActual(Class(ApplicationDomain.currentDomain.getDefinition(getQualifiedClassName(this))), 
                     getDataTypeName(), p);
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DirectoryScanner.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DirectoryScanner.as b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DirectoryScanner.as
index 379bb6c..3257fc9 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DirectoryScanner.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/DirectoryScanner.as
@@ -1135,7 +1135,7 @@ package org.apache.flex.ant.tags.filesetClasses
                             var msg:String = "IOException caught while checking "
                                 + "for links, couldn't get canonical path!";
                             // will be caught and redirected to Ant's logging system
-                            Ant.ant.output(msg);
+                            Ant.currentAnt.output(msg);
                             noLinks.push(newfiles[i]);
                         }
                     }
@@ -1171,7 +1171,7 @@ package org.apache.flex.ant.tags.filesetClasses
                             && causesIllegalSymlinkLoop(newfiles[i], dir,
                                 directoryNamesFollowed)) {
                             // will be caught and redirected to Ant's logging system
-                            Ant.ant.output("skipping symbolic link "
+                            Ant.currentAnt.output("skipping symbolic link "
                                 + file.nativePath
                                 + " -- too many levels of symbolic"
                                 + " links.");

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as
index 146b972..0c1d9e2 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/FileUtils.as
@@ -473,11 +473,11 @@ package org.apache.flex.ant.tags.filesetClasses
             from = normalize(from.nativePath);
             to = normalize(to.nativePath);
             if (!from.exists) {
-                Ant.ant.output("Cannot rename nonexistent file " + from);
+                Ant.currentAnt.output("Cannot rename nonexistent file " + from);
                 return;
             }
             if (from.nativePath == to.nativePath) {
-                Ant.ant.output("Rename of " + from + " to " + to + " is a no-op.");
+                Ant.currentAnt.output("Rename of " + from + " to " + to + " is a no-op.");
                 return;
             }
             if (to.exists)

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/TokenizedPath.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/TokenizedPath.as b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/TokenizedPath.as
index f9dc3d2..e5f8c3d 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/TokenizedPath.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/filesetClasses/TokenizedPath.as
@@ -152,7 +152,7 @@ package org.apache.flex.ant.tags.filesetClasses
                     var msg:String = "IOException caught while checking "
                         + "for links, couldn't get canonical path!";
                     // will be caught and redirected to Ant's logging system
-                    Ant.ant.output(msg);
+                    Ant.currentAnt.output(msg);
                 }
             }
             return false;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
index d35c8a2..9c3015b 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
@@ -43,13 +43,14 @@ package org.apache.flex.ant.tags.supportClasses
         
         /**
          *  Do the work.
-         *  TaskHandlers lazily create their children so
+         *  TaskHandlers lazily create their children
+		 *  and attributes so
          *  super.execute() should be called before
          *  doing any real work. 
          */
-        override public function execute(callbackMode:Boolean):Boolean
+        override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
-            super.execute(callbackMode);
+            super.execute(callbackMode, context);
             totalFiles = 0;
             thisFile = 0;
             for (var i:int = 0; i < numChildren; i++)
@@ -59,7 +60,7 @@ package org.apache.flex.ant.tags.supportClasses
                 {
                     try
                     {
-                        var list:Vector.<String> = fs.value as Vector.<String>;
+                        var list:Vector.<String> = fs.getValue(context) as Vector.<String>;
                         if (list)
                         {
                             totalFiles += list.length;
@@ -69,7 +70,7 @@ package org.apache.flex.ant.tags.supportClasses
                     {
                         if (failonerror)
                         {
-                            Ant.project.status = false;
+                            ant.project.status = false;
                             return true;
                         }
                     }
@@ -92,7 +93,7 @@ package org.apache.flex.ant.tags.supportClasses
                 var fs:FileSet = getChildAt(current++) as FileSet;
                 if (fs)
                 {
-                    var list:Vector.<String> = fs.value as Vector.<String>;
+                    var list:Vector.<String> = fs.getValue(context) as Vector.<String>;
                     if (list)
                     {
                         currentDir = new File(fs.dir);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/IValueTagHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/IValueTagHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/IValueTagHandler.as
index cc202b5..49b0fec 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/IValueTagHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/IValueTagHandler.as
@@ -25,6 +25,12 @@ package org.apache.flex.ant.tags.supportClasses
      */
     public interface IValueTagHandler extends ITagHandler
     {
-        function get value():Object;
+		/**
+		 *  Return a value based on the attributes and children.
+		 *  @param context Object A object of properties and values
+		 *  @return Object The computed value.  Often a Boolean but
+		 *  always.
+		 */
+        function getValue(context:Object):Object;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
index bfe3f6e..a264bc7 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/NamedTagHandler.as
@@ -34,6 +34,9 @@ package org.apache.flex.ant.tags.supportClasses
          */
         public function get name():String
         {
+			if (_name == null && xml != null)
+				_name = xml.@name.toString();
+			
             return _name;
         }
         

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
index 3b3b1d2..7834fe0 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TagHandler.as
@@ -42,7 +42,7 @@ package org.apache.flex.ant.tags.supportClasses
         protected var ant:Ant;
         
         /**
-         *  The context object.  Contains a project property referencing the project.
+         *  The context object.  Contains the properties that currently apply.
          */
         protected var context:Object;
         
@@ -54,12 +54,10 @@ package org.apache.flex.ant.tags.supportClasses
         /**
          *  @see org.apache.flex.xml.ITagHandler 
          */
-        public function init(xml:XML, context:Object, xmlProcessor:XMLTagProcessor):void
+        public function init(xml:XML, xmlProcessor:XMLTagProcessor):void
         {
             ant = xmlProcessor as Ant;
-            this.context = context;
             this.xml = xml;
-            processAttributes(xml.attributes(), context);
         }
         
         /**
@@ -80,7 +78,8 @@ package org.apache.flex.ant.tags.supportClasses
          *  @param value String The attribute value.
          */
         protected function processAttribute(name:String, value:String):void
-        {     
+        {
+			trace("unknown attribute:", name);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
index 6ee826b..38e3550 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/TaskHandler.as
@@ -30,9 +30,6 @@ package org.apache.flex.ant.tags.supportClasses
         
         public var failonerror:Boolean = true;
         
-        public var ifProperty:String;
-        public var unlessProperty:String;
-        
         protected var callbackMode:Boolean;
         
         /**
@@ -41,10 +38,12 @@ package org.apache.flex.ant.tags.supportClasses
          *  super.execute() should be called before
          *  doing any real work. 
          */
-        public function execute(callbackMode:Boolean):Boolean
+        public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             this.callbackMode = callbackMode;
-            ant.processChildren(this.xml, context, this);
+			this.context = context;
+			processAttributes(xml.attributes(), context);
+            ant.processChildren(xml, this);
             return true;
         }
         
@@ -52,10 +51,6 @@ package org.apache.flex.ant.tags.supportClasses
         {
             if (name == "failonerror")
                 failonerror = value == "true";
-            else if (name == "if")
-                ifProperty = value;
-            else if (name == "unless")
-                unlessProperty = value;
             else
                 super.processAttribute(name, value);
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/xml/ITagHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/xml/ITagHandler.as b/ant_on_air/src/org/apache/flex/xml/ITagHandler.as
index 36fde54..385d9db 100644
--- a/ant_on_air/src/org/apache/flex/xml/ITagHandler.as
+++ b/ant_on_air/src/org/apache/flex/xml/ITagHandler.as
@@ -26,9 +26,8 @@ package org.apache.flex.xml
         /**
          *  This method is called after the instance is created
          *  @param xml XML The XML node.
-         *  @param context Object An object containing useful information.
          *  @param tagProcessor The XMLTagProcessor that generated this instance.
          */
-        function init(xml:XML, context:Object, tagProcessor:XMLTagProcessor):void;
+        function init(xml:XML, tagProcessor:XMLTagProcessor):void;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/src/org/apache/flex/xml/XMLTagProcessor.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/xml/XMLTagProcessor.as b/ant_on_air/src/org/apache/flex/xml/XMLTagProcessor.as
index a666f7c..99f19c0 100644
--- a/ant_on_air/src/org/apache/flex/xml/XMLTagProcessor.as
+++ b/ant_on_air/src/org/apache/flex/xml/XMLTagProcessor.as
@@ -40,7 +40,7 @@ package org.apache.flex.xml
          *  @param context Object An object containing useful information.
          *  @return ITagHandler An instance representing this XML node
          */
-        public function processXMLTag(xml:XML, context:Object):ITagHandler
+        public function processXMLTag(xml:XML):ITagHandler
         {
             var tag:String = xml.name().toString();
             var c:Class = tagMap[tag];
@@ -50,7 +50,7 @@ package org.apache.flex.xml
                 throw new Error("no processor for " + tag);
             }
             var o:ITagHandler = new c() as ITagHandler;
-            o.init(xml, context, this);
+            o.init(xml, this);
             return o;
         }
         
@@ -61,7 +61,7 @@ package org.apache.flex.xml
          *  @param context Object An object containing useful information.
          *  @param parentTag IParentTagHandler The parent for the instances that are created.
          */
-        public function processChildren(xml:XML, context:Object, parentTag:IParentTagHandler):void
+        public function processChildren(xml:XML, parentTag:IParentTagHandler):void
         {
             var xmlList:XMLList = xml.children();
             var n:int = xmlList.length();
@@ -72,7 +72,7 @@ package org.apache.flex.xml
                     ITextTagHandler(parentTag).setText(xmlList[i].toString());
                 else
                 {
-                    var tagHandler:ITagHandler = processXMLTag(xmlList[i], context);
+                    var tagHandler:ITagHandler = processXMLTag(xmlList[i]);
                     parentTag.addChild(tagHandler);
                 }
             }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/tests/AntTest.mxml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/AntTest.mxml b/ant_on_air/tests/AntTest.mxml
index 670ccf4..6e60e05 100644
--- a/ant_on_air/tests/AntTest.mxml
+++ b/ant_on_air/tests/AntTest.mxml
@@ -85,13 +85,13 @@ limitations under the License.
             
             private function completeHandler(event:Event):void
             {
-                if (Ant.project.status)
+                if (Ant.currentAnt.project.status)
                     output("SUCCESS!");
                 else
                     output("FAILURE!");
                 
                 if (exitwhendone)
-                    NativeApplication.nativeApplication.exit(Ant.project.status ? 0 : 255);
+                    NativeApplication.nativeApplication.exit(Ant.currentAnt.project.status ? 0 : 255);
             }
             
             private var ant:Ant;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4b53170a/ant_on_air/tests/test.xml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/test.xml b/ant_on_air/tests/test.xml
index edab88c..46e2d74 100644
--- a/ant_on_air/tests/test.xml
+++ b/ant_on_air/tests/test.xml
@@ -134,7 +134,7 @@
             </condition>
         </fail>
         <mkdir dir="${basedir}/temp/untar" />
-        <untar src="${basedir}/temp/apache-rat-0.10-src.tar.gz" dest="${basedir}/temp/untar" if="isMac" />
+        <untar src="${basedir}/temp/apache-rat-0.10-src.tar.gz" dest="${basedir}/temp/untar" />
         <fail message="untar did not result in expected files">
             <condition>
                 <not>
@@ -170,7 +170,7 @@
                 <equals arg1="${replacedkey1}" arg2="somevalue1" />
             </condition>
         </fail>
-        <input message="Ok to delete temp directory?" unless="exitwhendone"
+        <input message="Ok to delete temp directory?"
             validargs="yn"
             addproperty="oktodelete" />
         <fail message="you were supposed to hit 'y'" >


[8/8] git commit: [flex-utilities] [refs/heads/develop] - add output that looks more like Ant output

Posted by ah...@apache.org.
add output that looks more like Ant output


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/e4f33bbc
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/e4f33bbc
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/e4f33bbc

Branch: refs/heads/develop
Commit: e4f33bbca81a99387153ada7ce2938763ac95036
Parents: da4707d
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 23 22:48:05 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 23 22:48:05 2013 -0800

----------------------------------------------------------------------
 ant_on_air/build.xml                            |  2 ++
 ant_on_air/locale/en_US/ant.properties          | 30 ++++++++++++++++++++
 ant_on_air/src/org/apache/flex/ant/Ant.as       |  9 ++++++
 ant_on_air/src/org/apache/flex/ant/tags/Copy.as | 14 +++++++++
 .../src/org/apache/flex/ant/tags/Delete.as      | 14 +++++++--
 ant_on_air/src/org/apache/flex/ant/tags/Echo.as |  2 +-
 ant_on_air/src/org/apache/flex/ant/tags/Get.as  |  8 ++++++
 .../src/org/apache/flex/ant/tags/Input.as       |  6 ++--
 .../src/org/apache/flex/ant/tags/Mkdir.as       |  5 ++++
 .../src/org/apache/flex/ant/tags/Target.as      |  1 +
 .../src/org/apache/flex/ant/tags/Touch.as       |  8 +++++-
 .../src/org/apache/flex/ant/tags/Untar.as       |  9 +++++-
 .../src/org/apache/flex/ant/tags/Unzip.as       |  7 +++++
 .../tags/supportClasses/FileSetTaskHandler.as   |  7 +++++
 ant_on_air/tests/AntOnAir.mxml                  |  2 +-
 15 files changed, 116 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/build.xml
----------------------------------------------------------------------
diff --git a/ant_on_air/build.xml b/ant_on_air/build.xml
index 3f0997d..cc64242 100644
--- a/ant_on_air/build.xml
+++ b/ant_on_air/build.xml
@@ -97,6 +97,7 @@
             fork="true"
             maxmemory="512m">
             <source-path path-element="${SOURCE_DIR}"/>
+            <source-path path-element="${basedir}/locale/{locale}"/>
 			<load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
             <external-library-path file="${AIR_HOME}/frameworks/libs/air/airglobal.swc" append="true"/>
             <external-library-path file="${basedir}/../installer/libs" append="true"/>
@@ -125,6 +126,7 @@
             maxmemory="512m">
 			<load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
             <source-path path-element="${SOURCE_DIR}"/>
+            <source-path path-element="${basedir}/locale/{locale}"/>
             <library-path file="${basedir}/../installer/libs" append="true"/>
 		</mxmlc>
         <delete dir="${basedir}/tests/temp" failonerror="false" />

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/locale/en_US/ant.properties
----------------------------------------------------------------------
diff --git a/ant_on_air/locale/en_US/ant.properties b/ant_on_air/locale/en_US/ant.properties
new file mode 100644
index 0000000..a6a352c
--- /dev/null
+++ b/ant_on_air/locale/en_US/ant.properties
@@ -0,0 +1,30 @@
+<?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.
+
+-->
+
+MKDIR=Created dir: %1
+COPY=Copying %1 file to %2
+COPYFILES=Copying %1 files to %2
+DELETEFILE=Deleting: %1
+DELETEDIR=Deleting directory %1
+GETTING=Getting: %1
+GETTO=To: %1
+TOUCH=Creating %1
+UNZIP=Expanding: %1 into %2
+

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/Ant.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/Ant.as b/ant_on_air/src/org/apache/flex/ant/Ant.as
index 2dbfc8e..dc81fe2 100644
--- a/ant_on_air/src/org/apache/flex/ant/Ant.as
+++ b/ant_on_air/src/org/apache/flex/ant/Ant.as
@@ -191,6 +191,15 @@ package org.apache.flex.ant
             }
             return input;
         }
+		
+		public static const spaces:String = "           ";
+		
+		public function formatOutput(tag:String, data:String):String
+		{
+			var s:String = spaces.substr(0, Math.max(spaces.length - tag.length - 2, 0)) +
+				"[" + tag + "] " + data;
+			return s;
+		}
         
 		public static function log(s:String, level:int):void
 		{

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as b/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
index 32f66c4..e279918 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Copy.as
@@ -21,11 +21,13 @@ package org.apache.flex.ant.tags
     import flash.filesystem.File;
     
     import mx.core.IFlexModuleFactory;
+    import mx.resources.ResourceManager;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.FileSetTaskHandler;
     import org.apache.flex.xml.ITagHandler;
     
+	[ResourceBundle("ant")]
     [Mixin]
     public class Copy extends FileSetTaskHandler
     {
@@ -119,6 +121,14 @@ package org.apache.flex.ant.tags
             srcFile.copyTo(destFile, overwrite);
         }
         
+		override protected function outputTotal(total:int):void
+		{
+			var s:String = ResourceManager.getInstance().getString('ant', 'COPYFILES');
+			s = s.replace("%1", total.toString());
+			s = s.replace("%2", toDirName);
+			ant.output(ant.formatOutput("copy", s));
+		}
+		
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             var retVal:Boolean = super.execute(callbackMode, context);
@@ -131,6 +141,10 @@ package org.apache.flex.ant.tags
             //var resolveName:String = destFile.nativePath.substr(destFile.nativePath.lastIndexOf(File.separator) + 1);
             //destDir.resolvePath(resolveName);
             
+			var s:String = ResourceManager.getInstance().getString('ant', 'COPY');
+			s = s.replace("%1", "1");
+			s = s.replace("%2", destFile.nativePath);
+			ant.output(ant.formatOutput("copy", s));
             srcFile.copyTo(destFile, overwrite);
             return true;
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as b/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
index cae5795..d558e38 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Delete.as
@@ -21,10 +21,12 @@ package org.apache.flex.ant.tags
     import flash.filesystem.File;
     
     import mx.core.IFlexModuleFactory;
+    import mx.resources.ResourceManager;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.FileSetTaskHandler;
     
+	[ResourceBundle("ant")]
     [Mixin]
     public class Delete extends FileSetTaskHandler
     {
@@ -61,21 +63,29 @@ package org.apache.flex.ant.tags
             else
                 delFile.deleteFile();
         }
-        
+		
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             var retVal:Boolean = super.execute(callbackMode, context);
             if (numChildren > 0)
                 return retVal;
-            
+
+			var s:String;
+			
             if (fileName)
             {
                 var delFile:File = File.applicationDirectory.resolvePath(fileName);
+				s = ResourceManager.getInstance().getString('ant', 'DELETEFILE');
+				s = s.replace("%1", delFile.nativePath);
+				ant.output(ant.formatOutput("delete", s));
                 delFile.deleteFile();
             }
             else if (dirName)
             {
                 var delDir:File = File.applicationDirectory.resolvePath(dirName);
+				s = ResourceManager.getInstance().getString('ant', 'DELETEDIR');
+				s = s.replace("%1", delDir.nativePath);
+				ant.output(ant.formatOutput("delete", s));
                 delDir.deleteDirectory(true);
             }            
             return true;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as b/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
index 349671c..2b17bf6 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Echo.as
@@ -72,7 +72,7 @@ package org.apache.flex.ant.tags
 				fs.close();
 			}
 			else
-	            ant.output(ant.getValue(text, context));
+	            ant.output(ant.formatOutput("echo", ant.getValue(text, context)));
             return true;
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Get.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Get.as b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
index 80ad7c3..fc15729 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Get.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Get.as
@@ -31,10 +31,12 @@ package org.apache.flex.ant.tags
     import flash.utils.ByteArray;
     
     import mx.core.IFlexModuleFactory;
+    import mx.resources.ResourceManager;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
     
+	[ResourceBundle("ant")]
     [Mixin]
     public class Get extends TaskHandler
     {
@@ -75,6 +77,12 @@ package org.apache.flex.ant.tags
                 if (destFile.exists)
                     return true;
             }
+			var s:String = ResourceManager.getInstance().getString('ant', 'GETTING');
+			s = s.replace("%1", src);
+			ant.output(ant.formatOutput("get", s));
+			s = ResourceManager.getInstance().getString('ant', 'GETTO');
+			s = s.replace("%1", getDestFile().nativePath);
+			ant.output(ant.formatOutput("get", s));
             
             urlLoader = new URLLoader();
             urlLoader.load(new URLRequest(src));

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Input.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Input.as b/ant_on_air/src/org/apache/flex/ant/tags/Input.as
index 3d90ba6..f5808f4 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Input.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Input.as
@@ -64,10 +64,12 @@ package org.apache.flex.ant.tags
         override public function execute(callbackMode:Boolean, context:Object):Boolean
         {
             super.execute(callbackMode, context);
+			var s:String = "";
             if (text)
-                ant.output(ant.getValue(text, context));
+                s += ant.getValue(text, context);
             if (validArgs)
-                ant.output("[" + validArgs + "]");
+                s += " (" + validArgs + ")";
+			ant.output(ant.formatOutput("input", s));
             ant.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
             return false;
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as b/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
index 1ff1c09..2751e45 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Mkdir.as
@@ -21,10 +21,12 @@ package org.apache.flex.ant.tags
     import flash.filesystem.File;
     
     import mx.core.IFlexModuleFactory;
+	import mx.resources.ResourceManager;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
     
+	[ResourceBundle("ant")]
     [Mixin]
     public class Mkdir extends TaskHandler
     {
@@ -50,6 +52,9 @@ package org.apache.flex.ant.tags
             var dir:File = new File(_dir);
             dir.createDirectory();
             
+			var s:String = ResourceManager.getInstance().getString('ant', 'MKDIR');
+			s = s.replace("%1", dir.nativePath);
+			ant.output(ant.formatOutput("mkdir", s));
             return true;
         }
         

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Target.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Target.as b/ant_on_air/src/org/apache/flex/ant/tags/Target.as
index b61eb10..327760e 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Target.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Target.as
@@ -114,6 +114,7 @@ package org.apache.flex.ant.tags
         {
             if (!ant.project.status)
                 return true;
+			ant.output("\n" + name + ":");
             return processSteps();
         }
         

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Touch.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Touch.as b/ant_on_air/src/org/apache/flex/ant/tags/Touch.as
index e898cc3..8ee1a0c 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Touch.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Touch.as
@@ -23,10 +23,12 @@ package org.apache.flex.ant.tags
     import flash.filesystem.FileStream;
     
     import mx.core.IFlexModuleFactory;
+    import mx.resources.ResourceManager;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
     
+	[ResourceBundle("ant")]
     [Mixin]
     public class Touch extends TaskHandler
     {
@@ -44,7 +46,11 @@ package org.apache.flex.ant.tags
             super.execute(callbackMode, context);
 			
             var f:File = new File(fileName);
-            var fs:FileStream = new FileStream();
+			var s:String = ResourceManager.getInstance().getString('ant', 'TOUCH');
+			s = s.replace("%1", f.nativePath);
+			ant.output(ant.formatOutput("touch", s));
+
+			var fs:FileStream = new FileStream();
             fs.open(f, FileMode.APPEND);
             fs.close();
             return true;

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as b/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
index fd9458c..dd228fb 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Untar.as
@@ -27,10 +27,12 @@ package org.apache.flex.ant.tags
     import flash.system.Capabilities;
     
     import mx.core.IFlexModuleFactory;
+    import mx.resources.ResourceManager;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
     
+	[ResourceBundle("ant")]
     [Mixin]
     public class Untar extends TaskHandler
     {
@@ -93,7 +95,12 @@ package org.apache.flex.ant.tags
             startupInfo.executable = tar;
             startupInfo.arguments = arguments;
             
-            _process = new NativeProcess();
+			var s:String = ResourceManager.getInstance().getString('ant', 'UNZIP');
+			s = s.replace("%1", source.nativePath);
+			s = s.replace("%2", destFile.nativePath);
+			ant.output(ant.formatOutput("untar", s));
+
+			_process = new NativeProcess();
             _process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, unTarFileProgress);
             _process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, unTarError);
             _process.addEventListener(NativeProcessExitEvent.EXIT, unTarComplete);

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
index 959eca9..009d29b 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/Unzip.as
@@ -26,6 +26,7 @@ package org.apache.flex.ant.tags
     import flash.utils.ByteArray;
     
     import mx.core.IFlexModuleFactory;
+    import mx.resources.ResourceManager;
     
     import org.apache.flex.ant.Ant;
     import org.apache.flex.ant.tags.supportClasses.TaskHandler;
@@ -34,6 +35,7 @@ package org.apache.flex.ant.tags
     import org.as3commons.zip.ZipEvent;
     import org.as3commons.zip.ZipFile;
     
+	[ResourceBundle("ant")]
     [Mixin]
     public class Unzip extends TaskHandler
     {
@@ -85,6 +87,11 @@ package org.apache.flex.ant.tags
             var srcFile:File = File.applicationDirectory.resolvePath(src);
             destFile = File.applicationDirectory.resolvePath(dest);
 
+			var s:String = ResourceManager.getInstance().getString('ant', 'UNZIP');
+			s = s.replace("%1", srcFile.nativePath);
+			s = s.replace("%2", destFile.nativePath);
+			ant.output(ant.formatOutput("unzip", s));
+			
             unzip(srcFile);
             return true;
         }

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
----------------------------------------------------------------------
diff --git a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
index d9d449b..5e1f1c8 100644
--- a/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
+++ b/ant_on_air/src/org/apache/flex/ant/tags/supportClasses/FileSetTaskHandler.as
@@ -75,10 +75,17 @@ package org.apache.flex.ant.tags.supportClasses
                     }
                 }
             }
+			if (numChildren)
+				outputTotal(totalFiles);
             actOnFileSets();
             return !callbackMode;
         }
         
+		protected function outputTotal(total:int):void
+		{
+			
+		}
+		
         private function actOnFileSets():void
         {
             if (current == numChildren)

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/e4f33bbc/ant_on_air/tests/AntOnAir.mxml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/AntOnAir.mxml b/ant_on_air/tests/AntOnAir.mxml
index a19c4fa..040b923 100644
--- a/ant_on_air/tests/AntOnAir.mxml
+++ b/ant_on_air/tests/AntOnAir.mxml
@@ -140,6 +140,6 @@ limitations under the License.
     <s:layout>
         <s:VerticalLayout />
     </s:layout>
-    <mx:TextArea id="console" width="100%" height="100%" />
+    <mx:TextArea id="console" width="100%" height="100%" fontFamily="Courier New" />
     <mx:ProgressBar id="pb" width="100%" mode="event" label="" />
 </s:WindowedApplication>
\ No newline at end of file


[7/8] git commit: [flex-utilities] [refs/heads/develop] - rename test app to AntOnAIR and make it function more lke ant command line

Posted by ah...@apache.org.
rename test app to AntOnAIR and make it function more lke ant command line


Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/da4707d5
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/da4707d5
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/da4707d5

Branch: refs/heads/develop
Commit: da4707d5de38f8738fdf0e2d97eda28c59ccf4ad
Parents: 56973c6
Author: Alex Harui <ah...@apache.org>
Authored: Mon Dec 23 18:19:01 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Dec 23 18:19:01 2013 -0800

----------------------------------------------------------------------
 ant_on_air/build.xml              |  15 +-
 ant_on_air/tests/AntOnAir-app.xml | 251 +++++++++++++++++++++++++++++++++
 ant_on_air/tests/AntOnAir.mxml    | 145 +++++++++++++++++++
 ant_on_air/tests/AntTest-app.xml  | 251 ---------------------------------
 ant_on_air/tests/AntTest.mxml     | 126 -----------------
 5 files changed, 406 insertions(+), 382 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/da4707d5/ant_on_air/build.xml
----------------------------------------------------------------------
diff --git a/ant_on_air/build.xml b/ant_on_air/build.xml
index 5f06203..3f0997d 100644
--- a/ant_on_air/build.xml
+++ b/ant_on_air/build.xml
@@ -117,8 +117,8 @@
             <source-path path-element="${SOURCE_DIR}"/>
 		</mxmlc>
         -->
-		<mxmlc file="${basedir}/tests/AntTest.mxml"
-			output="${basedir}/tests/AntTest.swf"
+		<mxmlc file="${basedir}/tests/AntOnAir.mxml"
+			output="${basedir}/tests/AntOnAir.swf"
 			debug="${DEBUG_FLAG}"
 			failonerror="true"
             fork="true"
@@ -131,9 +131,11 @@
         <exec executable="${AIR_HOME}/bin/${adl}" dir="${basedir}/tests" failonerror="true">
             <arg value="-runtime" />
             <arg value="${AIR_HOME}/runtimes/air/${runtime}" />
-            <arg value="${basedir}/tests/AntTest-app.xml" />
+            <arg value="${basedir}/tests/AntOnAir-app.xml" />
             <arg value="--" />
-            <arg value="exitwhendone" />
+            <arg value="-f ${basedir}/tests/test.xml" />
+            <arg value="-Dexitwhendone" />
+            <arg value="test" />
         </exec>
     </target>
 
@@ -142,7 +144,10 @@
         <exec executable="${AIR_HOME}/bin/${adl}" dir="${basedir}/tests" failonerror="true">
             <arg value="-runtime" />
             <arg value="${AIR_HOME}/runtimes/air/${runtime}" />
-            <arg value="${basedir}/tests/AntTest-app.xml" />
+            <arg value="${basedir}/tests/AntOnAir-app.xml" />
+            <arg value="--" />
+            <arg value="-f ${basedir}/tests/test.xml" />
+            <arg value="test" />
         </exec>
     </target>
 </project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/da4707d5/ant_on_air/tests/AntOnAir-app.xml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/AntOnAir-app.xml b/ant_on_air/tests/AntOnAir-app.xml
new file mode 100644
index 0000000..2894c1c
--- /dev/null
+++ b/ant_on_air/tests/AntOnAir-app.xml
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--
+
+  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.
+
+-->
+<application xmlns="http://ns.adobe.com/air/application/3.4">
+
+<!-- Adobe AIR Application Descriptor File Template.
+
+	Specifies parameters for identifying, installing, and launching AIR applications.
+
+	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.1
+			The last segment of the namespace specifies the version 
+			of the AIR runtime required for this application to run.
+			
+	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
+			the application. Optional.
+-->
+
+	<!-- A universally unique application identifier. Must be unique across all AIR applications.
+	Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
+	<id>AntOnAir</id>
+
+	<!-- Used as the filename for the application. Required. -->
+	<filename>AntonAir</filename>
+
+	<!-- The name that is displayed in the AIR application installer. 
+	May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<name>AntonAir</name>
+	
+	<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. 
+	Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
+	An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
+	<versionNumber>0.0.0</versionNumber>
+		         
+	<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
+	<!-- <versionLabel></versionLabel> -->
+
+	<!-- Description, displayed in the AIR application installer.
+	May have multiple values for each language. See samples or xsd schema file. Optional. -->
+	<!-- <description></description> -->
+
+	<!-- Copyright information. Optional -->
+	<!-- <copyright></copyright> -->
+
+	<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
+	<!-- <publisherID></publisherID> -->
+
+	<!-- Settings for the application's initial window. Required. -->
+	<initialWindow>
+		<!-- The main SWF or HTML file of the application. Required. -->
+		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
+		<content>AntonAir.swf</content>
+		
+		<!-- The title of the main window. Optional. -->
+		<!-- <title></title> -->
+
+		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
+		<!-- <systemChrome></systemChrome> -->
+
+		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
+		<!-- <transparent></transparent> -->
+
+		<!-- Whether the window is initially visible. Optional. Default false. -->
+		<!-- <visible></visible> -->
+
+		<!-- Whether the user can minimize the window. Optional. Default true. -->
+		<!-- <minimizable></minimizable> -->
+
+		<!-- Whether the user can maximize the window. Optional. Default true. -->
+		<!-- <maximizable></maximizable> -->
+
+		<!-- Whether the user can resize the window. Optional. Default true. -->
+		<!-- <resizable></resizable> -->
+
+		<!-- The window's initial width in pixels. Optional. -->
+		<!-- <width></width> -->
+
+		<!-- The window's initial height in pixels. Optional. -->
+		<!-- <height></height> -->
+
+		<!-- The window's initial x position. Optional. -->
+		<!-- <x></x> -->
+
+		<!-- The window's initial y position. Optional. -->
+		<!-- <y></y> -->
+
+		<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
+		<!-- <minSize></minSize> -->
+
+		<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
+		<!-- <maxSize></maxSize> -->
+
+        <!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape"). Optional. Mobile only. Default is the natural orientation of the device -->
+
+        <!-- <aspectRatio></aspectRatio> -->
+
+        <!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
+
+        <!-- <autoOrients></autoOrients> -->
+
+        <!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
+
+        <!-- <fullScreen></fullScreen> -->
+
+        <!-- The render mode for the app (either auto, cpu, gpu, or direct). Optional. Default auto -->
+
+        <!-- <renderMode></renderMode> -->
+
+		<!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none").  Optional.  Defaults "pan." -->
+		<!-- <softKeyboardBehavior></softKeyboardBehavior> -->
+	<autoOrients>false</autoOrients>
+        <fullScreen>false</fullScreen>
+        <visible>false</visible>
+    </initialWindow>
+
+	<!-- We recommend omitting the supportedProfiles element, -->
+	<!-- which in turn permits your application to be deployed to all -->
+	<!-- devices supported by AIR. If you wish to restrict deployment -->
+	<!-- (i.e., to only mobile devices) then add this element and list -->
+	<!-- only the profiles which your application does support. -->
+	<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
+	<supportedProfiles>extendedDesktop</supportedProfiles> -->
+
+	<!-- The subpath of the standard default installation location to use. Optional. -->
+	<!-- <installFolder></installFolder> -->
+
+	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
+	<!-- <programMenuFolder></programMenuFolder> -->
+
+	<!-- The icon the system uses for the application. For at least one resolution,
+	specify the path to a PNG file included in the AIR package. Optional. -->
+	<!-- <icon>
+		<image16x16></image16x16>
+		<image32x32></image32x32>
+		<image36x36></image36x36>
+		<image48x48></image48x48>
+		<image57x57></image57x57>
+		<image72x72></image72x72>
+		<image114x114></image114x114>
+		<image128x128></image128x128>
+	</icon> -->
+
+	<!-- Whether the application handles the update when a user double-clicks an update version
+	of the AIR file (true), or the default AIR application installer handles the update (false).
+	Optional. Default false. -->
+	<!-- <customUpdateUI></customUpdateUI> -->
+	
+	<!-- Whether the application can be launched when the user clicks a link in a web browser.
+	Optional. Default false. -->
+	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
+
+	<!-- Listing of file types for which the application can register. Optional. -->
+	<!-- <fileTypes> -->
+
+		<!-- Defines one file type. Optional. -->
+		<!-- <fileType> -->
+
+			<!-- The name that the system displays for the registered file type. Required. -->
+			<!-- <name></name> -->
+
+			<!-- The extension to register. Required. -->
+			<!-- <extension></extension> -->
+			
+			<!-- The description of the file type. Optional. -->
+			<!-- <description></description> -->
+			
+			<!-- The MIME content type. -->
+			<!-- <contentType></contentType> -->
+			
+			<!-- The icon to display for the file type. Optional. -->
+			<!-- <icon>
+				<image16x16></image16x16>
+				<image32x32></image32x32>
+				<image48x48></image48x48>
+				<image128x128></image128x128>
+			</icon> -->
+			
+		<!-- </fileType> -->
+	<!-- </fileTypes> -->
+
+    <!-- iOS specific capabilities -->
+	<!-- <iPhone> -->
+		<!-- A list of plist key/value pairs to be added to the application Info.plist -->
+		<!-- <InfoAdditions>
+            <![CDATA[
+                <key>UIDeviceFamily</key>
+                <array>
+                    <string>1</string>
+                    <string>2</string>
+                </array>
+                <key>UIStatusBarStyle</key>
+                <string>UIStatusBarStyleBlackOpaque</string>
+                <key>UIRequiresPersistentWiFi</key>
+                <string>YES</string>
+            ]]>
+        </InfoAdditions> -->
+        <!-- A list of plist key/value pairs to be added to the application Entitlements.plist -->
+		<!-- <Entitlements>
+            <![CDATA[
+                <key>keychain-access-groups</key>
+                <array>
+                    <string></string>
+                    <string></string>
+                </array>
+            ]]>
+        </Entitlements> -->
+	<!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" -->
+	<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
+	<!-- </iPhone> -->
+
+	<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
+    <!--<android> -->
+    <!--	<manifestAdditions>
+		<![CDATA[
+			<manifest android:installLocation="auto">
+				<uses-permission android:name="android.permission.INTERNET"/>
+				<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+				<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+				<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
+				<application android:enabled="true">
+					<activity android:excludeFromRecents="false">
+						<intent-filter>
+							<action android:name="android.intent.action.MAIN"/>
+							<category android:name="android.intent.category.LAUNCHER"/>
+						</intent-filter>
+					</activity>
+				</application>
+            </manifest>
+		]]>
+        </manifestAdditions> -->
+	    <!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
+        <!-- <colorDepth></colorDepth> -->
+    <!-- </android> -->
+	<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
+
+</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/da4707d5/ant_on_air/tests/AntOnAir.mxml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/AntOnAir.mxml b/ant_on_air/tests/AntOnAir.mxml
new file mode 100644
index 0000000..a19c4fa
--- /dev/null
+++ b/ant_on_air/tests/AntOnAir.mxml
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:local="*"
+                   xmlns:mx="library://ns.adobe.com/flex/mx"
+                   xmlns:s="library://ns.adobe.com/flex/spark" 
+                   invoke="checkargs(event)"
+                   >
+    <fx:Script>
+        <![CDATA[
+            // in theory, all new tags are added to AntClasses.as
+            // and therefore force-linking this should initialize
+            // all tag handlers
+            import AntClasses; AntClasses;
+            import org.apache.flex.ant.Ant;
+            import org.apache.flex.ant.tags.Copy;
+            import org.apache.flex.ant.tags.Get;
+            import org.apache.flex.ant.tags.Checksum;
+            
+            private function checkargs(event:InvokeEvent):void
+            {
+				var targets:Array = [];
+				
+                for each (var s:String in event.arguments)
+				{
+					if (s.indexOf("-f ") != -1)
+					{
+						antfilename = s.substr(3);
+					}
+					else if (s.indexOf("-D") != -1)
+					{
+						s = s.substr(2);
+						var c:int = s.indexOf("=");
+						if (c != -1)
+						{
+							var parts:Array = s.split("=");
+							context[parts[0]] = parts[1];
+						}
+						else
+							context[s] = true;
+					}
+					else
+						targets.push(s);
+				}
+				context.targets = targets.join(",");
+                test();
+            }
+            
+			private var context:Object = {};
+			
+			private var antfilename:String = "build.xml";
+			
+            public function test():void
+            {
+                ant = new Ant();
+                ant.output = output;
+                var file:File = File.applicationDirectory;
+                file = file.resolvePath(antfilename);
+                addEventListener(Event.ENTER_FRAME, enterFrameHandler);
+                if (!ant.processXMLFile(file, context, true))
+                {
+                    ant.addEventListener(Event.COMPLETE, completeHandler);
+                    ant.addEventListener(ProgressEvent.PROGRESS, progressEventHandler);
+                    // redispatch keyboard events off of ant so input task can see them
+                    systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, ant_keyDownHandler);
+                    pb.source = ant;
+                }
+                else
+                    completeHandler(null);
+            }
+            
+            private function progressEventHandler(event:ProgressEvent):void
+            {
+                if (ant.progressClass is Copy)
+                {
+                    pb.label = "Copying %1 of %2";
+                }
+                else if (ant.progressClass is Get)
+                {
+                    pb.label = "Downloading bytes %1 of %2";                    
+                }
+                else if (ant.progressClass is Checksum)
+                {
+                    pb.label = "Computing checksum: bytes %1 of %2";                    
+                }
+            }
+            
+            private function completeHandler(event:Event):void
+            {
+                if (Ant.currentAnt.project.status)
+                    output("SUCCESS!");
+                else
+                    output("FAILURE!");
+                
+                if (context.exitwhendone)
+                    NativeApplication.nativeApplication.exit(Ant.currentAnt.project.status ? 0 : 255);
+            }
+            
+            private var ant:Ant;
+            
+            private function output(s:String):void
+            {
+                console.text += s + "\n";
+                callLater(scrollConsoleToBottom);
+            }
+            
+            private function scrollConsoleToBottom():void
+            {
+                console.verticalScrollPosition = console.maxVerticalScrollPosition;
+            }
+            
+            private function enterFrameHandler(event:Event):void
+            {
+                ant.doCallback();
+            }
+            
+            private function ant_keyDownHandler(event:KeyboardEvent):void
+            {
+                ant.dispatchEvent(event);
+            }
+        ]]>
+    </fx:Script>
+    <s:layout>
+        <s:VerticalLayout />
+    </s:layout>
+    <mx:TextArea id="console" width="100%" height="100%" />
+    <mx:ProgressBar id="pb" width="100%" mode="event" label="" />
+</s:WindowedApplication>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/da4707d5/ant_on_air/tests/AntTest-app.xml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/AntTest-app.xml b/ant_on_air/tests/AntTest-app.xml
deleted file mode 100644
index 64cfd4e..0000000
--- a/ant_on_air/tests/AntTest-app.xml
+++ /dev/null
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="no"?>
-<!--
-
-  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.
-
--->
-<application xmlns="http://ns.adobe.com/air/application/3.4">
-
-<!-- Adobe AIR Application Descriptor File Template.
-
-	Specifies parameters for identifying, installing, and launching AIR applications.
-
-	xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.1
-			The last segment of the namespace specifies the version 
-			of the AIR runtime required for this application to run.
-			
-	minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
-			the application. Optional.
--->
-
-	<!-- A universally unique application identifier. Must be unique across all AIR applications.
-	Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
-	<id>AntTest</id>
-
-	<!-- Used as the filename for the application. Required. -->
-	<filename>AntTest</filename>
-
-	<!-- The name that is displayed in the AIR application installer. 
-	May have multiple values for each language. See samples or xsd schema file. Optional. -->
-	<name>AntTest</name>
-	
-	<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. 
-	Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
-	An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
-	<versionNumber>0.0.0</versionNumber>
-		         
-	<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
-	<!-- <versionLabel></versionLabel> -->
-
-	<!-- Description, displayed in the AIR application installer.
-	May have multiple values for each language. See samples or xsd schema file. Optional. -->
-	<!-- <description></description> -->
-
-	<!-- Copyright information. Optional -->
-	<!-- <copyright></copyright> -->
-
-	<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
-	<!-- <publisherID></publisherID> -->
-
-	<!-- Settings for the application's initial window. Required. -->
-	<initialWindow>
-		<!-- The main SWF or HTML file of the application. Required. -->
-		<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
-		<content>AntTest.swf</content>
-		
-		<!-- The title of the main window. Optional. -->
-		<!-- <title></title> -->
-
-		<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
-		<!-- <systemChrome></systemChrome> -->
-
-		<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
-		<!-- <transparent></transparent> -->
-
-		<!-- Whether the window is initially visible. Optional. Default false. -->
-		<!-- <visible></visible> -->
-
-		<!-- Whether the user can minimize the window. Optional. Default true. -->
-		<!-- <minimizable></minimizable> -->
-
-		<!-- Whether the user can maximize the window. Optional. Default true. -->
-		<!-- <maximizable></maximizable> -->
-
-		<!-- Whether the user can resize the window. Optional. Default true. -->
-		<!-- <resizable></resizable> -->
-
-		<!-- The window's initial width in pixels. Optional. -->
-		<!-- <width></width> -->
-
-		<!-- The window's initial height in pixels. Optional. -->
-		<!-- <height></height> -->
-
-		<!-- The window's initial x position. Optional. -->
-		<!-- <x></x> -->
-
-		<!-- The window's initial y position. Optional. -->
-		<!-- <y></y> -->
-
-		<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
-		<!-- <minSize></minSize> -->
-
-		<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
-		<!-- <maxSize></maxSize> -->
-
-        <!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape"). Optional. Mobile only. Default is the natural orientation of the device -->
-
-        <!-- <aspectRatio></aspectRatio> -->
-
-        <!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
-
-        <!-- <autoOrients></autoOrients> -->
-
-        <!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
-
-        <!-- <fullScreen></fullScreen> -->
-
-        <!-- The render mode for the app (either auto, cpu, gpu, or direct). Optional. Default auto -->
-
-        <!-- <renderMode></renderMode> -->
-
-		<!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none").  Optional.  Defaults "pan." -->
-		<!-- <softKeyboardBehavior></softKeyboardBehavior> -->
-	<autoOrients>false</autoOrients>
-        <fullScreen>false</fullScreen>
-        <visible>false</visible>
-    </initialWindow>
-
-	<!-- We recommend omitting the supportedProfiles element, -->
-	<!-- which in turn permits your application to be deployed to all -->
-	<!-- devices supported by AIR. If you wish to restrict deployment -->
-	<!-- (i.e., to only mobile devices) then add this element and list -->
-	<!-- only the profiles which your application does support. -->
-	<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
-	<supportedProfiles>extendedDesktop</supportedProfiles> -->
-
-	<!-- The subpath of the standard default installation location to use. Optional. -->
-	<!-- <installFolder></installFolder> -->
-
-	<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
-	<!-- <programMenuFolder></programMenuFolder> -->
-
-	<!-- The icon the system uses for the application. For at least one resolution,
-	specify the path to a PNG file included in the AIR package. Optional. -->
-	<!-- <icon>
-		<image16x16></image16x16>
-		<image32x32></image32x32>
-		<image36x36></image36x36>
-		<image48x48></image48x48>
-		<image57x57></image57x57>
-		<image72x72></image72x72>
-		<image114x114></image114x114>
-		<image128x128></image128x128>
-	</icon> -->
-
-	<!-- Whether the application handles the update when a user double-clicks an update version
-	of the AIR file (true), or the default AIR application installer handles the update (false).
-	Optional. Default false. -->
-	<!-- <customUpdateUI></customUpdateUI> -->
-	
-	<!-- Whether the application can be launched when the user clicks a link in a web browser.
-	Optional. Default false. -->
-	<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
-
-	<!-- Listing of file types for which the application can register. Optional. -->
-	<!-- <fileTypes> -->
-
-		<!-- Defines one file type. Optional. -->
-		<!-- <fileType> -->
-
-			<!-- The name that the system displays for the registered file type. Required. -->
-			<!-- <name></name> -->
-
-			<!-- The extension to register. Required. -->
-			<!-- <extension></extension> -->
-			
-			<!-- The description of the file type. Optional. -->
-			<!-- <description></description> -->
-			
-			<!-- The MIME content type. -->
-			<!-- <contentType></contentType> -->
-			
-			<!-- The icon to display for the file type. Optional. -->
-			<!-- <icon>
-				<image16x16></image16x16>
-				<image32x32></image32x32>
-				<image48x48></image48x48>
-				<image128x128></image128x128>
-			</icon> -->
-			
-		<!-- </fileType> -->
-	<!-- </fileTypes> -->
-
-    <!-- iOS specific capabilities -->
-	<!-- <iPhone> -->
-		<!-- A list of plist key/value pairs to be added to the application Info.plist -->
-		<!-- <InfoAdditions>
-            <![CDATA[
-                <key>UIDeviceFamily</key>
-                <array>
-                    <string>1</string>
-                    <string>2</string>
-                </array>
-                <key>UIStatusBarStyle</key>
-                <string>UIStatusBarStyleBlackOpaque</string>
-                <key>UIRequiresPersistentWiFi</key>
-                <string>YES</string>
-            ]]>
-        </InfoAdditions> -->
-        <!-- A list of plist key/value pairs to be added to the application Entitlements.plist -->
-		<!-- <Entitlements>
-            <![CDATA[
-                <key>keychain-access-groups</key>
-                <array>
-                    <string></string>
-                    <string></string>
-                </array>
-            ]]>
-        </Entitlements> -->
-	<!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" -->
-	<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
-	<!-- </iPhone> -->
-
-	<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
-    <!--<android> -->
-    <!--	<manifestAdditions>
-		<![CDATA[
-			<manifest android:installLocation="auto">
-				<uses-permission android:name="android.permission.INTERNET"/>
-				<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-				<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
-				<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
-				<application android:enabled="true">
-					<activity android:excludeFromRecents="false">
-						<intent-filter>
-							<action android:name="android.intent.action.MAIN"/>
-							<category android:name="android.intent.category.LAUNCHER"/>
-						</intent-filter>
-					</activity>
-				</application>
-            </manifest>
-		]]>
-        </manifestAdditions> -->
-	    <!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
-        <!-- <colorDepth></colorDepth> -->
-    <!-- </android> -->
-	<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
-
-</application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/da4707d5/ant_on_air/tests/AntTest.mxml
----------------------------------------------------------------------
diff --git a/ant_on_air/tests/AntTest.mxml b/ant_on_air/tests/AntTest.mxml
deleted file mode 100644
index 6e60e05..0000000
--- a/ant_on_air/tests/AntTest.mxml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-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.
-
--->
-<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
-                   xmlns:local="*"
-                   xmlns:mx="library://ns.adobe.com/flex/mx"
-                   xmlns:s="library://ns.adobe.com/flex/spark" 
-                   invoke="checkargs(event)"
-                   >
-    <fx:Script>
-        <![CDATA[
-            // in theory, all new tags are added to AntClasses.as
-            // and therefore force-linking this should initialize
-            // all tag handlers
-            import AntClasses; AntClasses;
-            import org.apache.flex.ant.Ant;
-            import org.apache.flex.ant.tags.Copy;
-            import org.apache.flex.ant.tags.Get;
-            import org.apache.flex.ant.tags.Checksum;
-            
-            private function checkargs(event:InvokeEvent):void
-            {
-                for each (var s:String in event.arguments)
-                    if (s.toLowerCase().indexOf("exitwhendone") != -1)
-                        exitwhendone = true;
-                    
-                 test();
-            }
-            
-            private var exitwhendone:Boolean;
-            
-            public function test():void
-            {
-                ant = new Ant();
-                ant.output = output;
-                var context:Object = { targets: "test" };
-                if (exitwhendone)
-                    context["exitwhendone"] = true;
-                var file:File = File.applicationDirectory;
-                file = file.resolvePath("test.xml");
-                addEventListener(Event.ENTER_FRAME, enterFrameHandler);
-                if (!ant.processXMLFile(file, context, true))
-                {
-                    ant.addEventListener(Event.COMPLETE, completeHandler);
-                    ant.addEventListener(ProgressEvent.PROGRESS, progressEventHandler);
-                    // redispatch keyboard events off of ant so input task can see them
-                    systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, ant_keyDownHandler);
-                    pb.source = ant;
-                }
-                else
-                    completeHandler(null);
-            }
-            
-            private function progressEventHandler(event:ProgressEvent):void
-            {
-                if (ant.progressClass is Copy)
-                {
-                    pb.label = "Copying %1 of %2";
-                }
-                else if (ant.progressClass is Get)
-                {
-                    pb.label = "Downloading bytes %1 of %2";                    
-                }
-                else if (ant.progressClass is Checksum)
-                {
-                    pb.label = "Verifying download: bytes %1 of %2";                    
-                }
-            }
-            
-            private function completeHandler(event:Event):void
-            {
-                if (Ant.currentAnt.project.status)
-                    output("SUCCESS!");
-                else
-                    output("FAILURE!");
-                
-                if (exitwhendone)
-                    NativeApplication.nativeApplication.exit(Ant.currentAnt.project.status ? 0 : 255);
-            }
-            
-            private var ant:Ant;
-            
-            private function output(s:String):void
-            {
-                console.text += s + "\n";
-                callLater(scrollConsoleToBottom);
-            }
-            
-            private function scrollConsoleToBottom():void
-            {
-                console.verticalScrollPosition = console.maxVerticalScrollPosition;
-            }
-            
-            private function enterFrameHandler(event:Event):void
-            {
-                ant.doCallback();
-            }
-            
-            private function ant_keyDownHandler(event:KeyboardEvent):void
-            {
-                ant.dispatchEvent(event);
-            }
-        ]]>
-    </fx:Script>
-    <s:layout>
-        <s:VerticalLayout />
-    </s:layout>
-    <mx:TextArea id="console" width="100%" height="100%" />
-    <mx:ProgressBar id="pb" width="100%" mode="event" label="Copying %1 of %2" />
-</s:WindowedApplication>
\ No newline at end of file