- Create standard maven webapp using "mvn archetype:create -DgroupId=... -DartifactId=... -DarchetypeArtifactId=maven-archetype-webapp (optionally set build/finalName in pom.xml)
- Create following folders inside app/src: main/java, main/resources, main/flex, test/java, test/resources, main/webapp/flex
- run eclipse:eclipse and import the project to Eclipse/FlexBuilder
- Right-click on project and select "Flex Project Nature -> Add Flex Project Nature"
- Specify following settings using configuration wizard:
- Application server type: None
- Output folder: src\main\webapp\flex
- Switch to Flex perspective and fix project settings:
- "Project Properties" -> "Flex Build Path" -> "Main source folder" - enter "src/main/flex", Verify "Output folder" = "src\main\webapp\flex"
- Move main.mxml to src/main/flex
- "Project Properties" -> "Flex Applications" - add main.mxml
- "Project Properties" -> "Flex Compiler" - Uncheck "Generate HTML wrapper file"
- Edit pom.xml and add your dependencies and maven-jetty-plugin (in order to run embeded jetty container). See attached sample pom.xml
- If developing on Windows, extract webdefault.xml (see sample file attached) from jetty.jar, change useFilemappedBuffer=false, store it in src/main/resources and reference it in jetty config in pom.xml (see http://appfuse.org/display/APF/FAQ#FAQ-jettyrunlocked and http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows for more details)
- Create wrapper HTML/JSP (Do it manually not using FB or ant tasks, since you may want to pass some params using flashvars, create HTTP session, etc.) See attached sample main-wrapper.jsp
- Copy playerProductInstall.swf and AC_OETags.js from Flex SDK installation into src/main/webapp/flex
|
 Updating...
Isaac Levin, Jun 11, 2008, 2:34 PM
Isaac Levin, Jun 11, 2008, 2:33 PM
Isaac Levin, Jun 11, 2008, 2:35 PM
|