I tried the adt-maven-plugin but it didn't do the trick for me, can't remember 
why exactly, some bugs I guess, I ended up, with FM 4.2 to do things like that 
in my parent pom, then set the phase of the execution on the child project and 
it worked prett well:

Child use example:

                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>

                        <executions>
                            <execution>
                                <id>prepare-exe-package</id>
                                <phase>prepare-package</phase>
                            </execution>
                        </executions>
                    </plugin>

Parent definition :

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>

                    <executions>
                        <execution>
                            <id>prepare-exe-package</id>
                            <phase>none</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <useBuildFilters>false</useBuildFilters>
                                
<outputDirectory>${project.build.directory}/exe-package</outputDirectory>
                                <resources>
                                    <resource>
                                        
<directory>${project.build.outputDirectory}</directory>
                                        <filtering>false</filtering>
                                        <includes>
                                            
<include>SpellingConfig.xml</include>
                                            <include>dictionaries/*.*</include>
                                            <include>favicon_*.*</include>
                                        </includes>
                                    </resource>
                                    <resource>
                                        
<directory>${project.build.directory}</directory>
                                        <filtering>false</filtering>
                                        <includes>
                                            
<include>${project.build.finalName}-${build.profile.id}-descriptor.xml</include>
                                            
<include>${project.build.finalName}-${build.profile.id}.${project.packaging}</include>
                                        </includes>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                
                
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>

                    <executions>
                        <execution>
                            <id>create-certificate</id>
                            <phase>none</phase>
                            <goals>
                                <goal>exec</goal>
                            </goals>

                            <configuration>
                                <executable>java</executable>
                                
<workingDirectory>${project.build.directory}/adt-work</workingDirectory>
                                <arguments>
                                    <argument>-jar</argument>
                                    
<argument>${project.build.directory}/lib/adt.jar</argument>
                                    <argument>-certificate</argument>
                                    <argument>-cn</argument>
                                    <argument>${certificate.name}</argument>
                                    <argument>-ou</argument>
                                    <argument>${certificate.org-unit}</argument>
                                    <argument>-o</argument>
                                    <argument>${certificate.org-name}</argument>
                                    <argument>-c</argument>
                                    <argument>${certificate.country}</argument>
                                    <argument>${certificate.key-type}</argument>
                                    <argument>${certificate.file}</argument>
                                    <argument>${certificate.password}</argument>
                                </arguments>
                            </configuration>
                        </execution>

                        <execution>
                            <id>create-package-exe</id>
                            <phase>none</phase>
                            <goals>
                                <goal>exec</goal>
                            </goals>

                            <configuration>
                                <executable>java</executable>
                                
<workingDirectory>${project.build.directory}/adt-work</workingDirectory>
                                <arguments>
                                    <argument>-jar</argument>
                                    
<argument>${project.build.directory}/lib/adt.jar</argument>
                                    <argument>-package</argument>
                                    <argument>-storetype</argument>
                                    
<argument>${certificate.storetype}</argument>
                                    <argument>-keystore</argument>
                                    <argument>${certificate.file}</argument>
                                    <argument>-storepass</argument>
                                    <argument>${certificate.password}</argument>
                                    <argument>-keypass</argument>
                                    <argument>${certificate.password}</argument>
                                    <argument>-target</argument>
                                    <argument>native</argument>
                                    <argument>
                                        
${project.build.directory}/${project.build.finalName}.exe
                                    </argument>
                                    
<argument>${project.build.outputDirectory}/application-descriptor.xml</argument>
                                    <argument>-C</argument>
                                    
<argument>${project.build.directory}/exe-package/</argument>
                                    <argument>.</argument>
                                </arguments>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

Frédéric THOMAS

> Date: Fri, 29 May 2015 15:03:47 +0200
> Subject: RE: AW: AW: Need help with air packaging
> From: [email protected]
> To: [email protected]
> 
> Well in the end I modified the project source code which I am not happy with 
> as resources are currently sitting alongside code. 
> Speaking of mobile packaging, how do you get an apk with flexmojos?
> Saw there is a project called adt-maven-plugin designed to work with 
> flexmojos but don't know if it works. Is that it or something else? 
> Victor
> 
> -------- Original message --------
> From: Christofer Dutz <[email protected]> 
> Date: 29/05/2015  14:26  (GMT+01:00) 
> To: [email protected] 
> Subject: AW: AW: Need help with air packaging 
> 
> Have to check ... as I'm currently working on mobile packaging I'll do that 
> right away.
> 
> Chris
> 
> ________________________________________
> Von: Victor Ion Munteanu <[email protected]>
> Gesendet: Freitag, 29. Mai 2015 11:05
> An: [email protected]
> Betreff: RE: AW: Need help with air packaging
> 
> Yes. I have an xml file, 2 ttf fonts and 3 swf files containing images, 
> sounds, etc. They are all in a resources folder.
> I want a resources folder in the resulting air. Can this be done with 
> FlexMojos?
> Victor
> 
> -------- Original message --------
> From: Christofer Dutz <[email protected]>
> Date: 29/05/2015  09:31  (GMT+01:00)
> To: [email protected]
> Subject: AW: Need help with air packaging
> 
> So you are talking about static resources such as xml files or are you 
> talking about image, font, audio?
> 
> Chris
> 
> ________________________________________
> Von: Victor Ion Munteanu <[email protected]>
> Gesendet: Donnerstag, 28. Mai 2015 07:49
> An: [email protected]
> Betreff: Need help with air packaging
> 
> Hi everybody,
> I'm trying to package my application into an air package. I've successfully 
> done this under Linux with FlexMojos 7.1.0-SNAPSHOT, Apache Flex 4.14.1, 
> Adobe Air 14.0, and others.
> My main issue is that I have some resources which need to be bundled with the 
> app as they are embedded in the code. I've used the compiler directive to 
> include files however they are put in the root folder of the air package and 
> I would like them in a subfolder. Can anyone tell me how to do this?
> 
> 
> 
> Kind regards,
> 
> Victor
                                          

Reply via email to