incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1345276 - in /incubator/flex/trunk: ./ frameworks/ modules/ modules/compiler/ modules/compiler/src/java/flex2/compiler/mxml/dom/ modules/thirdparty/xerces-patch/
Date Fri, 01 Jun 2012 17:03:14 GMT
Author: cframpton
Date: Fri Jun  1 17:03:13 2012
New Revision: 1345276

URL: http://svn.apache.org/viewvc?rev=1345276&view=rev
Log:
- Rearrange lib directory - compiler jars go in lib, downloaded jars go in lib/external, and
optional jars, go in lib/external/optional.  If a jar does not have a compatible license with
Apache v2 it must be optional and it requires an explicit prompt with notification of the
license and a positive confirmation before it can be downloaded.   
-Fixed up the classpaths to match the rearrangement.  
-Added prompts for the flex-messaging-common.jar which is required for Adobe BlazeDS integration
and the Adobe font jars which are needed for embedded font support. 

To build without it prompting you can add -Dblazeds.dont.ask=set and -Dfont.dont.ask=set to
the ant command line.

Modified:
    incubator/flex/trunk/build.xml
    incubator/flex/trunk/frameworks/downloads.xml
    incubator/flex/trunk/frameworks/flex-config.xml
    incubator/flex/trunk/modules/build.xml
    incubator/flex/trunk/modules/compiler/build.xml
    incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
    incubator/flex/trunk/modules/downloads.xml
    incubator/flex/trunk/modules/thirdparty/xerces-patch/build.xml

Modified: incubator/flex/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/build.xml?rev=1345276&r1=1345275&r2=1345276&view=diff
==============================================================================
--- incubator/flex/trunk/build.xml (original)
+++ incubator/flex/trunk/build.xml Fri Jun  1 17:03:13 2012
@@ -98,6 +98,7 @@
     <target name="thirdparty-downloads" description="Downloads all the required thirdparty
code.">
         <ant dir="${basedir}/modules" target="thirdparty-downloads"/>
         <property name="blazeds.donot.ask" value="set"/>
+        <property name="font.donot.ask" value="set"/>
         <ant dir="${basedir}/frameworks" target="thirdparty-downloads"/>
     </target>
 
@@ -514,7 +515,7 @@
     </target>
     
     <target name="stage-modules" unless="no.modules">
-            <!-- modules -->
+        <!-- modules -->
         <copy todir="${basedir}/temp/modules" includeEmptyDirs="false">
             <fileset dir="${basedir}/modules">
                 <include name="**"/>
@@ -666,9 +667,38 @@
             </fileset>
         </copy>
 
+        <!-- the jar files -->
+        <antcall target="stage-lib"/>
+
+        <!-- locale swcs -->
+        <copy todir="${basedir}/temp/frameworks/locale">
+            <fileset dir="${basedir}/frameworks/locale">
+                <include name="**/*.swc"/>
+            </fileset>
+        </copy>
+
+        <!-- ide -->
+        <copy todir="${basedir}/temp/ide">
+            <fileset dir="${basedir}/ide" >
+                <include name="flashbuilder/config"/>
+            </fileset>
+        </copy>
+        
+        <!-- swfobject templates -->
+        <copy todir="${basedir}/temp/templates">
+            <fileset dir="${basedir}/templates" >
+                <include name="swfobject/**"/>
+            </fileset>
+        </copy>
+                
+        <antcall target="binary-package-zip"/>        
+        <antcall target="binary-package-tgz"/>        
+    </target>
+        
+    <target name="stage-lib">
         <!-- 
             lib - Do not include any jars which we prompted to download because of
-            conflicting licenses.
+            conflicting licenses.  These are all in lib/external/optional.
         -->
         <copy todir="${basedir}/temp/lib">
             <fileset dir="${basedir}/lib">
@@ -677,15 +707,6 @@
                 <include name="batik-all-flex.jar"/>
                 <include name="batik-LICENSE*"/>
                 <include name="batik-NOTICE*/**"/>
-                <include name="commons-collections.jar"/>
-                <include name="commons-collections-LICENSE*"/>
-                <include name="commons-collections-NOTICE*/**"/>
-                <include name="commons-discovery.jar"/>
-                <include name="commons-discovery-LICENSE*"/>
-                <include name="commons-discovery-NOTICE*/**"/>
-                <include name="commons-logging.jar"/>
-                <include name="commons-logging-LICENSE*"/>
-                <include name="commons-logging-NOTICE*/**"/>
                 <include name="compc.jar"/>
                 <include name="copylocale.jar"/>
                 <include name="digest.jar"/>
@@ -698,12 +719,29 @@
                 <include name="swfdump.jar"/>
                 <include name="swfutils.jar"/>
                 <include name="fxgutils.jar"/>
-                <include name="saxon9.jar"/>
-                <include name="saxon9-LICENSE*"/>
-                <include name="saxon9-NOTICE*/**"/>
                 <include name="velocity-dep-1.4-flex.jar"/>
                 <include name="velocity-LICENSE*"/>
                 <include name="velocity-NOTICE*/**"/>
+            </fileset>
+        </copy>
+
+        <!-- external libraries - ie we don't have the sources to build them -->
+        <copy todir="${basedir}/temp/lib/external">
+            <fileset dir="${basedir}/lib/external">
+                <include name="commons-collections.jar"/>
+                <include name="commons-collections-LICENSE*"/>
+                <include name="commons-collections-NOTICE*/**"/>
+                <include name="commons-discovery.jar"/>
+                <include name="commons-discovery-LICENSE*"/>
+                <include name="commons-discovery-NOTICE*/**"/>
+                <include name="commons-logging.jar"/>
+                <include name="commons-logging-LICENSE*"/>
+                <include name="commons-logging-NOTICE*/**"/>
+                <include name="javacc.jar"/>
+                <include name="javacc-LICENSE*"/>
+                <include name="saxon9.jar"/>
+                <include name="saxon9-LICENSE*"/>
+                <include name="saxon9-NOTICE*/**"/>
                 <include name="xalan.jar"/>
                 <include name="xalan-LICENSE*"/>
                 <include name="xalan-NOTICE*/**"/>
