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 2016/05/26 23:05:18 UTC

[34/51] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - clean up build scripts

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/js/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/js/build.xml b/frameworks/js/build.xml
deleted file mode 100644
index ebd6cd9..0000000
--- a/frameworks/js/build.xml
+++ /dev/null
@@ -1,153 +0,0 @@
-<?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.
-
--->
-
-<!-- Note:
-    If you modify this file you may have to make the same change in build_framework.xml.
-    build_framework.xml is renamed to build.xml when it is packaged.
-    It is used to build the frameworks directory from the zip file. 
--->
-<project name="frameworks-js" default="main" basedir=".">
-
-    <property name="FLEXJS_HOME" location="../.."/>
-
-    <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
-    <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
-    <!-- local.d32 is set/used in build.properties so this needs to be done first. -->
-    <condition property="local.d32" value="-d32">
-        <and>
-            <os family="mac"/>
-            <matches pattern="1.6.*" string="${java.version}"/>
-            <equals arg1="${sun.arch.data.model}" arg2="64"/>
-            <equals arg1="${os.arch}" arg2="x86_64"/>
-        </and>
-    </condition>
-
-    <!-- Property for the platform.  -->
-    <condition property="isMac">
-        <os family="mac"/>
-    </condition>
-    <condition property="isWindows">
-        <os family="windows" />
-    </condition>   
-    <condition property="isLinux">
-        <and>
-          <os family="unix"/>    
-          <not>
-            <os family="mac"/>    
-          </not>
-        </and>
-    </condition>  
-
-    <property file="${FLEXJS_HOME}/env.properties"/>
-    <property environment="env"/>
-    <property file="${FLEXJS_HOME}/build.properties"/>
-    <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}" />
-    <property name="FLEX_HOME" value="${env.FLEX_HOME}" />
-	<property name="gjslint" value="gjslint" />
-	<property name="jshint" value="jshint" />
-	<condition property="no.lint" value="true">
-		<os family="windows"/>
-	</condition>
- 
-    <target name="main" depends="check-compile-env,clean,prepare,compile" 
-        description="Clean build of all SWCs"/>
-
-    <target name="check-compile-env" description="Check for the required environment variables">
-        <ant antfile="${FLEXJS_HOME}/build.xml" target="check-compile-env" dir="${FLEXJS_HOME}"/>
-    </target>
-
-    <path id="lib.path">
-        <fileset dir="${FALCONJX_HOME}/lib" includes="compc.jar"/>
-    </path>
-
-    <target name="prepare" depends="thirdparty-downloads"/>
-            
-    <target name="thirdparty-downloads" unless="no.thirdparty-downloads" description="Downloads all the required thirdparty code.">
-        <!--<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>-->
-    </target>
-    
-    <target name="compile" depends="flexjsjx, gjslint, jshint" description="Validates JS code" />
-    
-    <target name="lint" depends="gjslint, jshint" />
-    
-    <target name="gjslint" unless="no.lint">
-        <echo>running gjslint</echo>
-        <exec executable="${gjslint}" dir="${basedir}" failonerror="true">
-            <arg value="--strict" />
-            <arg value="--disable" />
-            <arg value="006,100,214,300" />
-            <!-- 006: wrong indentation -->
-            <!-- 100: cannot have non-primitive value -->
-            <!-- 214: @fileoverview tag missing description -->
-            <!-- 300: missing newline at end of file -->
-            <arg value="--max_line_length" />
-            <arg value="120" />
-            <arg value="-r" />
-            <arg value="FlexJS/src" />
-        </exec>
-    </target>
-    
-    <target name="jshint" unless="no.lint">
-        <echo>running jshint</echo>
-        <exec executable="${jshint}" dir="${basedir}" failonerror="true">
-            <arg value="--config" />
-            <arg value="jshint.properties" />
-            <arg value="FlexJS/src" />
-        </exec>
-    </target>
-	
-    <target name="flexjsjx" >
-        <echo message="Compiling libs/FlexJSJX.swc"/>
-        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
-        <mkdir dir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs" />
-        <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" >
-            <jvmarg value="-Xmx384m" />
-            <jvmarg value="-Dsun.io.useCanonCaches=false" />
-            <jvmarg value="-Dflexcompiler=${FALCONJX_HOME}/../compiler" />
-            <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" />
-            <arg value="+flexlib=${FLEX_HOME}/frameworks" />
-            <arg value="-js-output-type=FLEXJS" />
-            <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations -->
-            <arg value="-output=${FLEXJS_HOME}/frameworks/js/FlexJS/libs" />
-            <arg value="-load-config=${FLEXJS_HOME}/frameworks/as/projects/FlexJSJX/compile-config.xml" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-        </java>
-    </target>
-    
-    <!--
-		Cleanup
-	-->
-
-    <target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything including thirdparty downloads."/>
-	
-    <target name="thirdparty-clean" unless="no.thirdparty-clean" description="Removes all thirdparty downloads.">
-        <!--<ant antfile="${basedir}/downloads.xml" target="clean" dir="${basedir}"/>-->
-    </target>
-    
-    <target name="clean" description="Cleans all SWCs and their resource bundles">
-        <delete failonerror="false">
-            <fileset dir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs">
-                <include name="**/**" />
-            </fileset>
-        </delete>
-    </target>
-    
-</project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/Binding/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/build.xml b/frameworks/projects/Binding/build.xml
index 721aa8e..f4fe8f6 100644
--- a/frameworks/projects/Binding/build.xml
+++ b/frameworks/projects/Binding/build.xml
@@ -26,12 +26,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     
-    <property name="target.name" value="Binding.swc" />
-    <property name="target.name.no.version" value="Binding.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test-js" description="Full build of Binding.swc">
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
     
     <target name="check-js">
