FlexMojos contains a number of goals which compile Actionscript and MXML into SWCs and SWFs. The compile-swc and compile-swf goals are used to generate output from a project's source, and test-compile is used to compile unit tests. In the simple projects created by the FlexMojos archetypes, the compile-swc and compile-swf goals are called because the project customizes the lifecycle and binds either compile-swc or compile-swf to the compile phase and test-compile to the test-compile phase. If you need to configure the options for the FlexMojos compiler, you would configure the FlexMojos plugin configuration. For example, if you wanted the application with the POM shown in Example 13.7, “POM for Flex Application Archetype” to ignore certain code-level warnings on compile and use some customized font settings, you might use the plugin configuration shown in Example 13.15, “Customizing the Compiler Plugin”.
Example 13.15. Customizing the Compiler Plugin
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.5.0</version>
<extensions>true</extensions>
<configuration>
<configurationReport>true</configurationReport>
<warnings>
<arrayTostringChanges>true</arrayTostringChanges>
<duplicateArgumentNames>false</duplicateArgumentNames>
</warnings>
<fonts>
<advancedAntiAliasing>true</advancedAntiAliasing>
<flashType>true</flashType>
<languages>
<englishRange>U+0020-U+007E</englishRange>
</languages>
<localFontsSnapshot>
${basedir}/src/main/resources/fonts.ser
</localFontsSnapshot>
<managers>
<manager>flash.fonts.BatikFontManager</manager>
</managers>
<maxCachedFonts>20</maxCachedFonts>
<maxGlyphsPerFace>1000</maxGlyphsPerFace>
</fonts>
</configuration>
</plugin>
</plugins>
</build>