@@ -716,32 +754,8 @@
                 <include name="xml-batik-NOTICE*/**"/>
             </fileset>
         </copy>
-
-        <!-- locale swcs -->
-        <copy todir="${basedir}/temp/frameworks/locale">
-            <fileset dir="${basedir}/frameworks/locale">
-                <include name="**/*.swc"/>
-            </fileset>
-        </copy>
-
-        <!-- ide -->
-        <copy todir="${basedir}/temp/ide">
-            <fileset dir="${basedir}/ide" >
-                <include name="flashbuilder/config"/>
-            </fileset>
-        </copy>
-        
-        <!-- swfobject templates -->
-        <copy todir="${basedir}/temp/templates">
-            <fileset dir="${basedir}/templates" >
-                <include name="swfobject/**"/>
-            </fileset>
-        </copy>
-                
-        <antcall target="binary-package-zip"/>        
-        <antcall target="binary-package-tgz"/>        
     </target>
-        
+    
     <!-- 
         Packages the binary distribution with ZIP. 
     -->
@@ -1401,7 +1415,6 @@
             reportFile="${basedir}/rat.log">
             <fileset dir="${rat.dir}">
                 <exclude name="modules/asc/src/**" />
-                <exclude name="modules/thirdparty/**" />
             </fileset>
         </rat:report>
     </target>

Modified: incubator/flex/trunk/frameworks/downloads.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/downloads.xml?rev=1345276&r1=1345275&r2=1345276&view=diff
==============================================================================
--- incubator/flex/trunk/frameworks/downloads.xml (original)
+++ incubator/flex/trunk/frameworks/downloads.xml Fri Jun  1 17:03:13 2012
@@ -41,7 +41,7 @@
     <target name="clean" depends="swfobject-clean" description="Cleans thirdparty downloaded
files.">
         <delete failonerror="false">
             <fileset dir="${basedir}/libs" includes="osmf.swc,textLayout.swc"/>
-            <fileset dir="${basedir}/libs/player" includes="**/playerglobal.swc"/>
+            <!--fileset dir="${basedir}/libs/player" includes="**/playerglobal.swc"/-->
         </delete>
         <delete includeEmptyDirs="true" failonerror="false">
             <fileset dir="${download.dir}">

Modified: incubator/flex/trunk/frameworks/flex-config.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/frameworks/flex-config.xml?rev=1345276&r1=1345275&r2=1345276&view=diff
==============================================================================
--- incubator/flex/trunk/frameworks/flex-config.xml (original)
+++ incubator/flex/trunk/frameworks/flex-config.xml Fri Jun  1 17:03:13 2012
@@ -167,8 +167,7 @@
           <!-- Enables advanced anti-aliasing for embedded fonts, which provides greater
clarity for small -->
           <!-- fonts. This setting can be overriden in CSS for specific fonts. -->
           <!-- NOTE: flash-type has been deprecated. Please use advanced-anti-aliasing
<flash-type>true</flash-type> -->
-          <!-- NOTE: For Apache Flex this must be false since fonts are proprietary to
Adobe. -->
-          <advanced-anti-aliasing>false</advanced-anti-aliasing>
+          <advanced-anti-aliasing>true</advanced-anti-aliasing>
 
           <!-- The number of embedded font faces that are cached. -->
           <max-cached-fonts>20</max-cached-fonts>
@@ -191,12 +190,13 @@
           <!-- Compiler font manager classes, in policy resolution order -->
           <!-- NOTE: For Apache Flex -->
           <!-- AFEFontManager and CFFFontManager both use proprietary technology.  -->
-          <!-- To use a CFF embedded font you must use fontswf to precompile the font
as a swf. -->
+          <!-- You must install the optional font jars if you wish to use embedded fonts
 -->
+          <!-- directly or you can use fontswf to precompile the font as a swf.  -->
           <managers>
               <manager-class>flash.fonts.JREFontManager</manager-class>
               <manager-class>flash.fonts.BatikFontManager</manager-class>
-              <!--manager-class>flash.fonts.AFEFontManager</manager-class-->
-              <!--manager-class>flash.fonts.CFFFontManager</manager-class-->
+              <manager-class>flash.fonts.AFEFontManager</manager-class>
+              <manager-class>flash.fonts.CFFFontManager</manager-class>
           </managers>
 
           <!-- File containing cached system font licensing information produced via

Modified: incubator/flex/trunk/modules/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/modules/build.xml?rev=1345276&r1=1345275&r2=1345276&view=diff
==============================================================================
--- incubator/flex/trunk/modules/build.xml (original)
+++ incubator/flex/trunk/modules/build.xml Fri Jun  1 17:03:13 2012
@@ -85,6 +85,11 @@
         <ant dir="${basedir}/thirdparty/xerces-patch" target="clean"/>
         <delete file="${FLEX_LIB}/asc.jar"/>
         <!--delete dir="${FLEX_LIB}/*.jar" failonerror="false"/-->
+        <delete includeemptydirs="true">
+            <fileset dir="${FLEX_LIB}">
+                <exclude name="**/*" />
+            </fileset>
+        </delete>
 	</target>
 
 	<!--

Modified: incubator/flex/trunk/modules/compiler/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/modules/compiler/build.xml?rev=1345276&r1=1345275&r2=1345276&view=diff
==============================================================================
--- incubator/flex/trunk/modules/compiler/build.xml (original)
+++ incubator/flex/trunk/modules/compiler/build.xml Fri Jun  1 17:03:13 2012
@@ -29,6 +29,12 @@
     <property name="build.number" value=""/>
 
     <property name="lib.dir" value="${FLEX_HOME}/lib"/>
