Overriding Flex SDK version

Flexmojos is developed and tested to work with lastest milestone of Flex SDK.

Flexmojos version

Flex SDK version

1.0

3.0

2.0

3.2

2.0.1

3.2

2.0.2

3.2

2.0.3

3.2

3.0.0

3.2

3.1.0

3.2

3.2.0

3.2

But Adobe is doing a good job keeping with compatible between releases. Usually new Flex SDK releases add a few methods, but do not remove or rename them. And flexmojos uses aspects to not invoke deprecated or unavailable APIs. So, it's possible to run any version of Flexmojos with any Flex SDK!

There are 2 key dependencies that should be changed to make flexmojos running on another Flex SDK version:

1 - The Flex compiler dependency

<project>
...
  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>com.adobe.flex</groupId>
            <artifactId>compiler</artifactId>
            <version>4.0.0.2480</version>
            <type>pom</type>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>

Dependency location

Note that the compiler dependency is not defined with project dependencies. It is defined in the plugin section. This relies on Maven's ability to override a plugin's dependency.
Read more.

2 - The Flex framework dependency

<project>
...
  <dependencies>
    <dependency>
      <groupId>com.adobe.flex.framework</groupId>
      <artifactId>flex-framework</artifactId>
      <version>4.0.0.2480</version>
      <type>pom</type>
    </dependency>
  </dependencies>
</project>

Attention

Do not mix versions!
If you try to use flex compiler 3.1 with flex framework 3.2 you will probably get into some weird error.