Any news on this front? I'm having this issue as well. I started
debugging the mojo, but without the source code for the
com.adobe.air.ApplicationPackager it's hard to make much progress.
Here's my test project, which is about as small as I can get it.
Any help or pointers to an example working project (with Flex Mojos
4.0-RC2 or greater and 4.5.1 or greater) would be amazingly
appreciated. Have spent the better part of the day trying to track
this down.
src/
└── main
├── flex
│ ├── advisor-app.xml
│ └── advisor.mxml
└── resources
└── sign.p12
POM
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.firdbird.advisor</groupId>
<artifactId>company-phoenix-advisor-client-desktop-ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>swf</packaging>
<name>Advisor Desktop Client UI</name>
<properties>
<flex.version>4.5.1.21328</flex.version>
</properties>
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-RC2</version>
<extensions>true</extensions>
<!--
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.compiler</groupId>
<artifactId>adt</artifactId>
<version>${flex.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
-->
<configuration>
<sourceFile>advisor.mxml</sourceFile>
<descriptorTemplate>${basedir}/src/main/flex/
advisor-app.xml</descriptorTemplate>
<storepass>PassPhrase</storepass>
</configuration>
<executions>
<execution>
<goals>
<goal>sign-air</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>air-framework</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</project>
advisor-app.xml
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.6">
<id>com.ccadllc.firebird.advisor.client</id>
<filename>advisor</filename>
<name>Advisor</name>
<versionNumber>${version}</versionNumber>
<initialWindow>
<content>${output}</content>
</initialWindow>
</application>
advisor.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="Advisor"
showStatusBar="false">
<s:Label text="Hello World" />
</s:WindowedApplication>
On Dec 3 2011, 8:21 am, "[email protected]" <[email protected]> wrote:
> Just a suggestion before diving deeper in this. As you're depending on 4.5
> sdk, you should use the 2.5 version of the namespace for your descriptor.
>
> And maybe I'm fooled on this but each time I set a dependency on a specific
> SDK version I also add a dependency to the FM plugin on the corresponding
> compiler version. Maybe it's now obsolete for FM4.1 or SDK4.5 is now the
> default.
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
> olivier coder <[email protected]> wrote:
>
> Hello,
> Here are the files. Thanks for your help.
>
> _____________________________________________
>
> pom.xml :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd"
> xmlns="http://
> maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <modelVersion>4.0.0</modelVersion>
> <groupId>OEA</groupId>
> <artifactId>OEAPortal</artifactId>
> <version>0.6</version>
> <packaging>air</packaging>
> <name>OEA Portal</name>
> <properties>
> <application.name>OEAPortal</application.name>
> <flex.framework.version>4.1.0.16248</flex.framework.version>
> </properties>
> <dependencies>
> <dependency>
> <groupId>com.adobe.flex.framework</groupId>
> <artifactId>air-framework</artifactId>
> <version>4.5.1.21328</version>
> <type>pom</type>
> </dependency>
> <dependency>
> <groupId>com.adobe.flexunit</groupId>
> <artifactId>flexunit</artifactId>
> <version>4.0-rc-1</version>
> <type>swc</type>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>tweener</groupId>
> <artifactId>tweener</artifactId>
> <version>1.0</version>
> <type>swc</type>
> </dependency>
> <dependency>
> <groupId>papervision_phunky</groupId>
> <artifactId>papervision_phunky</artifactId>
> <version>1.0</version>
> <type>swc</type>
> </dependency>
> <dependency>
> <groupId>as3crypto</groupId>
> <artifactId>as3crypto</artifactId>
> <version>1.3</version>
> <type>swc</type>
> </dependency>
> <dependency>
> <groupId>OEA</groupId>
> <artifactId>OEAClientAPI</artifactId>
> <version>0.6</version>
> <type>swc</type>
> </dependency>
> </dependencies>
> <repositories>
> <repository>
> <id>flex-mojos-repository</id>
> <url>http://repository.sonatype.org/content/groups/flexgroup<;/
> url>
> </repository>
> </repositories>
> <pluginRepositories>
> <pluginRepository>
> <id>flex-mojos-plugin-repository</id>
> <url>http://repository.sonatype.org/content/groups/flexgroup<;/
> url>
> </pluginRepository>
> </pluginRepositories>
> <build>
> <sourceDirectory>src/main/flex</sourceDirectory>
> <testSourceDirectory>src/test/flex</testSourceDirectory>
> <plugins>
> <plugin>
> <groupId>org.sonatype.flexmojos</groupId>
> <artifactId>flexmojos-maven-plugin</artifactId>
> <version>4.1-beta</version>
> <extensions>true</extensions>
> <dependencies>
> <dependency>
> <groupId>org.sonatype.flexmojos</groupId>
> <artifactId>flexmojos-threadlocaltoolkit-wrapper</
> artifactId>
> <version>4.1-beta</version>
> </dependency>
> </dependencies>
> <configuration>
> <flexbuilderCompatibility>true</flexbuilderCompatibility>
> <debug>true</debug>
> <locales>
> <locale>en_US</locale>
> </locales>
> <localesCompiled>
> <locale>en_US</locale>
> <locale>fr_FR</locale>
> </localesCompiled>
> <mergeResourceBundle>true</mergeResourceBundle>
> <!-- <resourceBundlePath>${basedir}/src/main/resources/
> locale/{locale}</resourceBundlePath> -->
> <themes>
> <theme>/opt/flexsdk/frameworks/themes/Spark/spark.css</
> theme>
> <theme>/opt/flexsdk/frameworks/themes/Halo/halo.swc</
> theme>
> </themes>
> <descriptorTemplate>${basedir}/src/main/flex/$
> {application.name}-app.xml</descriptorTemplate>
> <keystore>/var/data/keystore/OEA-cert.p12</keystore>
> <storepass>password</storepass>
> </configuration>
> <executions>
> <execution>
> <goals>
> <goal>sign-air</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </project>
>
> _____________________________________________
>
> application descriptor :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <application xmlns="http://ns.adobe.com/air/application/2.0">
>
> <!-- Adobe AIR Application Descriptor File Template.
>
> Specifies parameters for identifying, installing, and
> launching AIR applications.
>
> xmlns - The Adobe AIR namespace:http://ns.adobe.com/air/application/1.5
> The last segment of the namespace specifies
> the version
> of the AIR runtime required for this
> application to run.
>
> minimumPatchLevel - The minimum patch level of the AIR runtime
> required to run
> the application. Optional.
> -->
>
> <!-- The application identifier string, unique to this
> application. Required. -->
> <id>OEAPortal</id>
>
> <!-- Used as the filename for the application. Required. -->
> <filename>OEAPortal</filename>
>
> <!-- The name that is displayed in the AIR application
> installer.
> May have multiple values for each language. See samples
> or xsd schema file. Optional. -->
> <name>OEAPortal</name>
>
> <!-- An application version designator (such as "v1", "2.5",
> or "Alpha 1"). Required. -->
> <version>v1</version>
>
> <!-- Description, displayed in the AIR application installer.
> May have multiple values for each language. See samples
> or xsd schema file. Optional. -->
> <!-- <description></description> -->
>
> <!-- Copyright information. Optional -->
> <!-- <copyright></copyright> -->
>
> <!-- Settings for the application's initial window. Required.
> -->
> <initialWindow>
> <!-- The main SWF or HTML file of the application.
> Required. -->
> <!-- Note: In Flex Builder, the SWF reference is set
> automatically. -->
> <content>[This value will be overwritten by Flex
> Builder in the output app.xml]</content>
>
> <!-- The title of the main window. Optional. -->
> <!-- <title></title> -->
>
> <!-- The type of system chrome to use (either
> "standard" or "none"). Optional. Default standard. -->
> <!-- <systemChrome></systemChrome> -->
>
> <!-- Whether the window is transparent. Only
> applicable when systemChrome is none. Optional. Default false. -->
> <!-- <transparent></transparent> -->
>
> <!-- Whether the window is initially visible.
> Optional. Default false. -->
> <!-- <visible></visible> -->
>
> <!-- Whether the user can minimize the window.
> Optional. Default true. -->
> <!-- <minimizable></minimizable> -->
>
> <!-- Whether the user can maximize the window.
> Optional. Default true. -->
> <!-- <maximizable></maximizable> -->
>
> <!-- Whether the user can resize the window. Optional.
> Default true. -->
> <!-- <resizable></resizable> -->
>
> <!-- The window's initial width. Optional. -->
> <!-- <width></width> -->
>
> <!-- The window's initial height. Optional. -->
> <!-- <height></height> -->
>
> <!-- The window's initial x position. Optional. -->
> <!-- <x></x> -->
>
> <!-- The window's initial y position. Optional. -->
> <!-- <y></y> -->
>
> <!-- The window's minimum size, specified as a width/
> height pair, such as "400 200". Optional. -->
> <!-- <minSize></minSize> -->
>
> <!-- The window's initial maximum size, specified as a
> width/height pair, such as "1600 1200". Optional. -->
> <!-- <maxSize></maxSize> -->
> </initialWindow>
>
> <!-- The subpath of the standard default installation location
> to use. Optional. -->
> <!-- <installFolder></installFolder> -->
>
> <!-- The subpath of the Programs menu to use. (Ignored on
> operating systems without a Programs menu.) Optional. -->
> <!-- <programMenuFolder></programMenuFolder> -->
>
> <!-- The icon the system uses for the application. For at
> least one resolution,
> specify the path to a PNG file included in the AIR
> package. Optional. -->
> <icon>
> <image16x16>/Assets/Images/OEA_Logo_16.png</
> image16x16>
> <image32x32>/Assets/Images/OEA_Logo_32.png</
> image32x32>
> <image48x48>/Assets/Images/OEA_Logo_48.png</
> image48x48>
> <image128x128>/Assets/Images/OEA_Logo_128.png</
> image128x128>
> </icon>
>
> <!-- Whether the application handles the update when a user
> double-clicks an update version
> of the AIR file (true), or the default AIR application
> installer handles the update (false).
> Optional. Default false. -->
> <!-- <customUpdateUI></customUpdateUI> -->
>
> <!-- Whether the application can be launched when the user
> clicks a link in a web browser.
> Optional. Default false. -->
> <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
>
> <!-- Listing of file types for which the application can
> register. Optional. -->
> <!-- <fileTypes> -->
>
> <!-- Defines one file type. Optional. -->
> <!-- <fileType> -->
>
> <!-- The name that the system displays for the
> registered file type. Required. -->
> <!-- <name></name> -->
>
> <!-- The extension to register. Required. -->
> <!-- <extension></extension> -->
>
> <!-- The description of the file type.
> Optional. -->
> <!-- <description></description> -->
>
> <!-- The MIME content type. -->
> <!-- <contentType></contentType> -->
>
> <!-- The icon to display for the file type.
> Optional. -->
> <!-- <icon>
> <image16x16></image16x16>
> <image32x32></image32x32>
> <image48x48></image48x48>
> <image128x128></image128x128>
> </icon> -->
>
> <!-- </fileType> -->
> <!-- </fileTypes> -->
>
> </application>
> _____________________________________________
>
> On Dec 2, 11:52 pm, "[email protected]" <[email protected]> wrote:
>
>
>
>
>
>
>
> > Please provide your pom.xml and descriptor.xml. Maybe something is
> > obviously wrong in it.
> > --
> > Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
> > olivier coder <[email protected]> wrote:
>
> > Hello,
>
> > Can you help me finding the reason of this exception.
> > Thank you !!
>
> > [ERROR]
> > java.lang.NullPointerException
> > at
> > com.adobe.air.ADTOutputStream.addApplicationDescriptor(ADTOutputStream.java:
> > 330)
> > at
> > com.adobe.air.AIROutputStream.addApplicationDescriptor(AIROutputStream.java:
> > 63)
> > at
> > com.adobe.air.ApplicationPackager.addSpecialFiles(ApplicationPackager.java:
> > 242)
> > at com.adobe.air.AIRPackager.addSpecialFiles(AIRPackager.java:
> > 172)
> > at
> > com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:
> > 63)
> > at
> > org.sonatype.flexmojos.plugin.air.packager.FlexmojosAIRPackager.createPackage(FlexmojosAIRPackager.java:
> > 42)
> > at
> > org.sonatype.flexmojos.plugin.air.SignAirMojo.doPackage(SignAirMojo.java:
> > 310)
> > at
> > org.sonatype.flexmojos.plugin.air.SignAirMojo.execute_aroundBody0(SignAirMojo.java:
> > 348)
> > at
> > org.sonatype.flexmojos.plugin.air.SignAirMojo.execute_aroundBody1$advice(SignAirMojo.java:
> > 24)
> > at
>
> ...
>
> read more »
--
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos
http://flexmojos.sonatype.org/