+    <property name="lib.ext.dir" value="${lib.dir}/external"/>      
+    <property name="lib.opt.dir" value="${lib.ext.dir}/optional"/>
+
+    <property name="ext.dir" value="external"/>      
+    <property name="opt.dir" value="${ext.dir}/optional"/>
+
     <property name="module.dir" value="${basedir}"/>
 	<property name="javac.src" value="1.5"/>
     <property name="templates.dir" value="${FLEX_HOME}/asdoc/templates"/>
@@ -46,20 +52,24 @@
 	<property name="localized.mxmlc.jars" value="mxmlc_da.jar mxmlc_de.jar mxmlc_es.jar mxmlc_fi.jar
mxmlc_fr.jar mxmlc_it.jar mxmlc_ja.jar mxmlc_ko.jar mxmlc_nb.jar mxmlc_nl.jar mxmlc_pt.jar
mxmlc_ru.jar mxmlc_sv.jar mxmlc_zh_CN.jar mxmlc_zh_TW.jar"/>
 
 	<!-- Excludes Adobe proprietary font and license code. -->
-    <property name="mxmlc.classpath" value="asc.jar xmlParserAPIs.jar batik-all-flex.jar
velocity-dep-1.4-flex.jar commons-collections.jar commons-discovery.jar commons-logging.jar
swfutils.jar fxgutils.jar flex-messaging-common.jar ${localized.mxmlc.jars} xalan.jar ${env.property.dir}"/>
-
+    <!--property name="mxmlc.classpath" value="asc.jar xmlParserAPIs.jar batik-all-flex.jar
velocity-dep-1.4-flex.jar commons-collections.jar commons-discovery.jar commons-logging.jar
swfutils.jar fxgutils.jar flex-messaging-common.jar ${localized.mxmlc.jars} xalan.jar ${env.property.dir}"/>
+    -->
+    
 	<!-- Including Adobe proprietary font and license code.  -->
-	<!--property name="mxmlc.mpl_excludes.classpath" value="afe.jar aglj40.jar rideau.jar
license.jar flex-fontkit.jar "/-->
-    <!--property name="mxmlc.adobe.classpath" value="${mxmlc.mpl_excludes.classpath} asc.jar
xmlParserAPIs.jar batik-all-flex.jar velocity-dep-1.4-flex.jar commons-collections.jar commons-discovery.jar
commons-logging.jar swfutils.jar fxgutils.jar flex-messaging-common.jar ${localized.mxmlc.jars}
xalan.jar"/-->
-
+	<property name="mxmlc.mpl_excludes.classpath" value="${opt.dir}/afe.jar ${opt.dir}/aglj40.jar
${opt.dir}/rideau.jar ${opt.dir}/flex-fontkit.jar "/>
+    <property name="mxmlc.adobe.classpath" value="${mxmlc.mpl_excludes.classpath} asc.jar
${ext.dir}/xml-apis.jar batik-all-flex.jar velocity-dep-1.4-flex.jar ${ext.dir}/commons-collections.jar
${ext.dir}/commons-discovery.jar ${ext.dir}/commons-logging.jar swfutils.jar fxgutils.jar
${opt.dir}/flex-messaging-common.jar ${localized.mxmlc.jars} ${ext.dir}/xalan.jar"/>
+    <property name="mxmlc.classpath" value="${mxmlc.adobe.classpath}"/>
+    
 	<property name="compc.main" value="flex2.tools.Compc"/>
     <property name="compc.classpath" value="mxmlc.jar ${mxmlc.classpath}"/>
 	
     <property name="asdoc.main" value="flex2.tools.ASDoc"/>
-    <property name="asdoc.classpath" value="mxmlc.jar ${mxmlc.classpath} saxon9.jar"/>
+    <property name="asdoc.classpath" value="mxmlc.jar ${mxmlc.classpath} ${ext.dir}/saxon9.jar"/>
 
     <path id="classpath">
-        <fileset dir="${lib.dir}" includes="**/*.jar"/>
+        <fileset dir="${lib.dir}" includes="*.jar"/>
+        <fileset dir="${lib.ext.dir}" includes="*.jar"/>
+        <fileset dir="${lib.opt.dir}" includes="*.jar"/>
     </path>
 		
 	<patternset id="locale.properties">
@@ -87,6 +97,8 @@
     <target name="prepare">
         <echo level="info">${ant.file}</echo>
         <mkdir dir="${lib.dir}"/>
+        <mkdir dir="${lib.ext.dir}"/>
+        <mkdir dir="${lib.opt.dir}"/>
         <mkdir dir="${module.classes}"/>
         <mkdir dir="${module.java15.classes}"/>
     </target>
@@ -105,7 +117,7 @@
     <target name="javacc">
         <java classname="javacc" fork="true" failonerror="true">
             <classpath>
-                <fileset dir="${lib.dir}" includes="javacc.jar"/>
+                <fileset dir="${lib.ext.dir}" includes="javacc.jar"/>
             </classpath>
             <arg value="-OUTPUT_DIRECTORY=${module.src}/flex2/compiler/mxml"/>
             <arg value="${module.src}/flex2/compiler/mxml/Grammar.jj"/>
@@ -125,7 +137,7 @@
         <echo level="info" message="Building serialized velocity templates."/>
         <java fork="true" classname="org.apache.flex.forks.util.SerializedTemplateFactory"
dir="${module.src}">
             <classpath>
-                <fileset dir="${lib.dir}" includes="*.jar"/>
+                <fileset dir="${lib.dir}" includes="**/*.jar"/>
             </classpath>
             <arg value="flex2/compiler/mxml/gen/ClassDef.vm"/>
             <arg value="flex2/compiler/mxml/gen/ClassDefLib.vm"/>

Modified: incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java?rev=1345276&r1=1345275&r2=1345276&view=diff
==============================================================================
--- incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
(original)
+++ incubator/flex/trunk/modules/compiler/src/java/flex2/compiler/mxml/dom/MxmlScanner.java
Fri Jun  1 17:03:13 2012
@@ -167,9 +167,9 @@ public class MxmlScanner extends Default
             URL url = MxmlScanner.class.getProtectionDomain().getCodeSource().getLocation();
             String urlString = url.toString();
             String base = urlString.substring(0, urlString.lastIndexOf("/"));
