views:

1263

answers:

4

Has anyone successfully built an Adobe Air application with Maven? If so, what are the steps to get it working?

I have been trying to use flex-mojos to build an Air applications. When I set the packaging type to "aswf", as suggested in the DashboardSamplePom, Maven complains that aswf is an unknown packaging type. I also found their air-super-pom, but could not figure out how to reference it as the parent of my POM.

+1  A: 

When a plugin declares a new packaging type, like 'aswf', you need to declare it as an extension. In your top-level pom, add the extensions element to the plugin config.

<plugin>
  <groupId>...</groupId>
  <artifactId>...</artifactId>
  <extensions>true</extensions>
...
</plugin>
Tom
A: 

I've been searching for an answer to this problem as well. There are a couple sites that have proved helpful, though I don't have a full solution yet.

Check these for possible leads:

AS for the packaging type, most of the information I've found indicates that rather than using aswf as the package type, you'll need to use swf and then convert the compiled swf into your air executable by creating an exec tax to invoke adt.jar The links above will show you how to do that much.

As for the air super pom you found, I think there are a few different ones... But to use any super pom, you need to have your flex maven project declare the super pom as the parent, with a block similar to this:

<parent>
    <groupId>org.sonatype.flexmojos</groupId>
    <artifactId>flexmojos-air-super-pom</artifactId>
    <version>3.1-SNAPSHOT</version>
</parent>

However just extending the parent pom may not be enough to get your swf building - once again, see the links above for a more detailed treatment of this problem.

Justin Standard
+1  A: 

There is an article called Building an AIR Application on the mojos website wiki. It should be able to help you.

asawilliams
A: 

For french have an interesting article about building air application with maven here:

http://blog.piaction.com/2010/04/automatiser-la-production-de-vos-applications-air-avec-maven/

Fred