I have a project setup with Flex Mojos, basically configured as
proposed on this article: 
http://riadiscuss.jeffmaury.com/2008/10/maven-and-flex-builder-tutorial-part.html.

Although it was functional I ran into some problems when integrating
this on my project which requires EAR and other things.

I'm trying to setup different (new) folder structure and since I'm new
to Flex and to Flex Mojo I want to know if what I'm trying to do is
even possible.

My idea is to have the server side Java (Spring, JPA, etc) and Flex
under the same project and using the same pom.xml. The folder
structure would look like this:

/ProjectRoot
- pom.xml
- /bin-debug
- /flex_libs
- /html-template
- /src/main/flex
- /src/main/java
- /src/main/webapp
- /src/main/webapp/WEB-INF/flex/messaging.xml, proxy-config.xml, etc
- /src/test/flex
- /src/test/java

When I run mvn compile a flex-compiler folder is created with
config.xml and font.ser but my main.mxml file is never compiled into a
swf file, although the log says the compilation was successful. I
believe my dependencies are correct because I did have some issues
that I fixed including the dependencies for flex-framework and
com.adobe.flex.sdk for example.

Below the compiler log and pom.xml fragment.
Any feedback is appreciated.
Thanks,
Handerson

Here is the compiler log:
-compiler.accessible=false
-compiler.actionscript-file-encoding UTF-8
-compiler.allow-source-path-overlap=false
-compiler.as3=true
-compiler.context-root lalala-web-1.0.0
-compiler.debug=false
-compiler.es=false
-compiler.external-library-path C:\Documents and Settings
\xx15353\workspace\ITDashboard\target\flex-compiler\libraries\external
\playerglobal.swc
-compiler.fonts.local-fonts-snapshot C:\Documents and Settings
\xx15353\workspace\ITDashboard\target\flex-compiler\fonts.ser
-compiler.headless-server=false
-compiler.include-libraries=
-compiler.keep-all-type-selectors=false
-compiler.keep-generated-actionscript=false
-compiler.library-path c:\xx15353\.m2\repository\com\adobe\flex
\framework\flex\3.1.0.2710\flex-3.1.0.2710.swc c:
\xx15353\.m2\repository\com\adobe\flex\framework\framework
\3.1.0.2710\framework-3.1.0.2710.swc c:\xx15353\.m2\repository\com
\adobe\flex\framework\playerglobal
\9-3.1.0.2710\playerglobal-9-3.1.0.2710.swc c:\xx15353\.m2\repository
\com\adobe\flex\framework\rpc\3.1.0.2710\rpc-3.1.0.2710.swc c:
\xx15353\.m2\repository\com\adobe\flex\framework\utilities
\3.1.0.2710\utilities-3.1.0.2710.swc c:\xx15353\.m2\repository\com
\adobe\flex\sdk\framework\3.0.0.477\framework-3.0.0.477.swc c:
\xx15353\.m2\repository\com\adobe\flex\sdk\rpc
\3.0.0.477\rpc-3.0.0.477.swc c:\documents and settings
\xx15353\.m2\repository\com\adobe\flex\sdk\framework
\3.0.0.477\framework-3.0.0.477-en_US.swc c:\documents and settings
\xx15353\.m2\repository\com\adobe\flex\sdk\framework
\3.0.0.477\framework-3.0.0.477-ja_JP.swc c:\documents and settings
\xx15353\.m2\repository\com\adobe\flex\sdk\rpc\3.0.0.477\rpc-3.0.0.477-
en_US.swc
-compiler.optimize=true
-compiler.services C:\Documents and Settings\xx15353\workspace
\ITDashboard\src\main\webapp\WEB-INF\flex\services-config.xml
-compiler.source-path C:\Documents and Settings\xx15353\workspace
\ITDashboard\src\main\flex
-compiler.strict=true
-compiler.theme=
-compiler.use-resource-bundle-metadata=true
-compiler.verbose-stacktraces=false
-default-background-color 8821927
-default-frame-rate 24
-default-script-limits 1000 60
-default-size 500 375
-licenses.license flexbuilder3.displayedFirstLaunchMessage true
-licenses.license flexbuilder3.displayedStartPageAtLeastOneTime true
-load-config C:\Documents and Settings\xx15353\workspace\ITDashboard
\target\flex-compiler\config.xml
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 10 seconds
[INFO] Finished at: Wed Dec 17 16:25:46 EST 2008
[INFO] Final Memory: 13M/84M
[INFO]
------------------------------------------------------------------------

Pom.xml inside the <build> block
        <build>
                <sourceDirectory>src/main/flex</sourceDirectory>
                <testSourceDirectory>src/test/flex</testSourceDirectory>
                <outputDirectory>
                        ${project.build.directory}/flex-compiler
                </outputDirectory>
                <plugins>
                        <!-- Flex Compiler-->
                        <plugin>
                                <groupId>info.rvin.mojo</groupId>
                                <artifactId>flex-compiler-mojo</artifactId>
                                <version>1.0</version>
                                <extensions>true</extensions>
                                <executions>
                                        <execution>
                                                <goals>
                                                        <goal>compile-swf</goal>
                                                </goals>
                                                <configuration>
                                                        <services>
                                                                
src/main/webapp/WEB-INF/flex/services-config.xml
                                                        </services>
                                                        <contextRoot>
                                                                
lalala-web-${project.version}
                                                       </contextRoot>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                   </build>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos?hl=en?hl=en

http://blog.flex-mojos.info/
-~----------~----~----~----~------~----~------~--~---

Reply via email to