Hi,
I'm trying to compile two different mxml files into two different swf
files in the same POM file with no luck so far.
Is there a way to do it and to set the final name separately for each
one of them?
Tried to use the modules element, didn't work for me.

Here's my current pom:
<?xml version="1.0" encoding="UTF-8"?>
<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>

        <parent>
                <groupId>com.myCompany.myProduct</groupId>
                <artifactId>myProduct-parent</artifactId>
                <version>${application.version}</version>
                <relativePath>../myProduct-parent/pom.xml</relativePath>
        </parent>

        <groupId>com.myCompany.myProduct</groupId>
        <artifactId>myProduct-flex-myProduct</artifactId>
        <version>${application.version}</version>
        <packaging>swf</packaging>

        <name>myProduct :: ${artifactId} :: Flex Client Module</name>

        <build>
                <finalName>myProduct</finalName>
                <sourceDirectory>${basedir}/src/main/flex</sourceDirectory>

                <resources>
                        <resource>
                                
<directory>${basedir}/src/main/resources</directory>
                        </resource>
                </resources>

                <plugins>
                        <plugin>
                                <groupId>org.sonatype.flexmojos</groupId>
                                <artifactId>flexmojos-maven-plugin</artifactId>
                                <version>3.7.1</version>
                                <extensions>true</extensions>

                                <configuration>
                                        <sourcePaths>
                                                
<path>${basedir}/src/main/flex/</path>
                                                
<path>${basedir}/src/main/resources/</path>
                                        </sourcePaths>

                                        <sourceFile>myProduct.mxml</sourceFile>

                                        
<mergeResourceBundle>true</mergeResourceBundle>
                                        
<useResourceBundleMetadata>true</useResourceBundleMetadata>
                                        <runtimeLocales>
                                                <locale>en_US</locale>
                                        </runtimeLocales>
                                        <compiledLocales>
                                                <locale>en_US</locale>
                                        </compiledLocales>

                                        <fonts>
                                                <managers>
                                                        
<manager>flash.fonts.AFEFontManager</manager>
                                                </managers>
                                        </fonts>

                                        <keepAs3Metadatas>
                                                
<keepAs3Metadata>XmlClass</keepAs3Metadata>
                                                
<keepAs3Metadata>XmlAttribute</keepAs3Metadata>
                                                
<keepAs3Metadata>XmlElement</keepAs3Metadata>
                                                
<keepAs3Metadata>XmlArray</keepAs3Metadata>
                                                
<keepAs3Metadata>ConstructorArg</keepAs3Metadata>
                                        </keepAs3Metadatas>

                                        <themes>
                                                
<theme>${flex.home}/frameworks/themes/Halo/halo.swc</theme>
                                        </themes>

                                        
<updateSecuritySandbox>false</updateSecuritySandbox>

                                </configuration>

                                <dependencies>
                                        <dependency>
                                                
<groupId>com.adobe.flex</groupId>
                                                
<artifactId>compiler</artifactId>
                                                
<version>${flex.version}</version>
                                                <type>pom</type>
                                        </dependency>
                                </dependencies>
                        </plugin>

                        <!-- Prepare dejavu fonts folder -->
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-dependency-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <id>unpack</id>
                                                <phase>validate</phase>
                                                <goals>
                                                        <goal>unpack</goal>
                                                </goals>
                                                <configuration>
                                                        <artifactItems>
                                                                <artifactItem>
                                                                        
<groupId>dejavu</groupId>
                                                                        
<artifactId>dejavu-fonts-ttf</artifactId>
                                                                        
<version>2.30</version>
                                                                        
<type>zip</type>
                                                                        
<overWrite>true</overWrite>
                                                                        
<outputDirectory>${project.build.directory}</outputDirectory>
                                                                </artifactItem>
                                                        </artifactItems>
                                                        
<outputAbsoluteArtifactFilename>true</
outputAbsoluteArtifactFilename>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>

                        <!-- Copy dejavu fonts folder 
-DgroupId=com.adobe.flex.framework -
DartifactId=flexxb -Dversion=1.7.0 -Dpackaging=swc-->
                        <plugin>
                                <artifactId>maven-resources-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <id>copy-resources</id>
                                                <!-- here the phase you need -->
                                                <phase>validate</phase>
                                                <goals>
                                                        
<goal>copy-resources</goal>
                                                </goals>
                                                <configuration>
                                                        
<outputDirectory>${basedir}/src/main/flex/Assets/Fonts</
outputDirectory>
                                                        
<overwrite>true</overwrite>
                                                        <resources>
                                                                <resource>
                                                                        
<directory>${project.build.directory}/dejavu-fonts-ttf-2.30/
ttf</directory>
                                                                        
<includes>
                                                                                
<include>**/*.ttf</include>
                                                                        
</includes>
                                                                </resource>
                                                        </resources>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>
                </plugins>
        </build>
        <dependencies>
                <!-- Flex dependencies -->
                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>common-framework</artifactId>
                        <version>${flex.version}</version>
                        <type>pom</type>
                </dependency>

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

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

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>framework</artifactId>
                        <version>${flex.version}</version>
                        <type>rb.swc</type>
                        <classifier>en_US</classifier>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>osmf</artifactId>
                        <version>${flex.version}</version>
                        <type>swc</type>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>osmf</artifactId>
                        <version>${flex.version}</version>
                        <type>rb.swc</type>
                        <classifier>en_US</classifier>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>rpc</artifactId>
                        <version>${flex.version}</version>
                        <type>swc</type>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>rpc</artifactId>
                        <version>${flex.version}</version>
                        <type>rb.swc</type>
                        <classifier>en_US</classifier>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>spark</artifactId>
                        <version>${flex.version}</version>
                        <type>swc</type>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>spark</artifactId>
                        <version>${flex.version}</version>
                        <type>rb.swc</type>
                        <classifier>en_US</classifier>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>sparkskins</artifactId>
                        <version>${flex.version}</version>
                        <type>swc</type>
                </dependency>

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

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>playerglobal</artifactId>
                        <version>${flex.version}</version>
                        <type>rb.swc</type>
                        <classifier>en_US</classifier>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>playerglobal</artifactId>
                        <version>${flex.version}</version>
                        <classifier>10.1</classifier>
                        <type>swc</type>
                </dependency>

                <dependency>
                        <groupId>com.adobe.flex.framework</groupId>
                        <artifactId>flexxb</artifactId>
                        <version>1.7.0</version>
                        <type>swc</type>
                </dependency>

                <dependency>
                        <groupId>dejavu</groupId>
                        <artifactId>dejavu-fonts-ttf</artifactId>
                        <version>2.30</version>
                        <type>zip</type>
                        <scope>runtime</scope>
                </dependency>
        </dependencies>

</project>

Any kind of assistance will be appreciated.
Thanks.

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