Hi,

I just built and installed the current ApacheFlex SDK in my Maven Local 
Repository on Windows 7, here are the instructions to reproduce.
(Note : I was able to successfully run it against a modular Java/Flex 
application using FlexBuilder 4.6 and Maven 3.0.3.The convention for the 
version has not been established yet, some have been proposed, I gonna follow 
one of them '2012.0.1')

It's based on the Erik instructions from the previous post with some 
adaptations and the Conrad blog post at http://www.dz015.com/?p=346 for Maven

I assume these softwares are installed and well configured:- The Subversion 
software of your choice (I use TortoiseSVN)- Java: 1.6.0_25-b06, but I guess 
you can use the one you like >= 1.5- Ant: I used the 1.8.2 
(http://ant.apache.org/bindownload.cgi).- 7-zip (http://www.7-zip.org/)- 
vanilla Flash Builder 4.6

And then :- Open Source Flex SDK. I downloaded it from 
http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.6 and 
unpackaged it to 'ApacheFlexSDK/2012.0.1' in the temporary folder of your 
choise.- copy "flexTasks.JAR" from 'ApacheFlexSDK/2012.0.1/ant/lib' to the 
'libs' folder of your 'apache-ant-1.8.2' instalation folder.- copy the content 
of this file 
'https://github.com/piercer/flex_sdk_maven_install/blob/master/flex4.5.1.21328_molehill.compiler.descriptors.xml'
 to 'ApacheFlexSDK/apache_flex_2012.0.1.compiler.descriptors.xml'- copy the 
content of this file 
'https://github.com/piercer/flex_sdk_maven_install/blob/master/flex4.5.1.21328_molehill.framework.descriptors.xml'
 to 'ApacheFlexSDK/apache_flex_2012.0.1.framework.descriptors.xml'

On to the configuration:

- environment variables (run 
'C:\Windows\System32\SystemPropertiesAdvanced.exe')- click on 'Environment 
variables...' and under 'System variables'
# Flex SDK build variablesadd: FLEX_SDK=pathToYour\ApacheFlexSDK\2012.0.1
# bin directory of Flex SDKIn the 'path' variable add '%FLEX_SDK%/bin'

- empty the 'ApacheFlexSDK\2012.0.1\frameworks' folder except the 
'frameworks\locale' and the 'frameworks\libs\automation'

Get the source:- grab a working copy of the 
'http://svn.apache.org/repos/asf/incubator/flex/whiteboard/frameworks/'repo and 
put it in your local (just emptied) 'frameworks' folder, accept the 
replacememnt of files if asked.

Now for the fun part:- open a DOS Console as Administrator, cd to the 
'ApacheFlexSDK\2012.0.1' folder and enter the followingcommand: "ant -f 
build_framework.xml". This will download some thirdparty code (this takes a 
couple of minutes) and then builds the SDK.When done, you see the lovely words 
"BUILD SUCCESSFUL".

- rename 'ApacheFlexSDK/2012.0.1/frameworks/libs/player/11.0' 
to'ApacheFlexSDK/2012.0.1/frameworks/libs/player/11.1' (yes, from 11.0 to 11.1, 
in short).

- remove the 'ApacheFlexSDK\2012.0.1\frameworks\svn' folder- copy 
'ApacheFlexSDK\2012.0.1' to 'C:\Program Files (x86)\Adobe\Adobe Flash Builder 
4.6\sdks\2012.0.1'- Go into the Flash Builder preferences and add the new SDK, 
you can even create a project to play with and check it works (thank you to 
report in case it doesn't).


The Maven part :

- Create an empty zip file in 'ApacheFlexSDK\2012.0.1' and rename it 
'empty.swc'- Zip with 7-zip the content of 'ApacheFlexSDK\2012.0.1\' to 
'ApacheFlexSDK\apache_flex_sdk_2012.0.1.zip'

- in 'ApacheFlexSDK/apache_flex_2012.0.1.framework.descriptors.xml' :change 
'<version>4.5.1.21328-MOLEHILL-11.0</version>' to 
'<version>2012.0.1</version>'change '<classifier>11</classifier>' to 
'<classifier>11.1</classifier>' change 
'<location>frameworks/libs/player/11.0/playerglobal.swc</location>' to 
'<location>frameworks/libs/player/11.1/playerglobal.swc</location>' 

- in 'ApacheFlexSDK/apache_flex_2012.0.1.compiler.descriptors.xml' :change 
'<version>4.5.1.21328-MOLEHILL-11.0</version>' to '<version>2012.0.1</version>'

- in the previously opened open DOS Console, in 'ApacheFlexSDK', run :mvn 
org.sonatype.plugins:bundle-publisher-maven-plugin:1.1:install-bundle 
-Dbundle=apache_flex_sdk_2012.0.1.zip 
-Ddescriptor=apache_flex_2012.0.1.framework.descriptors.xmlmvn 
org.sonatype.plugins:bundle-publisher-maven-plugin:1.1:install-bundle 
-Dbundle=apache_flex_sdk_2012.0.1.zip 
-Ddescriptor=apache_flex_2012.0.1.compiler.descriptors.xml

You can now enjoy playing with Maven ApacheFlex Maven projects.(Note: because 
you can't use RSL caching in this version, use 'rsl' as scope instead in your 
POMs)

Frédéric Thomas                                           

Reply via email to