Adobe Flex / AIR Maven Integration

I am writing an Adobe AIR application that needs to be built in CI using maven and nexus. I tried to follow this article , which is the most recent article from the source, but I still don't understand these things:

  • Are the first and second pom.xml examples in the article in the same pom.xml file?
  • How do I get the Flex SDK dependencies from my CI?

It would be great if someone had a full project setup and went through it all.

+2


source to share


1 answer


This blog has some useful information on building Air apps with Maven 2.

As for your numbered questions

Part 1: The two POMs in the tutorial are different. The first creates a swf package containing your application components. The second POM has a dependency on the swf package (note the dependency in the second POM for the artifactId Air in the first). The second POM defines the processing for unpacking the swf package (using the dependency plugin) and then uses the exec plugin to call adt on the contents of the unpacked package.

Thus, the described process consists of two parts. The first POM packs the swf files so they are available in the repository. The second POM will fetch any packages needed from the Maven repository and call adt to compile them. Therefore, if you have multiple Air packages, the second POM can be modified to download additional packages and compile them.

Part 2. Most of the dependencies you need are hosted in the public Sonatype repository , one notable exception is adt.jar, you can deploy adt.jar in a Maven repository manager like Nexus using the deploy plugin deployment target.



This will deploy adt.jar to the repository with credentials matching the tutorial:

mvn deploy:deploy-file -Durl=http://path/to/repository -DrepositoryId=[some.id]
    -Dfile=adt.jar -DgroupId=com.adobe.flex.compiler -DartifactId=adt
    -Dversion=3.3.0.4852 -DgeneratePom=true -DgeneratePom.description="Flex ADT"

      

To reference the Nexus public repository, add the repository declaration to your settings.xml or pom.xml as follows:

<repositories>
  <repository>
    <id>nexus-public</id>
    <url>http://repository.sonatype.org/content/groups/public</url>
  </repository>
</repositories>

      

+2


source







All Articles