-            URL xercesPatchJarURL = new URL(base + "/xercesPatch.jar");
-            URL xercesImplJarURL = new URL(base + "/xercesImpl.jar");
-            URL xercesImplJaJarURL = new URL(base + "/xercesImpl_ja.jar");
+            URL xercesPatchJarURL = new URL(base + "/external/xercesPatch.jar");
+            URL xercesImplJarURL = new URL(base + "/external/xercesImpl.jar");
+            URL xercesImplJaJarURL = new URL(base + "/external/xercesImpl_ja.jar");
             URL[] classpath = new URL[] {xercesPatchJarURL, xercesImplJarURL, xercesImplJaJarURL};
             xercesClassLoader = new XercesClassLoader(classpath, MxmlScanner.class.getClassLoader());
         }

Modified: incubator/flex/trunk/modules/downloads.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/modules/downloads.xml?rev=1345276&r1=1345275&r2=1345276&view=diff
==============================================================================
--- incubator/flex/trunk/modules/downloads.xml (original)
+++ incubator/flex/trunk/modules/downloads.xml Fri Jun  1 17:03:13 2012
@@ -24,9 +24,21 @@
 	<!-- properties -->
 	<property file="${FLEX_HOME}/build.properties"/>
 
-	<property name="FLEX_LIB" value="${FLEX_HOME}/lib"/>
+    <property name="lib.dir" value="${FLEX_HOME}/lib"/>
+    
+    <!-- 
+        If you change either lib.ext.dir or lib.opt.dir you need to change
+        classpaths in compiler build.xml.
+        
+        If you change lib.ext.dir you also need to change paths in
+        MxmlScanner.getXercesClassLoader() and classpath in xerces-path build.xml.
+    --> 
+    <property name="lib.ext.dir" value="${lib.dir}/external"/>      
+    <property name="lib.opt.dir" value="${lib.ext.dir}/optional"/>
+
 	<property name="download.dir" value="${FLEX_HOME}/in"/>
-	
+    <property name="adobe.flex.sdk" value="adobe_flex_sdk_4.6"/>
+    
 	<!-- 
 	   Notes:
 	       For Apache, the JARS must be removed from the repository.
@@ -60,40 +72,47 @@
     <property name="saxon9.jar.dir" value="saxonb9-1-0-8j"/>
     
     <property name="xerces.dir" value="xerces-2_9_1"/>
-        
+     
     <!-- 
         Because the downloads requires a network connection and the JARs don't change very
often, 
         they are each downloaded only if they don't already exist. 
     -->
     
-	<target name="main" depends="blazeds-jar, commons-jars, javacc-jar, saxon9-jar, xalan-jar,
xerces-jars" 
+	<target name="main" depends="optional-jars, required-jars"/>
+
+	<target name="required-jars" depends="commons-jars, javacc-jar, saxon9-jar, xalan-jar,
xerces-jars" 
 		description="Downloads all the required thirdparty JARs"/>
+
+    <!-- Ask all the questions up front. -->
+    <target name="optional-jars" depends="blazeds-jar, font-jars, clean-adobe-flex-sdk"
+        description="Downloads, after prompt for each, the optional thirdparty JARs"/>
     
     <!--
 		Cleanup
 	-->
 	
-   <target name="clean" description="Removes all thirdparty downloads.">
-        <delete dir="${download.dir}" failonerror="false"/>
-        <delete file="${FLEX_LIB}/commons-collections.jar"/>
-        <delete file="${FLEX_LIB}/commons-discovery.jar"/>
-        <delete file="${FLEX_LIB}/commons-logging.jar"/>
-        <delete file="${FLEX_LIB}/flex-messaging-common.jar"/>
-        <delete file="${FLEX_LIB}/javacc.jar"/>
-        <delete file="${FLEX_LIB}/saxon9.jar"/>
-        <delete file="${FLEX_LIB}/xalan.jar"/>
-        <delete file="${FLEX_LIB}/xercesImpl.jar"/>
-        <delete file="${FLEX_LIB}/xml-apis.jar"/>
-        <delete includeEmptyDirs="true">
-            <fileset dir="${FLEX_LIB}">
-                <include name="*-LICENSE*"/>
-                <include name="*-NOTICE*/**"/>
-                <exclude name="flex-messaging-common-LICENSE*"/>
+    <target name="clean" depends="clean-adobe-flex-sdk"
+        description="Removes thirdparty downloads.">
+        
+        <delete includeEmptyDirs="true" failonerror="false">
+            <fileset dir="${download.dir}">
+                <include name="commons-collections*/**"/>
+                <include name="commons-discovery*/**"/>
+                <include name="commons-logging*/**"/>
+                <include name="javacc*/**"/>
+                <include name="saxon*/**"/>
+                <include name="xalan*/**"/>
+                <include name="xerces*/**"/>
+                <include name="Xerces*/**"/>
             </fileset>
         </delete>
-   </target>
 
-	<!--
+        <delete dir="${download.dir}" failonerror="false"/>
+        <delete dir="${lib.ext.dir}" failonerror="false"/>
+        <delete dir="${lib.opt.dir}" failonerror="false"/>
+    </target>
+    
+    <!--
 	    Download thirdparty JARs    
 	-->
 
@@ -153,9 +172,9 @@
     <target name="download-jar" 
         description="Downloads jar, and optionally verifies checksum.">              
 
      
-        <get src="${srcUrl}/${srcJarFile}" dest="${FLEX_LIB}/${destJarFile}"/>
+        <get src="${srcUrl}/${srcJarFile}" dest="${destJarFile}"/>
         <antcall target="check-sum">
-            <param name="message" value="Checksum mismatch for ${FLEX_LIB}/${destJarFile}"/>
+            <param name="message" value="Checksum mismatch for ${destJarFile}"/>
         </antcall>
     </target>
 
