I’ve been working on perfecting a build environment for Flex4+Flash Builder 4+JBoss+Maven that works for IDEA & Eclipse (FB), hot deploys to JBoss, and plays well in continuous integration (Hudson). I was following a Maven anti-pattern that’s easy to fall into – make your maven aggregator projects your parent projects. This is a bad idea since projects that the aggregator builds may have common settings with other children, but not with all other children (swc’s vs. swf’s in particular). So I did the right thing and created a tree of parent pom’s that my projects use as parents, leaving the aggregator as just an aggregator.
This post is just to capture the solution to an error that I came across. One of my swc’s was generated this error during compilation:
"unable to export SWC oem"
Googling showed:
- lots of people ran into this when mixing different versions of the flex compiler.
- lots of people ran into it when dealing with resources and fonts
The fix was to specify the mergeResourceBundle option in the flexmojo's config:
<plugin>
<groupId>org.sonatype.flexmojos</groupid>
<artifactId>flexmojos-maven-plugin<artifactId>
<version>${flexmojos.version}</version>
<configuration>
<mergeResourceBundle>true</mergeResourceBundle>
</configuration>
</plugin>