Hi David,

I managed to get RSLs to work (I think).  I'm using the following
versions (these properties are then replaced in all dependency
<version> tags.

<flexmojos.version>4.0-SNAPSHOT</flexmojos.version>
<flex.sdk.version>4.1.0.16076</flex.sdk.version>
<flexunit.version>4.0-beta-2</flexunit.version>

So, I have this spec'd:

<policyFileUrls>
        <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
</policyFileUrls>
<rslUrls>
        <rsl>http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/
textLayout_1.1.0.604.swz</rsl>
        <url>http://fpdownload.adobe.com/pub/{extension}/flex/$
{flex.sdk.version}/{artifactId}_{version}.{extension}</url>
</rslUrls>

I'm not sure why we pinned textLayout to that explicit version.  I
have to go back and investigate that.

However, as stated on the wiki, spec'ing the rsl urls isn't enough.
You apparently need to also spec a whole bunch of dependencies as well
to get it to work.  This is my list...I'm not 100% sure if all of this
is necessary or not, but it seems to work:

    <dependency>
      <groupId>flash.flashx</groupId>
      <artifactId>textLayout</artifactId>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>

    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>framework</artifactId>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>

    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>spark</artifactId>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>

    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>sparkskins</artifactId>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>

    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>rpc</artifactId>
      <type>swc</type>
      <scope>caching</scope>
    </dependency>

    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>datavisualization</artifactId>
      <type>swc</type>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <type>pom</type>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>playerglobal</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.adobe.flex.framework</groupId>
          <artifactId>flash-integration</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>halo</artifactId>
      <classifier>theme</classifier>
      <type>swc</type>
      <scope>theme</scope>
    </dependency>

I'd love to hear any other people's experience with RSL configurations
-- perhaps there is something I'm doing wrong here, or could do
better, but it is working for now.  It wasn't an easy path to get
here...

On Apr 21, 1:51 am, David John Burrowes <[email protected]>
wrote:
> Hello all,
>
> I'm having a problem when trying to run unit tests with FlexUnit4 (with maven 
> and flexmojos, of course. "mvn test")
>
> The surface problem is that I get an exception in the flash player when it 
> tries to run a test.
> The deeper problem is that my unit tests, indirectly, depend on some classes 
> in rsl's which are not linked into the testing swf (and which are located in 
> the local maven repository)
>
> From the various docs, it seems like the right thing to do is to use the 
> rslUrls element in the plugin definition in the pom.xml  (as mentioned 
> herehttps://docs.sonatype.org/display/FLEXMOJOS/Runtime+Shared+Libraries).  
> However, I can't, for the life of me, figure out exactly what syntax I should 
> be specifying here.
>
> Does anyone have experience with this?
>
> Thanks!
>
> David
>
> I'm including my pom.xml, below, in case that sheds any light on this.
>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>                      http://maven.apache.org/maven-v4_0_0.xsd";>
>   <modelVersion>4.0.0</modelVersion>
>
>   <groupId>org.whatever.test</groupId>
>   <artifactId>sample-library</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <packaging>swc</packaging>
>
>   <name>sample-library Flex</name>
>
>   <properties>
>       <flex.sdk.version>4.1.0.16076</flex.sdk.version>
>   </properties>
>
>   <build>
>     <sourceDirectory>src/main/flex</sourceDirectory>
>     <testSourceDirectory>src/test/flex</testSourceDirectory>
>     <plugins>
>       <plugin>
>         <groupId>org.sonatype.flexmojos</groupId>
>         <artifactId>flexmojos-maven-plugin</artifactId>
>         <version>3.6.1</version>
>         <extensions>true</extensions>
>
>         <configuration>
>             <rslUrls>
>                 <!-- One of many variations I've tried -->
>                 
> <rsl>file:///C:/Users/me/example/repo/com/adobe/flex/framework/textLayout/4 
> .1.0.16076/{artifactId}-{version}.{extension}</rsl>
>             </rslUrls>
>         </configuration>
>
>         <dependencies>
>            <dependency>
>               <groupId>com.adobe.flex</groupId>
>               <artifactId>compiler</artifactId>
>               <version>${flex.sdk.version}</version>
>               <type>pom</type>
>            </dependency>
>            <dependency>
>               <groupId>com.adobe.flex.compiler</groupId>
>               <artifactId>asdoc</artifactId>
>               <version>${flex.sdk.version}</version>
>               <type>zip</type>
>               <classifier>template</classifier>
>            </dependency>
>         </dependencies>
>       </plugin>
>     </plugins>
>   </build>
>
>   <dependencies>
>     <dependency>
>       <groupId>com.adobe.flex.framework</groupId>
>       <artifactId>flex-framework</artifactId>
>       <version>4.1.0.16076</version>
>       <type>pom</type>
>       <exclusions>
>         <exclusion>
>           <artifactId>playerglobal</artifactId>
>           <groupId>com.adobe.flex.framework</groupId>
>         </exclusion>
>       </exclusions>
>     </dependency>
>
>     <dependency>
>       <groupId>com.adobe.flex.framework</groupId>
>       <artifactId>playerglobal</artifactId>
>       <version>4.1.0.16076</version>
>       <type>swc</type>
>       <classifier>10.1</classifier>
>     </dependency>
>
>     <dependency>
>       <groupId>com.adobe.flex.framework</groupId>
>       <artifactId>textLayout</artifactId>
>       <version>4.1.0.16076</version>
>       <type>swc</type>
>       <scope>external</scope>       <!-- merged works, of course -->
>     </dependency>
>
>     <dependency>
>       <groupId>com.adobe.flexunit</groupId>
>       <artifactId>flexunit</artifactId>
>       <version>4.0-rc-1</version>
>       <type>swc</type>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
>
> </project>

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