Flex Building error “unable to export SWC oem” (Flexmojos)

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: