get ant build working after refactoring ant tasks and test-utils for Maven

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

Branch: refs/heads/develop
Commit: eae9b76c0156f69d932722f19defb4581fc01b34
Parents: 0485700
Author: Alex Harui <[email protected]>
Authored: Wed Jul 13 14:38:13 2016 -0700
Committer: Alex Harui <[email protected]>
Committed: Wed Jul 13 14:38:27 2016 -0700

----------------------------------------------------------------------
 build.xml                             |  46 ++++++++-
 compiler-build-tools/build.xml        |  18 +---
 compiler-jx/src/test/build.xml        |  10 +-
 compiler-test-utils/build.xml         | 101 ++++++++++++++++++
 compiler/build.xml                    |  29 +-----
 compiler/src/test/as/Hello.as         |  32 ------
 compiler/src/test/build.xml           |  26 +----
 flexjs-ant-tasks/build.xml            | 161 +++++++++++++++++++++++++++++
 flexjs-ant-tasks/src/test/as/Hello.as |  32 ++++++
 flexjs-ant-tasks/src/test/build.xml   |  79 ++++++++++++++
 10 files changed, 431 insertions(+), 103 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index fc3c3b5..9e9e5e2 100644
--- a/build.xml
+++ b/build.xml
@@ -65,12 +65,13 @@
     <target name="sdk" description="Produces an SDK at generated/dist/sdk 
containing both Falcon and the legacy compiler.">
         <ant dir="compiler-build-tools" />
         <ant dir="compiler-jburg-types" />
+        <ant dir="compiler-test-utils" />
         <ant dir="compiler" />
     </target>
 
     <target name="main" depends="sdk, javadoc, tests" description="Default 
target - Builds a Falcon SDK, builds Falcon Javadoc, and runs tests."/>
 
-    <target name="all" depends="main, jx, externs, oem, debugger" 
description="Builds Falcon, then FalconJX"/>
+    <target name="all" depends="main, jx, externs, oem, debugger, anttasks" 
description="Builds Falcon, then FalconJX"/>
 
     <target name="jx" depends="compiler.jx, compiler.jx.tests" 
description="Builds FalconJX" />
     
@@ -86,6 +87,10 @@
         <ant dir="flex-compiler-oem" target="main"/>
     </target>
 
+    <target name="anttasks" description="Builds ant tasks JAR">
+        <ant dir="flexjs-ant-tasks" target="jar"/>
+    </target>
+
     <target name="debugger" description="Builds FDB JAR">
         <ant dir="debugger" target="jar"/>
     </target>
@@ -98,6 +103,10 @@
         <ant dir="compiler-jx" target="test"/>
     </target>
 
+    <target name="ant.tests" description="Runs the tests." 
unless="skip.compiler.jx.tests">
+        <ant dir="flexjs-ant-tasks" target="test"/>
+    </target>
+
     <target name="copyLastSuccessfulBuild" description="Copies last flex-asjs 
build.">
         <ant dir="compiler-jx/src/test" target="copyLastSuccessfulBuild"/>
     </target>
@@ -132,6 +141,7 @@
 
     <target name="wipe" description="Wipes out everything that didn't come 
from Git.">
         <ant dir="compiler-build-tools" target="wipe"/>
+        <ant dir="compiler-test-utils" target="wipe"/>
         <ant dir="compiler-jburg-types" target="wipe"/>
         <ant dir="compiler" target="wipe"/>
         <ant dir="compiler/src/tests" target="wipe"/>
@@ -140,6 +150,7 @@
     <target name="wipe-all" description="Wipes out everything that didn't come 
from Git.">
         <ant dir="compiler-build-tools" target="wipe"/>
         <ant dir="compiler-jburg-types" target="wipe"/>
+        <ant dir="compiler-test-utils" target="wipe"/>
         <ant dir="compiler" target="wipe"/>
         <ant dir="compiler/src/test" target="wipe"/>
                <ant dir="compiler-jx" target="super-clean"/>
@@ -271,6 +282,9 @@
         <!-- flex-compiler-oem and fdb -->
         <antcall target="stage-fb-integration"/>
         
+        <!-- flex ant tasks -->
+        <antcall target="stage-ant-tasks"/>
+        
         <!-- externs -->
         <antcall target="stage-externs"/>
         
@@ -338,6 +352,21 @@
                 <exclude name="**/unittest.properties" />
             </fileset>
         </copy>
+        <copy todir="${basedir}/temp/compiler-test-utils" 
includeEmptyDirs="false">
+            <fileset dir="${basedir}/compiler-test-utils">
+                <include name="**"/>
+                <exclude name=".classpath" />
+                <exclude name=".project" />
+                <exclude name=".settings/**" />
+                <exclude name="in/**"/>
+                <exclude name="lib/**"/>
+                <exclude name="target/classes/**"/>
+                <exclude name="target/test-classes/**"/>
+                <exclude name="target/junit-temp/**"/>
+                <exclude name="target/junit-reports/**"/>
+                <exclude name="**/unittest.properties" />
+            </fileset>
+        </copy>
         <copy todir="${basedir}/temp/compiler-jburg-types" 
includeEmptyDirs="false">
             <fileset dir="${basedir}/compiler-jburg-types">
                 <include name="**"/>
@@ -399,6 +428,21 @@
         </copy>
     </target>
 
+    <target name="stage-ant-tasks">
+        <copy todir="${basedir}/temp/flexjs-ant-tasks" 
includeEmptyDirs="false">
+            <fileset dir="${basedir}/flexjs-ant-tasks">
+                <include name="**"/>
+                <exclude name=".classpath" />
+                <exclude name=".project" />
+                <exclude name=".settings/**" />
+                <exclude name="target/flex/**"/>
+                <exclude name="target/flash/**"/>
+                <exclude name="target/generated-sources/**"/>
+                <exclude name="target/META-INF/**"/>
+            </fileset>
+        </copy>
+    </target>
+
     <target name="stage-externs">
         <copy todir="${basedir}/temp/externs" includeEmptyDirs="false">
             <fileset dir="${basedir}/externs">

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/compiler-build-tools/build.xml
----------------------------------------------------------------------
diff --git a/compiler-build-tools/build.xml b/compiler-build-tools/build.xml
index 82f50b3..5a23ce0 100644
--- a/compiler-build-tools/build.xml
+++ b/compiler-build-tools/build.xml
@@ -90,7 +90,7 @@
         <javac debug="${javac.debug}" deprecation="${javac.deprecation}" 
destdir="${compiler-build-tools}/target/classes"
             includeAntRuntime="true" source="${javac.src}" 
target="${javac.src}">
             <src path="${compiler-build-tools}/src/main/java"/>
-            <include 
name="org/apache/flex/compiler/internal/as/codegen/UnknownTreePatternInputOutput.java"/>
+            <include 
name="org/apache/flex/compiler/tools/unknowntreehandler/UnknownTreePatternInputOutput.java"/>
             <compilerarg value="-Xlint:all,-path,-fallthrough"/>
         </javac>
     </target>
@@ -110,21 +110,7 @@
            </javac>
        </target>
 
-    <target name="test.classes" depends="compiler.test.downloads">
-        <mkdir dir="${compiler-build-tools}/target/classes"/>
-        <javac debug="${javac.debug}" deprecation="${javac.deprecation}" 
destdir="${compiler-build-tools}/target/classes" includeAntRuntime="true"
-            source="${javac.src}" target="${javac.src}">
-            <compilerarg value="-Xlint:all,-path,-fallthrough"/>
-            <src path="${compiler-build-tools}/src/main/java"/>
-            <include name="org/apache/flex/utils/*.java"/>
-            <classpath>
-                <pathelement 
location="${compiler-build-tools}/target/classes"/>
-                <fileset 
dir="${compiler-build-tools}/../compiler/lib/external" includes="**/*.jar"/>
-            </classpath>
-        </javac>
-    </target>
-       
-    <target name="main" depends="annotate.class, 
unknown.tree.pattern.input.output, test.classes" />
+    <target name="main" depends="annotate.class, 
unknown.tree.pattern.input.output" />
     
     <!--
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/compiler-jx/src/test/build.xml
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/build.xml b/compiler-jx/src/test/build.xml
index f82e6d4..62878bf 100644
--- a/compiler-jx/src/test/build.xml
+++ b/compiler-jx/src/test/build.xml
@@ -45,7 +45,7 @@
             <compilerarg value="-Xlint:all,-path"/>
             <classpath>
                 <pathelement location="${compiler}/target/test-classes"/>
-                <pathelement 
location="${compiler}/../compiler-build-tools/target/classes"/>
+                <pathelement 
location="${compiler}/../compiler-test-utils/target/classes"/>
                 <fileset dir="${compiler}/lib" includes="**/*.jar"/>
             </classpath>
         </javac>
