I'm trying yet again to compile our projects with FM4 toolchain, and failing
miserably.

We have SWFs that link to SWCs, that themselves have various SWCs - eg:

ourlib (swf) (optimised to RSL)
 cairngorm (swc)

ourproduct (swf)
 ourlib (rsl)
 cairngorm (swc)

The first problem is SWF projects with RSL dependencies seem to get the RSL
included in the external library path as well. This can be
fixed by removing the RSL scope from line 2121 of
AbstractFlexCompilerMojo.java to be


return MavenUtils.getFiles( getDependencies( not( GLOBAL_MATCHER ),//
                                                         allOf( type( SWC
),//
                                                                anyOf(
scope( EXTERNAL ), scope( CACHING ) ) ) ),
                                        getGlobalArtifactCollection() );

 However, when our application is built, it doesn't run, and vomits horrid
errors into flashlog.txt like

VerifyError: Error #1014: Class mx.containers::TitleWindow could not be
found.

I attribute this to the fact that adding
<dependency>
      <groupId>com.adobe.flex.framework</groupId>
        <artifactId>flex-framework</artifactId>
        <type>pom</type>
         <version>4.5.1.21328</version>
    </dependency>

Into the POM tries to include all of flex, rather than refer to it as an RSL
(quite why this stops it from running, I have no idea - but flex's
classloader seems to be complete crap, so all I can do is try to make the FM
outputted config report look like the FB one)

So I create a parallel flex-framework and flex-compiler pom, version
4.5.1.21328-rsl, that refers to the flex libraries in the same way - I.E:

<dependencies>
      <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>framework</artifactId>
      <version>4.5.1.21328</version>
      <type>swc</type>
   *   <scope>rsl</scope>*
    </dependency>

And recompile.... but no joy, they're *still* appearing as
compiler.library-path elements, not runtime-shared-library-path elements.
Doing
mvn dependency:tree is revealing:

[INFO]
net.realtimehealth.realtime.modules:realtime-flex-kpi:swf:3.0-SNAPSHOT
[INFO] +- com.adobe.flex.framework:halo:swc:theme:4.5.1.21328:theme
[INFO] +- com.adobe.flex.framework:spark:css:theme:4.5.1.21328:theme
[INFO] +- net.r.r.modules:r-flex-components:swc:3.0-SNAPSHOT:rsl
[INFO] |  +- com.nirima.ribbons:ribbons:swc:1.0.1-SNAPSHOT:rsl (scope
managed from runtime)
[INFO] |  +- com.google.code:as3reflect:swc:1.0RC2:runtime
[INFO] |  \- degrafa:degrafa:swc:1.0-SNAPSHOT:runtime
[INFO] +- com.asfusion.mate:mate:swc:0.8.9.2.nrm-SNAPSHOT:rsl
[INFO] +- com.adobe.cairngorm:cairngorm:swc:2.2.1:compile
[INFO] +- net.r.r.modules.ui:r-flex-model:swc:3.0-SNAPSHOT:rsl
[INFO] +- net.r.commons:xmlstream:swc:2.3.x-SNAPSHOT:rsl
[INFO] +- flexlib:flexlib:swc:2.0-SNAPSHOT:compile
[INFO] +-
com.adobe.flex.framework:flex-framework:pom:4.5.1.21328-rsl:compile
[INFO] |  +-
com.adobe.flex.framework:common-framework:pom:4.5.1.21328-rsl:compile
[INFO] |  |  +- com.adobe.flex.framework:framework:swc:4.5.1.21328:runtime
[INFO] |  |  +- com.adobe.flex.framework:textLayout:swc:4.5.1.21328:runtime
[INFO] |  |  +- com.adobe.flex.framework:spark:swc:4.5.1.21328:runtime
[INFO] |  |  +- com.adobe.flex.framework:sparkskins:swc:4.5.1.21328:runtime
[INFO] |  |  +- com.adobe.flex.framework:rpc:swc:4.5.1.21328:runtime
[INFO] |  |  +- com.adobe.flex.framework:charts:swc:4.5.1.21328:runtime
[INFO] |  |  +- com.adobe.flex.framework:spark_dmv:swc:4.5.1.21328:runtime
[INFO] |  |  +- com.adobe.flex.framework:osmf:swc:4.5.1.21328:runtime
[INFO] |  |  +-
com.adobe.flex.framework:advancedgrids:swc:4.5.1.21328:runtime
[INFO] |  |  +-
com.adobe.flex.framework:authoringsupport:swc:4.5.1.21328:runtime
[INFO] |  |  +-
com.adobe.flex.framework:flash-integration:swc:4.5.1.21328:runtime
[INFO] |  |  +- com.adobe.flex.framework:mx:swc:4.5.1.21328:runtime
[INFO] |  |  +-
com.adobe.flex.framework:framework:zip:configs:4.5.1.21328:compile
[INFO] |  |  +-
com.adobe.flex.framework:advancedgrids:rb.swc:4.5.1.21328:compile
[INFO] |  |  +- com.adobe.flex.framework:charts:rb.swc:4.5.1.21328:compile
[INFO] |  |  +-
com.adobe.flex.framework:framework:rb.swc:4.5.1.21328:compile
[INFO] |  |  +- com.adobe.flex.framework:mx:rb.swc:4.5.1.21328:compile
[INFO] |  |  +- com.adobe.flex.framework:osmf:rb.swc:4.5.1.21328:compile
[INFO] |  |  +- com.adobe.flex.framework:rpc:rb.swc:4.5.1.21328:compile
[INFO] |  |  +- com.adobe.flex.framework:spark:rb.swc:4.5.1.21328:compile
[INFO] |  |  +-
com.adobe.flex.framework:textLayout:rb.swc:4.5.1.21328:compile
[INFO] |  |  \-
com.adobe.flex.framework:flash-integration:rb.swc:4.5.1.21328:compile


Many of those refs are wrong -
[INFO] |  |  +- com.adobe.flex.framework:framework:swc:4.5.1.21328:runtime
should be
[INFO] |  |  +- com.adobe.flex.framework:framework:swc:4.5.1.21328:*rsl*
*
*
That smells to me like a maven bug?

Is anyone actually successfully using FM4 + SDK 4.5.1 to build a flex app
that isn't just a trival SWF ?

-- 
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

http://flexmojos.sonatype.org/

Reply via email to