@@ -167,7 +186,7 @@
         <unzip src="${download.dir}/${zipFile}" dest="${download.dir}"/>    
     </target>
     
-    	<macrodef name="bundle-clean">
+    <macrodef name="bundle-clean">
 		<attribute name="locale"/>
 		<sequential>
 			<delete failonerror="false">
@@ -189,7 +208,8 @@
     </target>
     
     <target name="copy-downloaded-jar" if="destination.known">
-        <copy file="${download.dir}/${srcJarPath}" toFile="${FLEX_LIB}/${destJarFile}"
verbose="true"/>
+        <mkdir dir="${lib.ext.dir}"/>
+        <copy file="${download.dir}/${srcJarPath}" toFile="${destJarFile}" verbose="true"/>
     </target>
     
     <target name="fail-with-message" if="we.failed" 
@@ -198,57 +218,6 @@
     </target>
         
     <!--
-        flex-messaging-common.jar - BlazeDS interface for -service compiler option
-    -->
-    
-    <target name="blazeds-jar-check" 
-        description="Checks if flex-messaging-common.jar is in lib directory.">
-        <available file="${FLEX_LIB}/flex-messaging-common.jar" property="blazeds.donot.ask"/>
-    </target>
-    
-    <target name="blazeds-jar" depends="blazeds-jar-check,get-blazeds-jar" 
-        description="Downloads and copies flex-messaging-common.jar to the lib directory."/>
-
-    <!-- Prompt before downloading BlazeDS.  -->
-    <target name="ask-blazeds" unless="blazeds.donot.ask"
-        description="Prompt the user before downloading BlaseDS">
-        <echo message="Flex can optionally integrate with Adobe BlazeDS."/>
-        <echo message="This feature requires flex-messaging-common.jar from Adobe BlazeDS."/>
-        <echo message="Adobe BlazeDS has a GNU Lesser General Public License, Version
3."/>
-        <input
-            message="Do you want to download Adobe BlazeDS?"
-            validargs="y,n"
-            defaultvalue="n"
-            addproperty="input.blazeds.download"/>
-        <condition property="do.blazeds.install">
-            <equals arg1="y" arg2="${input.blazeds.download}"/>
-        </condition>
-        <!-- Only ask once per ant run.  -->
-        <property name="blazeds.donot.ask" value="set"/>
-    </target>
-    
-    <target name="get-blazeds-jar" depends="ask-blazeds" if="do.blazeds.install">
-        <antcall target="download-zip">
-          <param name="download.dir" value="${download.dir}"/>
-          <param name="srcUrl" value="http://flexorg.wip3.adobe.com/blazeds/4.x/21287"/>
-          <param name="zipFile" value="blazeds-turnkey-4.0.1.21287.zip"/>
-          <param name="srcJarPath" value="resources/lib/flex-messaging-common.jar"/>
-          <param name="destJarFile" value="flex-messaging-common.jar"/>
-        </antcall>
-        <copy file="${download.dir}/blazeds-turnkey-readme.htm" tofile="${FLEX_LIB}/flex-messaging-common-LICENSE.htm"/>
-        
-        <!--
-        <antcall target="download-zip">
-          <param name="download.dir" value="${download.dir}/adobe_flex_sdk_4.6"/>
-          <param name="srcUrl" value="http://download.macromedia.com/pub/flex/sdk"/>
-          <param name="zipFile" value="flex_sdk_4.6.zip"/>
-          <param name="srcJarPath" value="lib/flex-messaging-common.jar"/>
-          <param name="destJarFile" value="flex-messaging-common.jar"/>
-        </antcall>
-        -->
-    </target>
-    
-    <!--
 	    commons
 	-->
 	
@@ -259,7 +228,7 @@
 	-->
 	
     <target name="commons-collections-jar-check" description="Checks if common-collections.jar
has been downloaded.">
-        <available file="${FLEX_LIB}/commons-collections.jar" property="commons.collections.jar.exists"/>
+        <available file="${lib.ext.dir}/commons-collections.jar" property="commons.collections.jar.exists"/>
     </target>
     
     <target name="commons-collections-jar" depends="commons-collections-jar-check" unless="commons.collections.jar.exists"

@@ -270,9 +239,9 @@
           <param name="zipFile" value="${commons-collections.name}.tar.gz"/>
           <param name="md5" value="a1df53801d2c73670314958fa0aeec8b"/>
           <param name="srcJarPath" value="${commons-collections.name}/${commons-collections.name}.jar"/>
-          <param name="destJarFile" value="commons-collections.jar"/>
+          <param name="destJarFile" value="${lib.ext.dir}/commons-collections.jar"/>
         </antcall>
-        <copy todir="${FLEX_LIB}">
+        <copy todir="${lib.ext.dir}">
             <fileset dir="${download.dir}/${commons-collections.name}">
                 <include name="LICENSE.txt"/>
             </fileset>            
@@ -285,7 +254,7 @@
     -->
     
     <target name="commons-discovery-jar-check" description="Checks if commons-discovery.jar
is in lib directory.">
-        <available file="${FLEX_LIB}/commons-discovery.jar" property="commons.discovery.jar.exists"/>
+        <available file="${lib.ext.dir}/commons-discovery.jar" property="commons.discovery.jar.exists"/>
     </target>
     
     <target name="commons-discovery-jar" depends="commons-discovery-jar-check" 
@@ -297,9 +266,9 @@
           <param name="zipFile" value="${commons-discovery.name}.tar.gz"/>
           <param name="md5" value="2273f5f83a477f4f18fccf3a00e2b48c"/>
           <param name="srcJarPath" value="${commons-discovery.name}/commons-discovery.jar"/>
-          <param name="destJarFile" value="commons-discovery.jar"/>
+          <param name="destJarFile" value="${lib.ext.dir}/commons-discovery.jar"/>
         </antcall>
-        <copy todir="${FLEX_LIB}">
+        <copy todir="${lib.ext.dir}">
             <fileset dir="${download.dir}/${commons-discovery.name}">
                 <include name="LICENSE"/>
             </fileset>            