@@ -43,22 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-        <ant dir="as/tests" />
-        -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
     </target>
     
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -66,32 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
     </target>
     
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling libs/Binding.swc"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-            Link in the classes (and their dependencies) for the MXML tags
-            listed in this project's manifest.xml.
-            Also link the additional classes (and their dependencies)
-            listed in BindingClasses.as,
-            because these aren't referenced by the manifest classes.
-            Keep the standard metadata when compiling.
-            Include the appropriate CSS files and assets in the SWC.
-            Don't include any resources in the SWC.
-            Write a bundle list of referenced resource bundles
-            into the file bundles.properties in this directory.
-        -->
+        <!-- make JS output folder now so include-file doesn't error -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -101,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/Charts/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Charts/build.xml b/frameworks/projects/Charts/build.xml
index 7c36fb6..fdc915d 100644
--- a/frameworks/projects/Charts/build.xml
+++ b/frameworks/projects/Charts/build.xml
@@ -26,14 +26,12 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     
-    <property name="target.name" value="Charts.swc" />
-    <property name="target.name.no.version" value="Charts.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of Charts.swc">
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -43,16 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -60,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
     </target>
     
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling libs/Charts.swc"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-            Link in the classes (and their dependencies) for the MXML tags
-            listed in this project's manifest.xml.
-            Also link the additional classes (and their dependencies)
-            listed in ChartsClasses.as,
-            because these aren't referenced by the manifest classes.
-            Keep the standard metadata when compiling.
-            Include the appropriate CSS files and assets in the SWC.
-            Don't include any resources in the SWC.
-            Write a bundle list of referenced resource bundles
-            into the file bundles.properties in this directory.
-        -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -97,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/Collections/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Collections/build.xml b/frameworks/projects/Collections/build.xml
index 83c53a9..8a14664 100644
--- a/frameworks/projects/Collections/build.xml
+++ b/frameworks/projects/Collections/build.xml
@@ -26,14 +26,12 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     
-    <property name="target.name" value="Collections.swc" />
-    <property name="target.name.no.version" value="Collections.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of Collections.swc">
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -43,16 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -60,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
     </target>
     
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -97,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/Core/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/build.xml b/frameworks/projects/Core/build.xml
index 292f449..a926925 100644
--- a/frameworks/projects/Core/build.xml
+++ b/frameworks/projects/Core/build.xml
@@ -21,19 +21,17 @@
 
 <project name="Core" default="main" basedir=".">
     <property name="FLEXJS_HOME" location="../../.."/>
