ActionScript Maven Build for Air and Android Packages

In the previous posts we’ve covered the basic build automation and how to add libraries and fonts to it.

For many projects, building a SWF is simply not enough so we’ll try to extend the basic ActionScript Maven build presented in the first post. First we will address building Adobe Air packages and then we will address building Android packages. As a general note, please change pom.xml information to suit your build.

To get the Adobe Air package we must instruct FlexMojos to do it by adding the following goal to its execution goals


Air packages require a valid signing key. Identity information from the key will show up when a user will install the package. To set this up we need to set the signing key information in the configuration section


and the dependencies to build it in the plugin dependency section


Dont’t forget to set the proper Adobe Air version for your project.

Additionally, you may want to include assets for your build which can be done in the plugin configuration like this


In order to test that the Adobe Air package builds nicely just run

mvn clean install

and you should see the Air package next to the SWF.

Next we move to the Android package. Getting this one to work involves more steps. Unlike the Air package, I was unable to build the Android package on Linux because of problems compiling one of its dependencies (adt-maven-plugin). However I had no problem compiling it on a Mac.

First thing is to build native-dependency-maven-plugin-base which is a dependency for adt-maven-plugin.

git clone
cd native-dependency-maven-plugin-base/
mvn clean install

After it we download, modify and build adt-maven-plugin.

git clone
cd adt-maven-plugin/
vim pom.xml

We need to change the pom.xml to reflect the correct version of native-dependency-maven-plugin-base so look for


and change




and then save. Now you can compile it.

mvn clean install

Now all dependencies have been satisfied for building the Android package and we can edit the application pom.xml in order to add the necessary build instructions. Please add the following in the plugins section:




All you have to do now is build the application and the .apk will be in the target directory:

mvn clean install

More on tweaks for your ActionScript Maven build in future blog posts.

Leave a Reply

Your email address will not be published. Required fields are marked *