@@ -61,7 +61,7 @@
                failureproperty="tests.unit.failed">
             <classpath>
                 <pathelement location="${compiler}/target/test-classes"/>
-                <pathelement 
location="${compiler}/../compiler-build-tools/target/classes"/>
+                <pathelement 
location="${compiler}/../compiler-test-utils/target/classes"/>
                 <fileset dir="${compiler}/lib" includes="**/*.jar"/>
             </classpath>
             <batchtest todir="${compiler}/target/junit-results">
@@ -99,7 +99,7 @@
             failureproperty="tests.unit.failed">
             <classpath>
                 <pathelement location="${compiler}/target/test-classes"/>
-                <pathelement 
location="${compiler}/../compiler-build-tools/target/classes"/>
+                <pathelement 
location="${compiler}/../compiler-test-utils/target/classes"/>
                 <fileset dir="${compiler}/lib" includes="**/*.jar"/>
             </classpath>
             <batchtest todir="${compiler}/target/junit-results">
@@ -125,7 +125,7 @@
             failureproperty="tests.unit.failed">
             <classpath>
                 <pathelement location="${compiler}/target/test-classes"/>
-                <pathelement 
location="${compiler}/../compiler-build-tools/target/classes"/>
+                <pathelement 
location="${compiler}/../compiler-test-utils/target/classes"/>
                 <fileset dir="${compiler}/lib" includes="**/*.jar"/>
             </classpath>
             <batchtest todir="${compiler}/target/junit-results">
@@ -151,7 +151,7 @@
             failureproperty="tests.unit.failed">
             <classpath>
                 <pathelement location="${compiler}/target/test-classes"/>
-                <pathelement 
location="${compiler}/../compiler-build-tools/target/classes"/>
+                <pathelement 
location="${compiler}/../compiler-test-utils/target/classes"/>
                 <fileset dir="${compiler}/lib" includes="**/*.jar"/>
             </classpath>
             <batchtest todir="${compiler}/target/junit-results">

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/compiler-test-utils/build.xml
----------------------------------------------------------------------
diff --git a/compiler-test-utils/build.xml b/compiler-test-utils/build.xml
new file mode 100644
index 0000000..282e24f
--- /dev/null
+++ b/compiler-test-utils/build.xml
@@ -0,0 +1,101 @@
+<?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="compiler-test-utils" default="main" basedir=".">
+
+    <!-- 
+
+        PROPERTIES
+
+    -->
+
+    <!-- The 'compiler' property is the absolute path, with forward slashes, 
-->
+    <!-- to the 'compiler-test-utils' directory that contains this file. -->
+    <!-- All input paths are expressed as absolute paths starting with 
${compiler-test-utils}. -->
+    <pathconvert property="compiler-test-utils" dirsep="/">
+        <path location="${basedir}"/>
+    </pathconvert>
+    
+    <property name="FALCON_HOME" value="${basedir}/../compiler"/>
+    
+    <!-- Properties can be overridden locally by loading a local.properties 
file -->
+    <!-- Java 8 users probably need javadoc.params=-Xdoclint:none -->
+    <property file="${compiler-test-utils}/local.properties"/>
+    
+    <property name="src.depend" value="true"/>
+
+    <!-- Options for <javac> tasks -->
+    <property name="javac.debug" value="true"/>
+    <property name="javac.deprecation" value="false"/>
+    <property name="javac.src" value="1.6"/>
+
+    <!-- JAR manifest entries -->
+    <property name="manifest.sealed" value="false"/>
+    <property name="manifest.Implementation-Title" value="Apache Flex 
Compiler"/>
+    <property name="manifest.Implementation-Version" 
value="${release.version}"/>
+    <property name="manifest.Implementation-Vendor" value="Apache Software 
Foundation"/>
+    
+    <!-- label is set by CruiseControl script based on P4 label incrementer -->
+    <condition property="build.number" value="${env.BUILD_NUMBER}">
+        <isset property="env.BUILD_NUMBER"/>
+    </condition>
+    
+    <target name="compiler.test.downloads">
+        <ant 
antfile="${compiler-test-utils}/../compiler/src/test/downloads.xml" 
dir="${compiler-test-utils}/../compiler/src/test" inheritAll="false"/>
+    </target>
+    
+    <!--
+
+        BUILD TOOL COMPILATION
+
+    -->
+       
+    <target name="test.classes" depends="compiler.test.downloads">
+        <mkdir dir="${compiler-test-utils}/target/classes"/>
+        <javac debug="${javac.debug}" deprecation="${javac.deprecation}" 
destdir="${compiler-test-utils}/target/classes" includeAntRuntime="true"
+            source="${javac.src}" target="${javac.src}">
+            <compilerarg value="-Xlint:all,-path,-fallthrough"/>
+            <src path="${compiler-test-utils}/src/main/java"/>
+            <include name="org/apache/flex/utils/*.java"/>
+            <classpath>
+                <pathelement location="${compiler-test-utils}/target/classes"/>
+                <fileset dir="${compiler-test-utils}/../compiler/lib/external" 
includes="**/*.jar"/>
+            </classpath>
+        </javac>
+    </target>
+       
+    <target name="main" depends="test.classes" />
+    
+    <!--
+
+        CLEANUP
+
+    -->
+
+    <target name="clean" description="clean">
+        <delete dir="${compiler-test-utils}/target/classes"/>
+    </target>
+
+    <target name="wipe" depends="clean" description="Wipes everything that 
didn't come from Git.">
+        <delete dir="${compiler-test-utils}/target"/>
+    </target>
+
+ </project>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/compiler/build.xml
----------------------------------------------------------------------
diff --git a/compiler/build.xml b/compiler/build.xml
index c39f02e..6ee5110 100644
--- a/compiler/build.xml
+++ b/compiler/build.xml
@@ -689,34 +689,7 @@
         </jar>
        </target>
 