-
+    
     <property file="${FLEXJS_HOME}/env.properties"/>
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     
-    <property name="target.name" value="Core.swc" />
-    <property name="target.name.no.version" value="Core.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of Core.swc">
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -43,20 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <ant dir="src/test/flex"/>
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
     </target>
-
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
-
+    
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -64,35 +64,22 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
         <ant dir="src/test/flex" target="clean"/>
     </target>
-
-    <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
+    
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-            Link in the classes (and their dependencies) for the MXML tags
-            listed in this project's manifest.xml.
-            Also link the additional classes (and their dependencies)
-            listed in CoreClasses.as,
-            because these aren't referenced by the manifest classes.
-            Keep the standard metadata when compiling.
-            Include the appropriate CSS files and assets in the SWC.
-            Don't include any resources in the SWC.
-            Write a bundle list of referenced resource bundles
-            into the file bundles.properties in this directory.
-        -->
+        <!-- make JS output folder now so include-file doesn't error -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
-               output="${basedir}/target/${target.name}">
+            output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
             <load-config filename="${basedir}/src/main/config/compile-as-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
@@ -100,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/CreateJS/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/CreateJS/build.xml b/frameworks/projects/CreateJS/build.xml
index bf7ecf1..1a36a0d 100644
--- a/frameworks/projects/CreateJS/build.xml
+++ b/frameworks/projects/CreateJS/build.xml
@@ -26,13 +26,12 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="target.name" value="CreateJS.swc" />
-    <property name="target.name.no.version" value="CreateJS.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of CreateJS.swc">
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -42,22 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
     </target>
     
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -65,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
     </target>
     
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -102,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/DragDrop/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/DragDrop/build.xml b/frameworks/projects/DragDrop/build.xml
index 0ec9d55..0cb8755 100644
--- a/frameworks/projects/DragDrop/build.xml
+++ b/frameworks/projects/DragDrop/build.xml
@@ -26,12 +26,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     
-    <property name="target.name" value="DragDrop.swc" />
-    <property name="target.name.no.version" value="DragDrop.swc" />
+    <property name="target.name" value="${ant.project.name}.swc" />
     
-    <target name="main" depends="clean,js-if-needed,compile" description="Full build of DragDrop.swc">
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
     
     <target name="check-js">
@@ -43,23 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-        <ant dir="as/tests" />
-        <ant dir="asjs/tests" />
-        -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
     </target>
     
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
-        
+    
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -67,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
     </target>
-
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
+    
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -104,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/Effects/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/build.xml b/frameworks/projects/Effects/build.xml
index 004d789..c3b97fe 100644
--- a/frameworks/projects/Effects/build.xml
+++ b/frameworks/projects/Effects/build.xml
@@ -26,14 +26,12 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     
-    <property name="target.name" value="Effects.swc" />
-    <property name="target.name.no.version" value="Effects.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile" description="Full build of Effects.swc">
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -42,25 +40,23 @@
     <target name="js-if-needed" depends="check-js" unless="js-not-needed">
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
-
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-        <ant dir="as/tests" />
-         <ant dir="asjs/tests" />
-         -->
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
     </target>
-
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
-
-
+    
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -68,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
     </target>
-
-    <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
+    
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
         
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -105,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/Flat/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Flat/build.xml b/frameworks/projects/Flat/build.xml
index f84eb8d..e323e5c 100644
--- a/frameworks/projects/Flat/build.xml
+++ b/frameworks/projects/Flat/build.xml
@@ -26,12 +26,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
     
-    <property name="target.name" value="Flat.swc" />
-    <property name="target.name.no.version" value="Flat.swc" />
+    <property name="target.name" value="${ant.project.name}.swc" />
     
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of Flat.swc">
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
     
     <target name="check-js">
@@ -42,24 +40,23 @@
     <target name="js-if-needed" depends="check-js" unless="js-not-needed">
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
-
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         <ant dir="asjs/tests" />
-         -->
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
     </target>
     
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -67,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
     </target>
     
-    <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
     
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -104,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
     </target>
     
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/Formatters/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Formatters/build.xml b/frameworks/projects/Formatters/build.xml
index 3843531..a14f28c 100644
--- a/frameworks/projects/Formatters/build.xml
+++ b/frameworks/projects/Formatters/build.xml
@@ -26,13 +26,12 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="target.name" value="Formatters.swc" />
-    <property name="target.name.no.version" value="Formatters.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of Formatters.swc">
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -42,16 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -59,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
     </target>
     
-    <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
     
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -96,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
     </target>
     
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/GoogleMaps/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/GoogleMaps/build.xml b/frameworks/projects/GoogleMaps/build.xml
index a2c2f80..0dcfb0c 100644
--- a/frameworks/projects/GoogleMaps/build.xml
+++ b/frameworks/projects/GoogleMaps/build.xml
@@ -26,13 +26,12 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="target.name" value="GoogleMaps.swc" />
-    <property name="target.name.no.version" value="GoogleMaps.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of GoogleMaps.swc">
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -42,16 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -59,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
     </target>
-
-    <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
+    
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -96,8 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/Graphics/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/build.xml b/frameworks/projects/Graphics/build.xml
index 6764adf..1aa386f 100644
--- a/frameworks/projects/Graphics/build.xml
+++ b/frameworks/projects/Graphics/build.xml
@@ -26,11 +26,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="target.name" value="Graphics.swc" />
-    <property name="target.name.no.version" value="Graphics.swc" />
     
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of Graphics.swc">
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
     
     <target name="check-js">
@@ -42,24 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         <ant dir="asjs/tests" />
-         -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
     </target>
     
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
-    
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -67,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
     </target>
     
-    <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
     
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
         
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -104,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/HTML/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/build.xml b/frameworks/projects/HTML/build.xml
index dc16577..8f206e3 100644
--- a/frameworks/projects/HTML/build.xml
+++ b/frameworks/projects/HTML/build.xml
@@ -26,11 +26,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="target.name" value="HTML.swc" />
-    <property name="target.name.no.version" value="HTML.swc" />
     
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of HTML.swc">
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
     
     <target name="check-js">
@@ -41,21 +40,23 @@
     <target name="js-if-needed" depends="check-js" unless="js-not-needed">
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
-
-    <target name="test" unless="is.jenkins">
-        <ant dir="src/test/flex"/>
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
     </target>
     
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
-         -->
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -63,35 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
+    </target>
+    
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
         <ant dir="src/test/flex" target="clean"/>
     </target>
     
-    <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
-
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
         
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -101,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/HTML5/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/build.xml b/frameworks/projects/HTML5/build.xml
index f41560e..5836136 100644
--- a/frameworks/projects/HTML5/build.xml
+++ b/frameworks/projects/HTML5/build.xml
@@ -26,13 +26,12 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="target.name" value="HTML5.swc" />
-    <property name="target.name.no.version" value="HTML5.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of HTML5.swc">
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -42,16 +41,22 @@
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
     
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         -->
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -59,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
     </target>
     
-    <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
     
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
         
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -96,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
     </target>
-
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
+    </target>
+    
 </project>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/155b292a/frameworks/projects/JQuery/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/JQuery/build.xml b/frameworks/projects/JQuery/build.xml
index c1677f6..b1c7627 100644
--- a/frameworks/projects/JQuery/build.xml
+++ b/frameworks/projects/JQuery/build.xml
@@ -26,13 +26,12 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="FALCON_HOME" value="${env.FALCON_HOME}"/>
-    <property name="target.name" value="JQuery.swc" />
-    <property name="target.name.no.version" value="JQuery.swc" />
-
-    <target name="main" depends="clean,js-if-needed,compile,test" description="Full build of jQuery.swc">
+    
+    <property name="target.name" value="${ant.project.name}.swc" />
+    
+    <target name="main" depends="clean,check-compiler,js-if-needed,compile,test" description="Full build of ${ant.project.name}.swc">
     </target>