@@ -312,7 +281,7 @@
     -->
     
     <target name="commons-logging-jar-check" description="Checks if commons-logging.jar
is in lib directory.">
-        <available file="${FLEX_LIB}/commons-logging.jar" property="commons.logging.jar.exists"/>
+        <available file="${lib.ext.dir}/commons-logging.jar" property="commons.logging.jar.exists"/>
     </target>
     
     <target name="commons-logging-jar" depends="commons-logging-jar-check" 
@@ -324,9 +293,9 @@
           <param name="zipFile" value="${commons-logging.name}.tar.gz"/>
           <param name="md5" value="6f80ac1fb5f568feb94dd4fdb6b9f7de"/>
           <param name="srcJarPath" value="${commons-logging.name}/commons-logging.jar"/>
-          <param name="destJarFile" value="commons-logging.jar"/>
+          <param name="destJarFile" value="${lib.ext.dir}/commons-logging.jar"/>
         </antcall>
-        <copy todir="${FLEX_LIB}">
+        <copy todir="${lib.ext.dir}">
             <fileset dir="${download.dir}/${commons-logging.name}">
                 <include name="LICENSE.txt"/>
                 <include name="NOTICE.txt"/>
@@ -343,7 +312,7 @@
     -->
     
     <target name="javacc-jar-check" description="Checks if javacc.jar is in lib directory.">
-        <available file="${FLEX_LIB}/javacc.jar" property="javacc.jar.exists"/>
+        <available file="${lib.ext.dir}/javacc.jar" property="javacc.jar.exists"/>
     </target>
     
     <target name="javacc-jar" depends="javacc-jar-check" 
@@ -354,9 +323,9 @@
           <param name="srcUrl" value="http://java.net/projects/javacc/downloads/download"/>
           <param name="zipFile" value="javacc-5.0.tar.gz"/>
           <param name="srcJarPath" value="javacc-5.0/bin/lib/javacc.jar"/>
-          <param name="destJarFile" value="javacc.jar"/>
+          <param name="destJarFile" value="${lib.ext.dir}/javacc.jar"/>
         </antcall>
-        <copy todir="${FLEX_LIB}">
+        <copy todir="${lib.ext.dir}">
             <fileset dir="${download.dir}/javacc-5.0">
                 <include name="LICENSE"/>
             </fileset>            
@@ -369,7 +338,7 @@
     -->
     
     <target name="saxon9-jar-check" description="Checks if saxon9.jar is in lib directory.">
-        <available file="${FLEX_LIB}/saxon9.jar" property="saxon9.jar.exists"/>
+        <available file="${lib.ext.dir}/saxon9.jar" property="saxon9.jar.exists"/>
     </target>
     
     <target name="saxon9-jar" depends="saxon9-jar-check" unless="saxon9.jar.exists" 
@@ -382,9 +351,9 @@
     	<unzip src="${download.dir}/${saxon9.bin.zip}" 
     		dest="${download.dir}/${saxon9.jar.dir}"/>
         
-        <copy file="${download.dir}/${saxon9.jar.dir}/saxon9.jar" toDir="${FLEX_LIB}"
verbose="true"/>
+        <copy file="${download.dir}/${saxon9.jar.dir}/saxon9.jar" toDir="${lib.ext.dir}"
verbose="true"/>
         
-        <copy todir="${FLEX_LIB}/saxon9-NOTICES">
+        <copy todir="${lib.ext.dir}/saxon9-NOTICES">
             <fileset dir="${download.dir}/${saxon9.jar.dir}/notices" includes="**"/>
         </copy>
     </target>
@@ -394,7 +363,7 @@
     -->
     			
     <target name="xalan-jar-check" description="Checks if xalan.jar is in lib directory.">
-        <available file="${FLEX_LIB}/xalan.jar" property="xalan.jar.exists"/>
+        <available file="${lib.ext.dir}/xalan.jar" property="xalan.jar.exists"/>
     </target>
     
     <target name="xalan-jar" depends="xalan-jar-check" unless="xalan.jar.exists" 
@@ -404,10 +373,10 @@
           <param name="srcUrl" value="http://archive.apache.org/dist/xml/xalan-j/binaries"/>
           <param name="zipFile" value="xalan-j_2_6_0-bin.tar.gz"/>
           <param name="srcJarPath" value="xalan-j_2_6_0/bin/xalan.jar"/>
-          <param name="destJarFile" value="xalan.jar"/>
+          <param name="destJarFile" value="${lib.ext.dir}/xalan.jar"/>
         </antcall>
         
-        <copy todir="${FLEX_LIB}">
+        <copy todir="${lib.ext.dir}">
             <fileset dir="${download.dir}/xalan-j_2_6_0">
                 <include name="LICENSE"/>
                 <include name="NOTICE"/>
@@ -423,8 +392,8 @@
     <target name="xerces-jars-check" description="Checks if xercesImpl.jar and and xml-api.jars
are in lib directory.">
         <condition property="xercesImpl.jar.exists">
             <and>
-                <available file="${FLEX_LIB}/xercesImpl.jar"/>
-                <available file="${FLEX_LIB}/xml-apis.jar"/>
+                <available file="${lib.ext.dir}/xercesImpl.jar"/>
+                <available file="${lib.ext.dir}/xml-apis.jar"/>
             </and>
         </condition>
     </target>
@@ -436,22 +405,192 @@
           <param name="srcUrl" value="http://archive.apache.org/dist/xerces/j"/>
           <param name="zipFile" value="Xerces-J-bin.2.9.1.zip"/>
           <param name="srcJarPath" value="${xerces.dir}/xercesImpl.jar"/>
-          <param name="destJarFile" value="xercesImpl.jar"/>
+          <param name="destJarFile" value="${lib.ext.dir}/xercesImpl.jar"/>
           <param name="md5" value="a0e07ede1c3bd5231fe15eae24032b2e"/>
         </antcall>
 