-       <target name="set.falcon.flextasks.jar.uptodate">
-               <uptodate property="falcon.flextasks.jar.uptodate"
-                         targetfile="${sdk}/falcon-flextasks.jar">
-                       <srcfiles dir="${compiler}/target/classes">
-                               <include name="**/*.class"/>
-                               <include name="**/*.properties"/>
-                       </srcfiles>
-               </uptodate>
-       </target>
-       
-       <target name="falcon.flextasks.jar" depends="compiler.jar, 
set.falcon.flextasks.jar.uptodate" unless="falcon.flextasks.jar.uptodate">
-        <mkdir dir="${sdk}"/>
-        <jar file="${sdk}/falcon-flexTasks.jar" 
basedir="${compiler}/target/classes" >
-            <include name="META-INF/LICENSE"/>
-            <include name="META-INF/NOTICE"/>
-            <manifest>
-                <attribute name="Sealed" value="${manifest.sealed}"/>
-                <attribute name="Implementation-Title" 
value="${manifest.Implementation-Title} - ant Tasks"/>
-                <attribute name="Implementation-Version" 
value="${manifest.Implementation-Version}.${build.number}"/>
-                <attribute name="Implementation-Vendor" 
value="${manifest.Implementation-Vendor}"/>
-                <attribute name="Class-Path" value="compiler.jar"/>
-            </manifest>
-            <fileset dir="${compiler}/src/main/resources" 
includes="flexTasks.tasks"/>
-            <fileset dir="${compiler}/target/classes" 
includes="${compiler.ant.binaries}"/>
-        </jar>
-       </target>
-
-    <target name="jar" depends="compiler.jar, falcon.asc.jar, 
falcon.mxmlc.jar, falcon.compc.jar, falcon.optimizer.jar, falcon.swfdump.jar, 
falcon.flextasks.jar"
+    <target name="jar" depends="compiler.jar, falcon.asc.jar, 
falcon.mxmlc.jar, falcon.compc.jar, falcon.optimizer.jar, falcon.swfdump.jar"
            description="Creates JAR files"/>
            
     <!--

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/compiler/src/test/as/Hello.as
----------------------------------------------------------------------
diff --git a/compiler/src/test/as/Hello.as b/compiler/src/test/as/Hello.as
deleted file mode 100644
index 487dac4..0000000
--- a/compiler/src/test/as/Hello.as
+++ /dev/null
@@ -1,32 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
-import flash.display.Sprite;
-
-public class Hello extends Sprite
-{
-    public function Hello()
-    {
-        super();
-        trace("Hello");
-    }
-}
-
-}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/compiler/src/test/build.xml
----------------------------------------------------------------------
diff --git a/compiler/src/test/build.xml b/compiler/src/test/build.xml
index 63c8be1..7fc0b13 100644
--- a/compiler/src/test/build.xml
+++ b/compiler/src/test/build.xml
@@ -68,25 +68,6 @@
         <java jar="${falcon}/lib/falcon-swfdump.jar" fork="true"/>
     </target>
     
-    <target name="ant.tests">
-        <property name="FLEX_HOME" value="${sdk}"/>
-        <property name="FALCON_HOME" value="${falcon}"/>
-        <echo>FLEX_HOME=${sdk}</echo>
-        <echo>FALCON_HOME=${falcon}</echo>
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <mxmlc file="${compiler.tests}/as/Hello.as"
-            output="${compiler}/target/junit/Hello.swf"
-            target-player="${playerglobal.version}">
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-        </mxmlc>
-        <delete file="${compiler}/target/junit/Hello.swf"/>
-        <compc output="${compiler}/target/junit/Hello.swc" 
include-classes="Hello" target-player="${playerglobal.version}">
-            <source-path path-element="${compiler.tests}/as"/>
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-        </compc>
-        <delete file="${compiler}/target/junit/Hello.swc"/>
-    </target>
-
     <!-- tests used to be divided up like this
  
     <target name="compile.unit.tests">
@@ -282,6 +263,7 @@
             <classpath>
                 <fileset dir="${compiler}/lib/external" includes="**/*.jar"/>
                 <pathelement 
location="${compiler}/../compiler-build-tools/target/classes"/>
+                <pathelement 
location="${compiler}/../compiler-test-utils/target/classes"/>
                 <pathelement location="${falcon}/lib/compiler.jar"/>
             </classpath>
         </javac>
@@ -299,6 +281,7 @@
                 <pathelement location="${compiler}/target/test-classes"/>
                 <fileset dir="${compiler}/lib/external" includes="**/*.jar"/>
                 <pathelement 
location="${compiler}/../compiler-build-tools/target/classes"/>
+                <pathelement 
location="${compiler}/../compiler-test-utils/target/classes"/>
                 <pathelement location="${falcon}/lib/compiler.jar"/>
             </classpath>
             <batchtest todir="${compiler}/target/junit-reports">
@@ -339,6 +322,7 @@
                 <pathelement location="${compiler}/target/test-classes"/>
                 <fileset dir="${compiler}/lib" includes="**/*.jar"/>
                 <pathelement 
location="${compiler}/../compiler-build-tools/target/classes"/>
+                <pathelement 
location="${compiler}/../compiler-test-utils/target/classes"/>
                 <pathelement location="${falcon}/lib/compiler.jar"/>
             </classpath>
             <batchtest todir="${compiler}/target/junit-reports">
@@ -366,9 +350,9 @@
     </target>
     
     <!--<target name="main" depends="unit.tests, feature.tests, jar.tests"/>-->
-    <!--<target name="sdk.dependent.tests" depends="unit.tests.sdk, 
feature.tests.sdk, functional.tests, ant.tests" />-->
+    <!--<target name="sdk.dependent.tests" depends="unit.tests.sdk, 
feature.tests.sdk, functional.tests" />-->
     <target name="main" depends="jar.tests, tests"/>
