Select Page

A. Eclipse
1.       Install Eclipse www.eclipse.org/downloads/ .  As of writing, Indigo is the latest version, but these instructions also work for Ganymede or Galileo.
2.       (Optional) Window -> Preferences -> Network Connection -> HTTP Proxy
3.       Help ->Software Updates -> Available Software -> Add Site
·         http://m2eclipse.sonatype.org/sites/m2e  (choose the latest version)
·         http://m2eclipse.sonatype.org/sites/m2e-extras (choose the latest version)
4.       Install Flex Builder Eclipse Plugin 3.5 by searching in Google fb3_wwej_plugin.exe site:download.macromedia.com
5.       Download the latest Maven http://maven.apache.org/download.html
6.       Window -> Preferences -> Maven -> Installations -> Add…  (Specify the Maven location)
7.       (Optional) Copy Maven’s settings.xml to {WORKSPACE_DIR }settings.xml .  Customize <localRepository> and mirror URLs
8.       Window -> Preferences -> Maven -> User Settings -> (Select { WORKSPACE_DIR}settings.xml) -> Update Settings
9.       Window -> Preferences -> JRE -> Add (Select JDK 1.6 JRE directory)
8.       Download Flex 3.0.0.477 (or latest version) http://opensource.adobe.com/wiki/display/flexsdk/download?build=3.0.0.477&pkgtype=1
9.       Window -> Prefrences -> Flex -> Installed SDK (Select Flex 3.0.0.477 directory)
B. Maven Projects
1.       SVN Explore {PROJ_TRUNK_URL}
2.       Right-click on the project/s.
3.       Checkout as Maven Project -> Check Advanced.  Name template [groupId][artifactId]

5.       Project -> uncheck Build automatically
6.       Open main.mxml. Set url of <mx:ModuleLoader> to corrections.swf.
7.       Set Java Build Path for all java projects.  Right-click on the project -> Properties -> Java Build Path -> Libraries -> JRE System Library -> Edit… (Select JRE 1.6)
8.       Run -> Run Configurations -> Maven Build
9.   New -> Browse Workspace -> Select com.xxx.myfirstflex-java.  Goals: clean compile install.  Check Update snapshots & Skip Tests. Name as 01) myfirstflex-java
10.   Repeat for the rest of java projects in the workspace.
11.   New -> Browse Workspace -> Select com.xxx.myfirstflex-flex.  Goals: org.sonatype.flexmojos:flexmojos-maven-plugin:3.6.1:flexbuilder.  Check Update snapshots & Skip Tests.  Name as 02) myfirstflex-flexnature
12.   Repeat for the rest of flex projects in the workspace
13.   Right-click on com.xxx.myfirstflex-web -> Properties -> Web Project Settings -> myfirstflex
14.   Run -> Run Configurations… -> Maven Build 01) myfirstflex-java

15.   Run flex-mojo Maven: 02) myfirstflex-flexnature
16.   Close the corresponding flex project.  Then re-open in order to have the project updated by Eclipse.  Notice the project icon changed from J to F.
17.   Repeat for the rest of flex projects

·         Note: For adding FLEX nature to a flex project, if you get an error saying “Java compiler level does not match the version of the installed java project facet”, right-click on the project -> Properties -> Project Facets ->Java 6.0
18.   Create folder “bin-debug” beneath “/com.xxx.myfirstflex.web/src/main/webapp” linking to “bin-debug” folder of “/com.xxx.myfirstflex.flex/bin-debug”
19.   Select all projects -> Refresh.  Project -> Update Maven Dependencies.
20.   Add Tomcat Server.  Select myfirstflex-web.  You may need to change the Port number and timeout seconds.
21.   Start server.
22.   Run -> Run Configuration -> Flex application -> Project com.xxx.myfirstflex  .   Application file -> main.mxml
23.   Change the Debug/Profile/Run to the following URL: (change URL to use your PC’s full name, e.g. http://localhost:8080/myfirstflex/bin-debug/com/xxx/myfirstflex.swf .  Change the host+port accordingly.
24.   Run this Flex app to deploy in your browser.
Trouble-shooting:
In the event that main.swf does not launch successfully:
1.       Check local repo directory if files are updated.  Otherwise delete the directory/ies which were not updated and Maven again the appropriate project/s.
2.       Check if {WORKSPACE_DIR}com.xxx.myfirstflexflexbin-debug files are updated. Otherwise delete the directory and do Maven again.
3.       Check if {WORKSPACE_DIR}.metadata.pluginsorg.eclipse.wst.server.coretmp0wtpwebappscom.xxx.myfirstflex.webbin-debugcomxxxmyfirstflex updated files.  In some cases, the wtpwebapps directory is under tmp1 directory.  If the *.swf files are not updated, delete the org.eclipse.wst.server.core directory and run Flex app again.
4.       Try refreshing all projects, then update depencies manually by Project -> Update Maven Dependencies
5.       If you have recently synchronized files with SVN, check Hudson if the latest checked-in files are compiling 
If it is red, then the latest codes have errors.  Click on Console Output for the error logs.
6.       Before checking out the latest updates from SVN, it is a good practice to :
a.       Check first in Hudson if the project is compiling.
b.      Backup first your workspace so you can revert the last working version when SVN files are failing.