0

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 ?

JWhiz
  • 681
  • 3
  • 10
  • 22
  • Try using FlexMojos-4.0RC1 from https://repository.sonatype.org/content/repositories/maven-sites/flexmojos/ instead. 3.8 is fairly old. Also, post more of your pom file. – J_A_X Aug 17 '11 at 05:20
  • Edited the post to codify the pom for better visibility.. – JWhiz Aug 17 '11 at 06:20
  • @J_A_X i tried with 4.0RC1 too but the same problem [ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1: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] – JWhiz Aug 17 '11 at 06:27
  • Wait, I don't understand. Why are you trying to copy the RSLs into your package if your RSLs are pointing to the adobe signed ones? It's not needed. – J_A_X Aug 17 '11 at 06:35
  • I need to copy it to my package since the application is designed for non-internet use case too. so, i need to specify a failover rsl path.. hence these rsls are needed. – JWhiz Aug 17 '11 at 06:38

2 Answers2

0

If you want to include the RSL in your package, you'll need to add them as dependencies and set the RSL url properly as well for a failover. By adding these dependencies, you should be able to get them working with your goal. However, I find it a bit weird that you need both adobe RSLs and your own for an internet application where you will need internet no matter what you do.

<dependencies>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>${flex.sdk.version}</version>
      <type>pom</type>
      <exclusions>
            <exclusion>
                <groupId>com.adobe.flex.framework</groupId>
                <artifactId>playerglobal</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>playerglobal</artifactId>
        <version>${flex.sdk.version}</version>
        <classifier>${flash.version}</classifier>
        <type>swc</type>
    </dependency>

    <!-- Cached, signed libraries -->
    <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>textLayout</artifactId>
        <version>${flex.textlayout.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>osmf</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>charts</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>mx</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>advancedgrids</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>spark_dmv</artifactId>
        <version>${flex.sdk.version}</version>
        <type>swc</type>
        <scope>caching</scope>
    </dependency>

    <!-- THEMES -->
    <dependency>
        <groupId>com.adobe.flex.framework</groupId>
        <artifactId>spark</artifactId>
        <version>${flex.sdk.version}</version>
        <classifier>theme</classifier>
        <type>css</type>
        <scope>theme</scope>
    </dependency>
    <dependency>
        <groupId>com.adobe.flexunit</groupId>
        <artifactId>flexunit</artifactId>
        <version>${flexunit.version}</version>
        <type>swc</type>
        <scope>test</scope>
    </dependency>
</dependencies>
J_A_X
  • 12,857
  • 1
  • 25
  • 31
  • i've specified all these as dependency. I just gave a link to save some space. i.e all the dependencies are specified as in https://docs.sonatype.org/pages/viewpage.action?pageId=7045277. As mentioned, we need it in an NON - INTERNET ( INTRANET ) environment. Updated main post to include dependencies too – JWhiz Aug 17 '11 at 06:53
  • "However, I find it a bit weird that you need both adobe RSLs and your own for an internet application where you will need internet no matter what you do." Actually, this isn't that weird. The RSL's we point first go to adobe's website, then to our own server. It happens that in corporate environments not everybody has access to the Adobe download site and thus supplying our own will guarantee that our apps work, regardless of corporate internet policies. – R. van Twisk May 19 '13 at 15:52
0

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.
JWhiz
  • 681
  • 3
  • 10
  • 22