Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

The Maven SDKs provided in Velos "classic" style, contained all libs with versions that were identical to the FDK version. This is correct in most cases, but not in all. Special examples are osmf and textlayout. These are versioned separately. In the patched "A" and "B" FDKs released by Adobe, the framework, mx and spark libraries also have different versions. Trying to load these libraries from Adobe servers will fail as they are not deployed using the filenames Flexmojos is expecting. This is one of the reasons the new FDKs used by Flexmojos 6.x contain all libraries in their native version, making it possible to load the SWZ files from Adobe servers.

To avoid runtime loading errors, make sure the Adobe-signed Flex 4 RSL dependencies are listed first in your pom.xml file. You should match the order of the Adobe framework RSLs defined in sdks/4.1.0/frameworks/flex-config.xml by the order of the <runtime-shared-library-path> elements.

The RSL runtime loading sequence matches the Flex compiler SWC linking sequence. The flex-mojos plugin relies on Maven for dependency resolution and sequencing. Maven sequences the dependencies using the order specified in the dependencies section. Maven will use the first matching dependency encountered in the case of duplicates/conflicts.

Below is an example pom.xml snippet using FM-5.x. Note the specific version number used for the textLayout RSL (see details below).

  <packaging>swf</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <!-- Use Adobe-signed framework Runtime Shared Libraries (RSLs). -->
          <policyFileUrls>
            <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
          </policyFileUrls>
          <rslUrls>
            <url>http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_{version}.{extension}</url>
            <!-- TextLayout is not deployed using the SDK global version -->
            <url>http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_${flex.sdk.textLayout.version}.{extension}</url>
          </rslUrls>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <!-- Dynamically load the Adobe signed RSL framework instead of merging into SWF. -->
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>textLayout</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <!-- OSMF SWC would go here. -->
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>framework</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>spark</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>sparkskins</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>rpc</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>datavisualization</artifactId>
      <version>${flex.sdk.version}</version>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>
    <!-- Flex framework resource bundles -->
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>${flex.sdk.version}</version>
      <type>pom</type>
    </dependency>

  </dependencies>

(warning)  The TextLayout SWZ is hosting by Adobe using a specific version number. This is the reason why we have to define a second failover URL in the <rslUrls> element. For example, to use this failover using Flex SDK 4.5.1, you have to declare the following properties:

<flex.sdk.version>4.5.1.21328</flex.sdk.version>
<flex.sdk.textLayout.version>2.0.0.232</flex.sdk.textLayout.version>

(info) Note that using FM-6x you will not need to use this workaround. You will directly specify the TextLayout version in your dependency (see the note at the top of this page):

<dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>textLayout</artifactId>
      <version>${flex.sdk.textLayout.version}</version>
      <type>swc</type>
      <scope>caching</scope>
</dependency>

 


Note on the usage of signed RSLs and Apache Flex SDK:

Given that Adobe is the single entity which can sign RSL and produces SWZ files, Apache Flex will not be allowed to deploy signed stuff. So it seems that we'll not be able to benefit from the Flash Player cache.

 

  • No labels