apache-flexmavenrslflexmojos

flexmojos - copy-flex-resources of rsls not working


I am trying to copy the the dependent rsls into war using the copy- flex-resources plugin. However I'm getting the following error :

[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven- plugin:3.8:copy-flex-resources (copy-flex-resources) on project smh: Failure to find com.adobe.flex.fram textLayout:swz:4.1.0.16076 in https://repository.sonatype.org/content/groups/flexgroup was cached in the local repository, resolution will not be reattempted until the update val of sonatype-flex-repository has elapsed or updates are forced ............ [ERROR] Then, install it using the command: [ERROR] mvn install:install-file -DgroupId=com.adobe.flex.framework - DartifactId=textLayout -Dversion=4.1.0.16076 -Dpackaging=swz -Dfile=/ path/to/file

I've already gone through the links http://groups.google.com/group/flex-mojos/browse_thread/thread/6f47b2980275aaeb http://groups.google.com/group/flex-mojos/browse_thread/thread/2aa96d8d69e1ddb5 https://repository.sonatype.org/content/sites/maven-sites/flexmojos/3.8/copy-flex-resources-mojo.html

I've followed listing of poms as specified in https://docs.sonatype.org/pages/viewpage.action?pageId=7045277

to resolve the above issue, I installed the swz file onto local repository using mvn install:install-file -DgroupId=com.adobe.flex.framework - DartifactId=textLayout -Dversion=4.1.0.16076 -Dpackaging=swz - Dfile=textLayout_1.1.0.604.swz (Side effect of this was this overwrote the existing pom config in repository )

and then ran mvn compile. I got the following error

[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven- plugin:3.8:copy-flex-resources (copy-flex-resources) on project smh: Failed to copy C:\Users\bharadke.m2\repository\com\adobe\flex \framework\textLayout\4.1.0.16076\textLayout-4.1.0.16076.swz: The filename, directory name, or volume label syntax is incorrect -> [Help 1]

Below are my pom.xml snippets 1. flex project pom :

           <build>
                   <sourceDirectory>src/main/flex</sourceDirectory>
                   <testSourceDirectory>src/test/flex</testSourceDirectory>
                   <plugins>
                           <plugin>
                                   <groupId>org.sonatype.flexmojos</groupId>
                                   <artifactId>flexmojos-maven-plugin</artifactId>
                                   <version>${flex-mojos-plugin.version}</version>
                                   <extensions>true</extensions>
                                   <executions>
                                   </executions>
                                   <dependencies>
                                           <dependency>
                                                   <groupId>com.adobe.flex</groupId>
                                                   <artifactId>compiler</artifactId>
                                                   <version>${flex.sdk.version}</version>
                                                   <type>pom</type>
                                           </dependency>
                                   </dependencies>
                   <configuration>
                   <policyFileUrls>
           <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
           <url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
           </policyFileUrls>

             <rslUrls>
               <url>http://fpdownload.adobe.com/pub/swz/flex/$
    {flex.sdk.version}/{artifactId}_{version}.{extension}</url>
               <url>http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/
    {artifactId}_1.1.0.604.{extension}</url>
             </rslUrls>
                                   <keepAllTypeSelectors>true</keepAllTypeSelectors>
                   <contextRoot>/abc</contextRoot>
                    </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>
    <dependency>
        <groupId>org.puremvc.pipes</groupId>
        <artifactId>Utility_AS3_MultiCore_Pipes</artifactId>
        <version>1.1</version>
        <type>swc</type>
        <scope>rsl</scope>
    </dependency>

    <dependency>
        <groupId>org.puremvc.multicore</groupId>
        <artifactId>PureMVC_AS3_MultiCore</artifactId>
        <version>1.0.5</version>
        <type>swc</type>
        <scope>rsl</scope>
    </dependency>



2. web-application pom :

     <build>
      <finalName>foo</finalName>
          <plugins>
                                 <plugin>
                                   <groupId>org.sonatype.flexmojos</groupId>
                                   <artifactId>flexmojos-maven-plugin</artifactId>
                                   <version>${flex-mojos-plugin.version}</version>
                                   <extensions>true</extensions>
                                   <executions>
                                   <execution>
                                           <phase>compile</phase>
                                           <id>copy-flex-resources</id>
                                           <goals>
                                           <goal>copy-flex-resources</goal>
                                           </goals>
                                           </execution>
                                   </executions>
                                   <dependencies>
                                           <dependency>
                                                   <groupId>com.adobe.flex</groupId>
                                                   <artifactId>compiler</artifactId>
                                                   <version>${flex.sdk.version}</version>
                                                   <type>pom</type>
                                           </dependency>
                                   </dependencies>
                                   <configuration>
                   <stripVersion>true</stripVersion>
                   <copyRSL>true</copyRSL>
                                   </configuration>
                           </plugin>
           </plugins>
    </build>

I'm all over this issue , but couldnot find a solution. Any help is greatly appreciated

UPDATE 1 : @J_A_X, I somehow got that to work with combination of 4.0-RC1 and correcting the pom. But there is another problem. The custom dependencies i had added like

    <dependency>
        <groupId>org.puremvc.pipes</groupId>
        <artifactId>Utility_AS3_MultiCore_Pipes</artifactId>
        <version>1.1</version>
        <type>swc</type>
        <scope>rsl</scope>
    </dependency>

    <dependency>
        <groupId>org.puremvc.multicore</groupId>
        <artifactId>PureMVC_AS3_MultiCore</artifactId>
        <version>1.0.5</version>
        <type>swc</type>
        <scope>rsl</scope>
    </dependency>

are not getting copied. getting following error

[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources (copy-flex-resources) on project smh: Execution copy-flex-resources of goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources failed: Failed to resolve artifact com.hp.ci:ci-ui-lib:swf:0.0.1-SNAPSHOT -> [Help 1]

I believe the flex-mojos plugin shud automatically extract the swf from respective swc and copy to destination instead of we installing into repository. Am i correct on this ?


Solution

  • Solved this using a combination of multiple things.

    1. updated to flex-mojos-4.0.RC1
    2. Adobe does not have mavenized version of framework rsls. hence need to download them and install to our local repo http://groups.google.com/group/flex-mojos/browse_thread/thread/6f47b2980275aaeb
    3. Each of RSLurl entry SHUD have a policyfileURL entry Each entry in the rslUrls array must have a corresponding entry in this array http://repository.sonatype.org/content/sites/flexmojos-site/4.0-SNAPSHOT/compile-swf-mojo.html
    4. All the custom rsls should have corresponding swf in repo. i.e the copy-flex-resources will not automatically run create-rsl goal. it should be run in each of the libraries and the corresponding swf files should be installed into repo.