-    <target name="sdk.dependent.tests" depends="tests.sdk, ant.tests" />
+    <target name="sdk.dependent.tests" depends="tests.sdk" />
     <target name="all" depends="main, sdk.dependent.tests"/>
 
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/flexjs-ant-tasks/build.xml
----------------------------------------------------------------------
diff --git a/flexjs-ant-tasks/build.xml b/flexjs-ant-tasks/build.xml
new file mode 100644
index 0000000..4af243d
--- /dev/null
+++ b/flexjs-ant-tasks/build.xml
@@ -0,0 +1,161 @@
+<?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="flextasks" default="main" basedir=".">
+
+    <!-- 
+
+        PROPERTIES
+
+    -->
+
+    <!-- The 'flextasks' property is the absolute path, with forward slashes, 
-->
+    <!-- to the 'compiler' directory that contains this file. -->
+    <!-- All input paths are expressed as absolute paths starting with 
${compiler}. -->
+    <pathconvert property="flextasks" dirsep="/">
+        <path location="${basedir}"/>
+    </pathconvert>
+
+    <!-- The 'env' property contains all the environment variables -->
+    <property environment="env"/>
+    
+    <!-- Properties can be overridden locally by loading a local.properties 
file -->
+    <!-- Java 8 users probably need javadoc.params=-Xdoclint:none -->
+    <property file="${flextasks}/local.properties"/>
+    <property file="${flextasks}/../build.properties"/>
+    <property name="javadoc.params" value="" />
+    
+    <!-- The 'sdk' property is the absolute path, with forward slashes, to the 
compiler/lib directory -->
+    <!-- where a Falcon SDK is built -->
+    <!-- All output paths are expressed as absolute paths starting with ${sdk} 
-->
+    <property name="sdk" value="${flextasks}/../compiler/lib"/>
+    <property name="compiler" value="${flextasks}/../compiler"/>
+
+    <property name="src.depend" value="true"/>
+
+    <!-- Options for <javac> tasks -->
+    <property name="javac.debug" value="true"/>
+    <property name="javac.deprecation" value="false"/>
+    <property name="javac.src" value="1.6"/>
+
+    <!-- JAR manifest entries -->
+    <property name="manifest.sealed" value="false"/>
+    <property name="manifest.Implementation-Title" value="Apache Flex 
Compiler"/>
+    <property name="manifest.Implementation-Version" 
value="${release.version}"/>
+    <property name="manifest.Implementation-Vendor" value="Apache Software 
Foundation"/>
+       
+    <property name="flextasks.ant.binaries" 
value="org/apache/flex/compiler/ant/**/*.class"/>
+    
+    <!-- env.BUILD_NUMBER is set by Jenkins CI -->
+    <condition property="build.number" value="nightly-${env.BUILD_NUMBER}">
+        <isset property="env.BUILD_NUMBER"/>
+    </condition>
+        
+    <!--
+
+        CLASSPATHS
+
+    -->
+
+    <path id="classpath">
+        <fileset dir="${compiler}/lib/external" includes="**/*.jar"/>
+        <fileset dir="${compiler}/../compiler-build-tools/target/classes" 
includes="**/*.class"/>
+    </path>
+
+    <target name="compile" description="compile">
+        <mkdir dir="${flextasks}/target/classes"/>
+        <javac debug="${javac.debug}" deprecation="${javac.deprecation}"
+                  includes="**/*.java" destdir="${flextasks}/target/classes" 
classpathref="classpath" includeAntRuntime="true"
+               source="${javac.src}" target="${javac.src}">
+            <src path="${flextasks}/src/main/java"/>
+            <compilerarg value="-Xlint:all,-path,-fallthrough,-cast"/>
+        </javac>
+        <copy todir="${flextasks}/target/classes">
+            <fileset dir="${flextasks}/src/main/resources" 
includes="**/*.properties"/>
+        </copy>
+    </target>
+       
+       <target name="set.falcon.flextasks.jar.uptodate">
+               <uptodate property="falcon.flextasks.jar.uptodate"
+                         targetfile="${sdk}/falcon-flextasks.jar">
+                       <srcfiles dir="${flextasks}/target/classes">
+                               <include name="**/*.class"/>
+                               <include name="**/*.properties"/>
+                       </srcfiles>
+               </uptodate>
+       </target>
+       
+       <target name="falcon.flextasks.jar" 
depends="set.falcon.flextasks.jar.uptodate" 
unless="falcon.flextasks.jar.uptodate">
+        <copy file="${basedir}/../LICENSE.base" 
tofile="${compiler}/target/classes/META-INF/LICENSE"/>
+        <copy file="${basedir}/../NOTICE.base" 
tofile="${compiler}/target/classes/META-INF/NOTICE"/>
+        <mkdir dir="${sdk}"/>
+        <jar file="${sdk}/falcon-flexTasks.jar" 
basedir="${flextasks}/target/classes" >
+            <include name="META-INF/LICENSE"/>
+            <include name="META-INF/NOTICE"/>
+            <manifest>
+                <attribute name="Sealed" value="${manifest.sealed}"/>
+                <attribute name="Implementation-Title" 
value="${manifest.Implementation-Title} - ant Tasks"/>
+                <attribute name="Implementation-Version" 
value="${manifest.Implementation-Version}.${build.number}"/>
+                <attribute name="Implementation-Vendor" 
value="${manifest.Implementation-Vendor}"/>
+                <attribute name="Class-Path" value="compiler.jar"/>
+            </manifest>
+            <fileset dir="${flextasks}/src/main/resources" 
includes="flexTasks.tasks"/>
+            <fileset dir="${flextasks}/target/classes" 
includes="${flextasks.ant.binaries}"/>
+        </jar>
+       </target>
+
+    <target name="jar" depends="compile,falcon.flextasks.jar"
+           description="Creates JAR files"/>
+           
+    <!--
+
+        SDK
+
+    -->
+       
+       <target name="sdk" depends="jar, test" description="Builds the 
falcon-flexTasks.jar"/>
+
+    <target name="main" depends="sdk" description="Default target - Builds the 
falcon-flexTasks.jar">
+        <tstamp>
+            <format property="build.datetime" pattern="MM/dd/yyyy hh:mm:ss 
aa"/>
+        </tstamp>
+        <echo>compiler main completed on ${build.datetime}</echo>
+    </target>
+
+    <target name="test" depends="jar" description="Runs JUnit tests">
+        <ant dir="src/test" />
+    </target>
+    
+    <!--
+
+        CLEANUP
+
+    -->
+
+    <target name="clean" description="clean">
+        <delete dir="${flextasks}/target" failonerror="false"/>
+        <delete dir="${sdk}/falcon-flextasks.jar" failonerror="false"/>
+    </target>
+
+    <target name="wipe" depends="clean" description="Wipes everything that 
didn't come from Git.">
+    </target>
+
+ </project>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/flexjs-ant-tasks/src/test/as/Hello.as
----------------------------------------------------------------------
diff --git a/flexjs-ant-tasks/src/test/as/Hello.as 
b/flexjs-ant-tasks/src/test/as/Hello.as
new file mode 100644
index 0000000..487dac4
--- /dev/null
+++ b/flexjs-ant-tasks/src/test/as/Hello.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+import flash.display.Sprite;
+
+public class Hello extends Sprite
+{
+    public function Hello()
+    {
+        super();
+        trace("Hello");
+    }
+}
+
+}

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/eae9b76c/flexjs-ant-tasks/src/test/build.xml
----------------------------------------------------------------------
diff --git a/flexjs-ant-tasks/src/test/build.xml 
b/flexjs-ant-tasks/src/test/build.xml
new file mode 100644
index 0000000..f6d1c7a
--- /dev/null
+++ b/flexjs-ant-tasks/src/test/build.xml
@@ -0,0 +1,79 @@
+<?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="flextasks.tests" default="main" basedir=".">
+
+    <pathconvert property="flextasks.tests" dirsep="/">
+        <path location="${basedir}"/>
+    </pathconvert>
+    
+
+    <property environment="env"/>
+       <property file="unittest.properties" />
+    <property file="../../../env.properties" />
+       <property name="test.timeout" value="3000000" />
+       <property name="maxmem" value="512" />
+               
+    <property name="compiler" value="${flextasks.tests}/../../../compiler"/>
+    <condition property="flexsdk" value="${FLEX_HOME}" else="${env.FLEX_HOME}">
+        <isset property="FLEX_HOME" />
+    </condition>
+    <condition property="playerglobal.version" 
value="${env.PLAYERGLOBAL_VERSION}">
+        <isset property="env.PLAYERGLOBAL_VERSION" />
+    </condition>
+    <property name="playerglobal.version" value="11.1" />
+    
+    <property name="flextasks" value="${flextasks.tests}/../.."/>
+    <property name="falcon" value="${compiler}"/>
+
+    <path id="lib.path">
+        <fileset dir="${falcon}/lib" includes="falcon-flexTasks.jar"/>
+        <fileset dir="${falcon}/lib" includes="compiler.jar"/>
+    </path>
+    
+    <target name="ant.tests">
+        <property name="FLEX_HOME" value="${flexsdk}"/>
+        <property name="FALCON_HOME" value="${falcon}"/>
+        <echo>FLEX_HOME=${flexsdk}</echo>
+        <echo>FALCON_HOME=${falcon}</echo>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+        <mxmlc file="${flextasks.tests}/as/Hello.as"
+            output="${flextasks}/target/junit/Hello.swf"
+            target-player="${playerglobal.version}">
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+        </mxmlc>
+        <delete file="${flextasks}/target/junit/Hello.swf"/>
+        <compc output="${flextasks}/target/junit/Hello.swc" 
include-classes="Hello" target-player="${playerglobal.version}">
+            <source-path path-element="${flextasks.tests}/as"/>
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+        </compc>
+        <delete file="${flextasks}/target/junit/Hello.swc"/>
+    </target>
+
+    <target name="main" depends="ant.tests"/>
+
+    <target name="clean">
+    </target>
+
+    <target name="wipe" depends="clean">
+    </target>
+
+</project>

Reply via email to