6. Using Flex Builder 3
Configuration
In order to use GDS sample applications with Flex Builder 3 (2 should work but has not been tested), you must add two files and customize your .project as follows (using graniteds-ejb3-1.2.0.zip as example):
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <actionScriptProperties mainApplicationPath="Persons.mxml" version="3"> <compiler additionalCompilerArguments=" -locale en_US -services WEB-INF/flex/services-config.xml -context-root /graniteds-ejb3 -include-libraries ../../lib/granite.swc -include-libraries ../../lib/granite-hibernate.swc " copyDependentFiles="false" enableModuleDebug="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersion="9.0.28" htmlPlayerVersionCheck="true" outputFolderPath="build/swf" rootURL="http://localhost:8080/graniteds-ejb3/" sourceFolderPath="ear/addressbook.war" strict="true" useApolloConfig="false" verifyDigests="true" warn="true"> <compilerSourcePath> <compilerSourcePathEntry kind="1" linkType="1" path="as3"/> </compilerSourcePath> <libraryPath defaultLinkType="1"> <libraryPathEntry kind="4" path=""/> </libraryPath> <sourceAttachmentPath/> </compiler> <applications> <application path="Persons.mxml"/> </applications> <modules/> <buildCSSFiles/> </actionScriptProperties>
Note that the additionalCompilerArguments attribute value should be written on a single line.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <flexProperties flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="1"/>
You must then add a flexnature and an actionscript nature to the project, which can be done via the contextual menu on the project, resulting in the following .project file:
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>graniteds_ejb3</name> <comment>Granite Data Services EJB3 Demo</comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>com.adobe.flexbuilder.project.flexbuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>com.adobe.flexbuilder.project.flexnature</nature> <nature>com.adobe.flexbuilder.project.actionscriptnature</nature> </natures> </projectDescription>
Configuration with Tide
The Flex builder configuration is almost identical, you will just have to include the Tide versions of the GDS libraries:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <actionScriptProperties mainApplicationPath="Persons.mxml" version="3"> <compiler additionalCompilerArguments=" -locale en_US -services WEB-INF/flex/services-config.xml -context-root /graniteds-seam -include-libraries ../../lib/granite-tide.swc -include-libraries ../../lib/granite-tide-hibernate.swc -include-libraries ../../lib/granite-tide-seam.swc " copyDependentFiles="false" enableModuleDebug="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersion="9.0.28" htmlPlayerVersionCheck="true" outputFolderPath="build/swf" rootURL="http://localhost:8080/graniteds-ejb3/" sourceFolderPath="ear/addressbook.war" strict="true" useApolloConfig="false" verifyDigests="true" warn="true"> <compilerSourcePath> <compilerSourcePathEntry kind="1" linkType="1" path="as3"/> </compilerSourcePath> <libraryPath defaultLinkType="1"> <libraryPathEntry kind="4" path=""/> </libraryPath> <sourceAttachmentPath/> </compiler> <applications> <application path="Persons.mxml"/> </applications> <modules/> <buildCSSFiles/> </actionScriptProperties>
