Flex-mojos compiling Flex 4 Gumbo?

Hi folks,

Some time ago, I wrote a post showing how to update compiler version.

But is possible to compile Flex 4 with flex-mojos?

First, I take this sample source.

Then, I use this knowledge to upgrade flex-oem-compiler to 4.0.0.2480.

Try to compile and got this error:

[ERROR] D:\flex\workspace\sonatype-flex-mojos\flex-mojo-IT\src\test\resources\flex4-gumbo\src\main\flex\Flex4App.mxml:[-1,-1] Unable to locate specified base class ‘flex.core.Application’ for component class ‘Flex4App’.

At this point I figure out flex gumbe came with some new manifest files:

    gumbo-manifest.xml
    fxg-manifest.xml
    mxml-2009-manifest.xml
    mxml-manifest.xml

To handle this, I add those xml to my project and this configuration:

  <build>
    <plugins>
...
      <plugin>
        <groupId>info.flex-mojos</groupId>
        <artifactId>flex-compiler-mojo</artifactId>
        <extensions>true</extensions>
        <configuration>
...
          <namespaces>
            <namespace>
              <uri>library:adobe/flex/gumbo</uri>
              <manifest>gumbo-manifest.xml</manifest>
            </namespace>
            <namespace>
              <uri>library:adobe/flex/halo</uri>
              <manifest>mxml-manifest.xml</manifest>
            </namespace>
            <namespace>
              <uri>http://ns.adobe.com/mxml/2009</uri>
              <manifest>mxml-2009-manifest.xml</manifest>
            </namespace>
            <namespace>
              <uri>http://www.adobe.com/2006/mxml</uri>
              <manifest>mxml-manifest.xml</manifest>
            </namespace>
            <namespace>
              <uri>http://ns.adobe.com/fxg/2008</uri>
              <manifest>fxg-manifest.xml</manifest>
            </namespace>
          </namespaces>
        </configuration>
      </plugin>
    </plugins>
  </build>

In the end, run mvn clean install, all compile and fine.

You can checkout this entire post source from:
http://svn.sonatype.org/flexmojos/trunk/rvin-mojo/flex-mojo-IT/src/test/resources/flex4-gumbo/

Hopefully all required dependencies are on flex-mojos maven(svn) repository. Let me know if I miss something.

VELO

2 Responses to “Flex-mojos compiling Flex 4 Gumbo?”

  1. Greg J Says:

    Pretty cool, see if it works with my second example as well: http://blog.smartlogicsolutions.com/2008/07/16/skinning-button-flex-4-fxg/

  2. Flex 4 Gumbo Link Roundup: From getting started to skinning Says:

    […] Flex-mojos compiling Flex 4 Gumbo? http://blog.flex-mojos.info/2008/07/16/flex-mojos-compiling-flex-4-gumbo/ […]

Leave a Reply