-
+    
     <target name="check-js">
         <uptodate property="js-not-needed" targetfile="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/target/${ant.project.name}JS.swc">
             <srcfiles dir="${basedir}/src/main/flex" includes="**/**"/>
@@ -41,17 +40,23 @@
     <target name="js-if-needed" depends="check-js" unless="js-not-needed">
         <ant dir="${FLEXJS_HOME}/frameworks/js/FlexJS/projects/${ant.project.name}JS/" inheritAll="false" />
     </target>
-
-    <target name="test" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="as/tests" />
-         -->
+    
+    <target name="check-for-tests" >
+        <condition property="skip-tests" >
+            <not>
+                <available file="${basedir}/src/test/flex/build.xml" />
+            </not>
+        </condition>
+    </target>
+    
+    <target name="test" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" />
     </target>
     
     <target name="clean">
         <delete failonerror="false">
             <fileset dir="${FLEXJS_HOME}/frameworks/libs">
-                <include name="${target.name.no.version}"/>
+                <include name="${target.name}"/>
             </fileset>
         </delete>
         <delete failonerror="false" includeemptydirs="true">
@@ -59,34 +64,20 @@
                 <include name="**/**"/>
             </fileset>
         </delete>
+        <antcall target="clean-tests" />
     </target>
     
-    <path id="lib.path">
-        <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
-    </path>
+    <target name="clean-tests" depends="check-for-tests" unless="skip-tests">
+        <ant dir="src/test/flex" target="clean"/>
+    </target>
     
     <target name="compile" description="Compiles .as files into .swc">
-        <echo message="Compiling target/${target.name}"/>
+        <echo message="Compiling libs/${ant.project.name}.swc"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
         <echo message="FALCON_HOME: ${FALCON_HOME}"/>
         <!-- make JS output folder now so include-file doesn't error -->
-        <mkdir dir="${basedir}/target/generated-sources/flexjs"/>
-
-        <!-- Load the <compc> task. We can't do this at the <project> level -->
-        <!-- because targets that run before flexTasks.jar gets built would fail. -->
-        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
-        <!--
-         Link in the classes (and their dependencies) for the MXML tags
-         listed in this project's manifest.xml.
-         Also link the additional classes (and their dependencies)
-         listed in CoreClasses.as,
-         because these aren't referenced by the manifest classes.
-         Keep the standard metadata when compiling.
-         Include the appropriate CSS files and assets in the SWC.
-         Don't include any resources in the SWC.
-         Write a bundle list of referenced resource bundles
-         into the file bundles.properties in this directory.
-         -->
+        <mkdir dir="${basedir}/target/generated-sources/flexjs" />
+        
         <compc fork="true"
             output="${basedir}/target/${target.name}">
             <jvmarg line="${compc.jvm.args}"/>
@@ -96,7 +87,33 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
         </compc>
-        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
+        <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name}" />
+    </target>
+    
+    <target name="check-compiler" depends="check-falcon-home">
+        <path id="lib.path">
+            <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+        </path>
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+    </target>
+    
+    <target name="check-falcon-home" unless="FALCON_HOME"
+        description="Check FALCON_HOME is a directory.">
+        
+        <echo message="FALCON_HOME is ${env.FALCON_HOME}"/>
+        
+        <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${env.FALCON_HOME}"/>
+        
+        <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
+        type="file"
+        property="FALCON_HOME"
+        value="${FLEXJS_HOME}/../flex-falcon/compiler"/>
+        
+        <fail message="FALCON_HOME must be set to a folder with a lib sub-folder containing falcon-mxmlc.jar such as the compiler folder in flex-falcon repo or a FlexJS SDK folder"
+        unless="FALCON_HOME"/>
     </target>
     
 </project>