Flex-Mojos keepAs3Metadatas Option to Apply keep-as3-metadata Compiler Option
If you use the flex-mojos plugin to compile flex code in a maven project, you might have the need to apply the -compiler.keep-as3-metadata option to the compiler, like I did.
The documentation for compile-swf mojo says to put something like the following, into the configuration element:
<keepAs3Metadatas> <metadata>Bindable</metadata> <metadata>Events</metadata> </keepAs3Metadatas>
but that failed horribly. It seems like maven tries to instantiate a Metadata class (which I think the mojo use for applying author metadata to the flash), for each metadata element, which is wrong (and fails the build). Well, the solution was simple, name it something else, like here, where I name it name:
<build>
<plugins>
<plugin>
<groupId>info.flex-mojos</groupId>
<artifactId>flex-compiler-mojo</artifactId>
<extensions>true</extensions>
<configuration>
<keepAs3Metadatas>
<name>ConditionalShow</name>
</keepAs3Metadatas>
</configuration>
</plugin>
</plugins>
</build>
December 29, 2008
Tags: flex, flex-mojos Posted in: Rich Internet Applications

Leave a Reply