Israfil or Flex Mojos?

Want to compile flex code with maven? Don’t know which plugin to choose? Maybe this post will help you. Today, there are several available options for compiling flex with maven. On my list, I have these:

Of the three, I have tried only the first two for real. I did take a look into the servebox plugin sources though, and it seems two work exactly as israfil does, by spawning an external process, executing the SDK mxmlc command-line compiler.

Flex Mojos – Currently The Best

As I see it, this plugin is currently the best of breed. It is the only of the available plugins, that utilize the flex compiler api introduced in flex3, which makes for significantly faster builds than the other plugins, which simply acts as proxies for the mxmlc sdk command-line compiler. In addition to this, flex-mojos includes a nice bunch of features, at the top of my list:

  • Supports both flex2 and flex3, even though it requires the flex3 sdk dependencies, to get access to the flex compiler api. Only compiles to flex3 currently, as maintainer VELO mention in the comments. Ask project team if you need flex2 support.
  • Compiling to libs (swc) or flash applications (swf)
  • Also compiles to air executables (haven’t used that at all)
  • Support for compiling Runtime Shared Libraries (RSL), which can give faster load-times of your application
  • Does not require you to install the flex sdk locally (it is downloaded as dependencies from the repository on demand)
  • Can run flexunit unit tests
  • Can generate asdoc documentation
  • Support for encrypting swf, if you think you need to be that safe :)
  • Can generate flash application wrapper html

In addition to the above list, I feel this plugin has a good, thriving community, with actual ongoing development. I was trying out the hellfire compiler with flex-mojos one day and could not get it to work. I checked out the sources and found a bug in the snapshot code inside flex-mojos. I did a small patch and submitted to project lead, Marvin Froeder (VELO). All the time through, VELO did a superb job of support, and also applied my patch afterwards. A prime example on how a community is built.

If you want to get started compiling with flex-mojos, the project site is at google code, but the sources have moved to, a place for maven stuff. You should of course start following the project blog, but also take a look at the maven site generated documentation. The site docs are not that great yet, but you can lure the options to set for swf compilation from here, and so on for the other goals.

Israfil – A Good Old Friend

There is no doubt, that the israfil plugin has served us well. It compiles both flex2 and flex3 as flex-mojos, but it does not have the same feature set, as flex-mojos does. Another, more troublesome issue, is, that the community does not seem as live as with flex-mojos. We had a problem with israfil in that it uses the JRE on PATH when spawning mxmlc compiler, and this path could not be changed on the continous integration server. Of course, our project needed a different JRE than the one on path. One of my colleagues made a patch, adding support for setting the path to the JRE to use. To my knowledge, this patch has still yet to be applied. I also do not feel a thriving community there, but that is just my personal opinion.

Apart from the problems listed above, israfil is slow, as I showed in my previous post.

July 15, 2008 В· polesen В· 3 Comments
Tags: , ,  В· Posted in: Rich Internet Applications

3 Responses

  1. VELO - July 16, 2008


    Just a small fix. Flex-mojos doesn’t support flex 2.

    I was thinking on add flex 2 support. But I don’t find a good reason to do so.

    If required, is doable. But right now, flex-mojos doesn’t support flex 2.


  2. Christian Gruber - January 4, 2009

    Confirmation: The community around flex-mojos is more robust. I haven’t worked on much in the way of Flex projects in over a year and a half, so if israfil-mojo works, go for it, but if it doesn’t and VELO’s flex-mojos works, please use it. I just haven’t had the time to keep up with it.

    The only other clarification is that Israfil’s mojo is licensed BSD, whereas flex-mojos is licensed with GPLv2. That shouldn’t make a difference, given the use pattern of maven-plugins, but if it does due to internal corporate policy, it’s worth noting.

    Pros to Marvin and his community for taking flex-mojos as far as it’s gotten.

  3. S.Didier - January 20, 2009 : Maven Flex Plugin and AS Foundry Framework have been refreshed

    Since december 1st, brings together Maven Flex Plugin and ActionScript Foundry projects. AS Foundry have been created in 2005. In 2007 the project turns into an open source project available on SourceForge. The new version 2.0 brings some fixes and add numerous new functionalities.

    Maven Flex Plugin gives the ability to use Maven 2.0 for the flex development of applications. This plugin enable the developer to compile, unit test and generate all the action script documentation.

    Maven Flex Plugin :
    ActionScript Foundry :

    The Team.