-        <copy toDir="${FLEX_LIB}" file="${download.dir}/${xerces.dir}/xml-apis.jar" />
+        <copy toDir="${lib.ext.dir}" file="${download.dir}/${xerces.dir}/xml-apis.jar"
/>
         
-        <!--mkdir dir="${FLEX_LIB}/xalan-NOTICES"/-->
-        <copy todir="${FLEX_LIB}">
+        <copy todir="${lib.ext.dir}">
             <fileset dir="${download.dir}/${xerces.dir}">
-                <include name="*LICENSE*"/>
                 <include name="*NOTICE*"/>
             </fileset>            
             <globmapper from="*" to="xerces-NOTICES/*"/>
         </copy>
+        <copy todir="${lib.ext.dir}">
+            <fileset dir="${download.dir}/${xerces.dir}">
+                <include name="*LICENSE*"/>
+            </fileset>            
+            <globmapper from="*" to="xerces-LICENSE/*"/>
+        </copy>
+    </target>
+	
+	<!--============================================================================= -->
+	<!--      Optional Jars.  Licenses are not compatible with Apache v2 license.     -->
+	<!--============================================================================= -->
+	
+	<!--
+        flex-messaging-common.jar - BlazeDS interface for -service compiler option
+    -->
+    
+    <target name="blazeds-jar-check" unless="blazeds.donot.ask"
+        description="Checks if flex-messaging-common.jar is in optional lib directory.">
+        <available file="${lib.opt.dir}/flex-messaging-common.jar" property="blazeds.donot.ask"/>
+    </target>
+    
+    <target name="blazeds-jar" depends="blazeds-jar-check,get-blazeds-jar" 
+        description="Downloads and copies flex-messaging-common.jar to the optional lib directory."/>
+
+    <!-- Prompt before downloading.  -->
+    <target name="ask-blazeds" unless="blazeds.donot.ask"
+        description="Prompt the user before downloading BlaseDS">
+        
+        <echo message="Apache Flex can optionally integrate with Adobe BlazeDS."/>
+        <echo message="This feature requires flex-messaging-common.jar from the Adobe
Flex SDK."/>
+        <echo message="The Adobe SDK license agreement for Adobe Flex 4.6 applies to this
jar."/>
+        <echo message="This license is not compatible with the Apache v2 license."/>
+        <antcall target="echo-adobe-flex-sdk-license"/>
+        <input
+            message="${line.separator}Do you want to install this jar from the Adobe Flex
SDK?"
+            validargs="y,n"
+            defaultvalue="n"
+            addproperty="input.blazeds.download"/>
+        <condition property="do.blazeds.install">
+            <equals arg1="y" arg2="${input.blazeds.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="blazeds.donot.ask" value="set"/>
+    </target>
+        
+    <target name="get-blazeds-jar" depends="ask-blazeds" if="do.blazeds.install">
+
+        <available file="${download.dir}/${adobe.flex.sdk}" type="dir"
+            property="adobe.flex.sdk.exists"/>
+        
+        <antcall target="get-adobe-flex-sdk"/>
+
+        <copy file="${download.dir}/${adobe.flex.sdk}/lib/flex-messaging-common.jar" 
+            todir="${lib.opt.dir}" verbose="true"/>
+        <copy file="${download.dir}/${adobe.flex.sdk}/license-adobesdk.htm" 
+            tofile="${lib.opt.dir}/flex-messaging-common-LICENSE.htm" verbose="true"/>
+    </target>
+
+	<!--
+        Embedded Font Support
+    -->
+    
+    <target name="font-jars-check" unless="font.donot.ask"
+        description="Checks if font jars are in the optional lib directory.">        
+        <condition  property="font.donot.ask">
+            <and>
+                <available file="${lib.opt.dir}/flex-fontkit.jar"/>
+                <available file="${lib.opt.dir}/adt.jar"/>
+                <available file="${lib.opt.dir}/afe.jar"/>
+                <available file="${lib.opt.dir}/aglj40.jar"/>
+                <available file="${lib.opt.dir}/rideau.jar"/>
+            </and>
+        </condition>
+    </target>
+    
+    <target name="font-jars" depends="font-jars-check,get-font-jars" 
+        description="Downloads and copies font jars to the optional lib directory."/>
+
+    <!-- Prompt before downloading.  -->
+    <target name="ask-font" unless="font.donot.ask"
+        description="Prompt the user before downloading BlaseDS">
+        
+        <echo message="Apache Flex can optionally integrate with Adobe's embedded font
support."/>
+        <echo message="This feature requires a few font jars from the Adobe Flex SDK."/>
+        <echo message="The Adobe SDK license agreement for Adobe Flex 4.6 applies to these
jars."/>
+        <echo message="This license is not compatible with the Apache v2 license."/>
+        <antcall target="echo-adobe-flex-sdk-license"/>
+        <input
+            message="${line.separator}Do you want to install these jars from the Adobe Flex
SDK?"
+            validargs="y,n"
+            defaultvalue="n"
+            addproperty="input.font.download"/>
+        <condition property="do.font.install">
+            <equals arg1="y" arg2="${input.font.download}"/>
+        </condition>
+        <!-- Only ask once per ant run.  -->
+        <property name="font.donot.ask" value="set"/>
+    </target>
+    
+    <target name="get-font-jars" depends="ask-font" if="do.font.install">
+        
+        <available file="${download.dir}/${adobe.flex.sdk}" type="dir"
+            property="adobe.flex.sdk.exists"/>
+        
+        <antcall target="get-adobe-flex-sdk"/>
+        
+        <copy todir="${lib.opt.dir}" verbose="true">
+            <fileset dir="${download.dir}/${adobe.flex.sdk}/lib">
+                <include name="adt.jar" />
+                <include name="afe.jar" />
+                <include name="aglj40.jar" />
+                <include name="flex-fontkit.jar" />
+                <include name="rideau.jar" />
+            </fileset>
+        </copy>
+        
+        <copy file="${download.dir}/${adobe.flex.sdk}/license-adobesdk.htm" 
+            tofile="${lib.opt.dir}/flex-fontkit-LICENSE.htm" verbose="true"/>
+        <copy file="${download.dir}/${adobe.flex.sdk}/license-adobesdk.htm" 
+            tofile="${lib.opt.dir}/adt-LICENSE.htm" verbose="true"/>
+        <copy file="${download.dir}/${adobe.flex.sdk}/license-adobesdk.htm" 
+            tofile="${lib.opt.dir}/afe-LICENSE.htm" verbose="true"/>
+        <copy file="${download.dir}/${adobe.flex.sdk}/license-adobesdk.htm" 
+            tofile="${lib.opt.dir}/aglj40-LICENSE.htm" verbose="true"/>
+        <copy file="${download.dir}/${adobe.flex.sdk}/license-adobesdk.htm" 
+            tofile="${lib.opt.dir}/rideau.jar-LICENSE.htm" verbose="true"/>
+    </target>
+        	
+    <target name="echo-adobe-flex-sdk-license">
+        
+        <echo message="Adobe Flex SDK License Agreement:
+            ${line.separator}
+            ${line.separator}All files contained in this Adobe Flex SDK download are subject
to and governed by the
+            ${line.separator}Adobe Flex SDK License Agreement specified here: 
+            ${line.separator}    http://www.adobe.com/products/eulas/pdfs/adobe_flex_software_development_kit-combined-20110916_0930.pdf,

+            ${line.separator}By downloading, modifying, distributing, using and/or accessing
any files in this Adobe Flex SDK, 
+            ${line.separator}you agree to the terms and conditions of the applicable end
user license agreement.
+            ${line.separator}
+            ${line.separator}In addition to the Adobe license terms, you also agree to be
bound by the third-party terms specified here: 
+            ${line.separator}    http://www.adobe.com/products/eula/third_party/. 
+            ${line.separator}Adobe recommends that you review these third-party terms." />
+    </target>
+
+    <target name="get-adobe-flex-sdk" unless="adobe.flex.sdk.exists"
+        description="Downloads the Adobe Flex 4.6 SDK">
+        
+        <!--antcall target="download-zip">
+          <param name="download.dir" value="${download.dir}/${adobe.flex.sdk}"/>
+          <param name="srcUrl" value="http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4.6"/>
+          <param name="zipFile" value="flex_sdk_4.6.0.23201B.zip"/>
+        </antcall-->
+        
+        <property name="zipFile" value="flex_sdk_4.6.0.23201B.zip"/>
+        <mkdir dir="${download.dir}"/>        
+        <get src="http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4.6/${zipFile}"

+            dest="${download.dir}/${zipFile}"/>
+
+        <unzip src="${download.dir}/${zipFile}" dest="${download.dir}/${adobe.flex.sdk}">
+            <patternset>
+                <include name="license-adobesdk.htm"/>
+                <include name="lib/flex-messaging-common.jar"/>
+                <include name="lib/adt.jar" />
+                <include name="lib/afe.jar" />
+                <include name="lib/aglj40.jar" />
+                <include name="lib/flex-fontkit.jar" />
+                <include name="lib/rideau.jar" />
+            </patternset>
+        </unzip>
     </target>
-		
+    
+    <target name="clean-adobe-flex-sdk">
+        <delete dir="${download.dir}/${adobe.flex.sdk}"/>
+    </target>
+
 	<!--
 	   mpl_excludes
 	   

Modified: incubator/flex/trunk/modules/thirdparty/xerces-patch/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/modules/thirdparty/xerces-patch/build.xml?rev=1345276&r1=1345275&r2=1345276&view=diff
==============================================================================
--- incubator/flex/trunk/modules/thirdparty/xerces-patch/build.xml (original)
+++ incubator/flex/trunk/modules/thirdparty/xerces-patch/build.xml Fri Jun  1 17:03:13 2012
@@ -30,7 +30,7 @@
 	<!-- properties -->
     <property file="../../../build.properties"/>
 
-    <property name="lib.dir" value="../../../lib" />
+    <property name="lib.ext.dir" value="../../../lib/external" />
     <property name="module.dir" value="."/>
     <property name="module.src" value="${module.dir}/src/java"/>
     <property name="module.classes" value="${module.dir}/classes"/>
@@ -41,7 +41,7 @@
     <target name="dev" depends="jar" description="runs src.depend build for development"/>
 
     <path id="xerces.classpath">
-        <fileset dir="${lib.dir}">
+        <fileset dir="${lib.ext.dir}">
             <include name="xercesImpl*.jar" />
             <exclude name="xercesPatch.jar" />
         </fileset>
@@ -66,7 +66,7 @@
         <copy file="../../../NOTICE" todir="${module.classes}/META-INF"/>
 
 		<echo message="Building lib/xercesPatch.jar"/>
-        <jar file="${lib.dir}/xercesPatch.jar" basedir="${module.classes}" includes="**/*">
+        <jar file="${lib.ext.dir}/xercesPatch.jar" basedir="${module.classes}" includes="**/*">
             <manifest>
                 <attribute name="Sealed" value="${manifest.sealed}"/>
                 <attribute name="Implementation-Title" value="${manifest.Implementation-Title}
- Patch for Apache Xerces 2.9.1"/>
@@ -78,7 +78,7 @@
 
     <target name="clean" description="clean">
         <delete failonerror="false" includeEmptyDirs="true">
-            <fileset file="${lib.dir}/xercesPatch.jar"/>
+            <fileset file="${lib.ext.dir}/xercesPatch.jar"/>
             <fileset dir="${module.classes}">
                 <include name="**/*"/>
             </fileset>
@@ -87,7 +87,7 @@
     </target>
 
     <target name="prepare">
-        <mkdir dir="${lib.dir}"/>
+        <mkdir dir="${lib.ext.dir}"/>
         <mkdir dir="${module.classes}"/>
     </target>
 



Mime
View raw message