Building flex with RSL's modules using flex-mojos

To create flex application that uses RSLs "cross domain modules" with maven, the rsl module should have two artifacts:
1. The library for compilation dependency extension .swc
2. The optimized library for deployment extension  .swf

Lets say we have common library that we want to use as rsl, a business module (application) that uses the common and web-ui war module, we'll have:
1. common rsl :

  <packaging>swc</packaging>
  <build>
     <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <executions>
      <execution>
        <goals>
          <goal>optimize</goal>
        </goals>
      </execution>
        </executions>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
2. business module (application) :
  <packaging>swf</packaging>
  <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
 
  <dependencies>
    <dependency>
      <groupId>com.tikal.flex</groupId>
      <artifactId>common-rsl</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>swc</type>
      <scope>rsl</scope>
    </dependency>
  </dependencies>
3.  web-ui war :

  <packaging>war</packaging>
  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <goals>
              <goal>copy-flex-resources</goal>
            </goals>
          </execution>
        </executions>
         <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
 
<dependencies>
    <dependency>
      <groupId>com.tikal.flex</groupId>
      <artifactId>business</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>swf</type>
    </dependency>
</dependencies>

The war will includes :
web-ui.war/
    business-1.0-SNAPSHOT.saf
    rsl/
        common-rsl-1.0-SNAPSHOT
    WEB-INF/
        web.xml

DevOps Architect

DevOps Group

Thank you for your interest!

We will contact you as soon as possible.

Want to Know More?

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com
Thank you for your interest!

We will contact you as soon as possible.

Let's talk

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com