How to pass additional compiler arguments in flexmojos-maven-plugin 3.8?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to pass additional compiler arguments in flexmojos-maven-plugin 3.8?

Vaibhav Shah
Hello Fellow Coders,

I am having a maven-flex project, which compiles successfully with
flexmojos-maven-plugin 3.8. (I can't use any latest versions, long story.)

When I build the flex project with the Flex Builder, I can use the 'Project
Properties > Flex Compiler > Additional Compiler Arguments' to pass some
additional arguments, such as referring to services-config.xml file:

-services "C:\MyProject\WebRoot\WEB-INF\flex\services-config.xml" -locale
en_US

However, I don't know how to to pass these arguments in the configuration of
my flexmojos-maven-plugin. Here is my working configuration:

             <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>3.8</version>
                <extensions>true</extensions>
                <configuration>
                    <sourceFile>Abc.mxml</sourceFile>
                    <debug>true</debug>
                    <storepass></storepass>
                    <output>${basedir}/target/Abc.swf</output>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>3.2.0.3958</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </plugin>

Could anyone please suggest how I can pass my above mentioned additional
compiler arguments in the plugin configuration above?



--
Sent from: http://apache-flex-development.2333347.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to pass additional compiler arguments in flexmojos-maven-plugin 3.8?

Vaibhav Shah
The flexmojos-maven-plugin provides option to define the services via the
configuration node as follows:

            <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>3.8</version>
                <extensions>true</extensions>
                <configuration>
                    <sourceFile>Abc.mxml</sourceFile>
                    <debug>true</debug>
                    <storepass></storepass>
                    <output>${basedir}/target/Abc.swf</output>
                   
<services>../MyProject/WebRoot/WEB-INF/flex/services-config.xml</services>
                    <contextRoot>/</contextRoot>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>3.2.0.3958</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </plugin>

If you specify services, then you have to specify contextRoot as well.



--
Sent from: http://apache-flex-development.2333347.n4.nabble.com/