Update 1: fixed the AIR 3 swc’s and added the descriptors here http://cortizone.googlecode.com/hg/maven/
Disclaimer 1: this is a temporary article i wish to remove in the future when it becomes obsolete*
Disclaimer 2: use at your own risk, YMMV
*hopefully soon
For the moment there is no Flex SDK 4.6 love yet when yer using FlexMojos.
This is a quick recap of how i seem to have it working now (i think…) using Conrad’s flex_sdk_maven_install (https://github.com/piercer/flex_sdk_maven_install).
I took the 4.6 SDK that comes with the new Flash Builder and installed it using his guidelines in a clean maven repo. You can find that stuff here: http://cortizone.googlecode.com/hg/maven-repositories/
If you clone this repo (Mercurial required) and put that stuff in your Maven .m2 folder it seems to actually work… The suspicious part is that FlexMojos keeps dependencies to 4.5.1 compiler (hardcoded in the plugin? nice…) Again, merely adding http://cortizone.googlecode.com/hg/maven-repositories/ in your pom as a repository location doesn’t work, you should do it manually.
This is the pom i used to test and i get a BUILD SUCCESS. Quadruple rainbow in my face…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | <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>net.kaustic.flexmojos.test</groupId>
<artifactId>flexmojos-test-swc</artifactId>
<packaging>swc</packaging>
<version>1.0-SNAPSHOT</version>
<developers>
<developer>
<id>vancoja</id>
<name>Jan Van Coppenolle</name>
</developer>
</developers>
<properties>
<flexmojos.version>4.0-RC2</flexmojos.version>
<flex.sdk.version>4.6.0.23201</flex.sdk.version>
<apparat.version>1.0-RC9</apparat.version>
<flexunit.version>4.1.0-beta3</flexunit.version>
<flashplayer.version.swf>13</flashplayer.version.swf>
<flashplayer.version.major>11</flashplayer.version.major>
<flashplayer.version.minor>1</flashplayer.version.minor>
<flashplayer.version>${flashplayer.version.major}.${flashplayer.version.minor}</flashplayer.version>
<locale>en_US</locale>
</properties>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<classifier>${flashplayer.version.major}.${flashplayer.version.minor}</classifier>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>external</scope>
</dependency>
<dependency>
<groupId>com.adobe.flexunit</groupId>
<artifactId>flexunit</artifactId>
<version>${flexunit.version}</version>
<type>swc</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.apparat</groupId>
<artifactId>apparat-ersatz</artifactId>
<version>${apparat.version}</version>
<type>swc</type>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<sourceDirectory>src/main/as3</sourceDirectory>
<testSourceDirectory>src/test/as3</testSourceDirectory>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/test/as3</directory>
<includes>
<include>FlexUnitApplication.mxml</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flexmojos.version}</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<configuration>
<coverage>true</coverage>
<configurationReport>true</configurationReport>
<targetPlayer>${flashplayer.version}</targetPlayer>
<swfVersion>${flashplayer.version.swf}</swfVersion>
<locales>
<param>${locale}</param>
</locales>
<updateSecuritySandbox>true</updateSecuritySandbox>
</configuration>
</plugin>
<plugin>
<groupId>com.googlecode.apparat</groupId>
<artifactId>apparat-maven-plugin</artifactId>
<version>${apparat.version}</version>
<executions>
<execution>
<goals>
<goal>reducer</goal>
<goal>tdsi</goal>
</goals>
</execution>
<execution>
<id>tsdi-test</id>
<phase>process-test-classes</phase>
<goals>
<goal>tdsi</goal>
</goals>
<configuration>
<overrideArtifact>${project.build.testOutputDirectory}/TestRunner.swf</overrideArtifact>
</configuration>
</execution>
</executions>
<configuration>
<mergeABC>false</mergeABC>
<sortCPool>false</sortCPool>
<mergeCF>false</mergeCF>
<alchemyExpansion>true</alchemyExpansion>
<inlineExpansion>true</inlineExpansion>
<macroExpansion>true</macroExpansion>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Maven Plugin Repository</name>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>flexmojos-repository</id>
<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
</pluginRepository>
<pluginRepository>
<id>oss-sonatype</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>flex-mojos-repository</id>
<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project> |