Tags

, , , , , ,

When you work with flex applications, there are situations to force restrict the flash player to use specific version. To do this, you have to do the below three changes in your pom.xml.

To set the target player version as 9, you dont have to take much effort. Simply you can specify the <targetPlayer> to 9 like below.

<configuration>
<targetPlayer>9.0.0</targetPlayer>
…..

To set the target player version as 10, follow the below steps.

Here we use the target player version 10 and flex SDK version 3.4.0.9271. Reason for this specific version is, when you work on maven build for flex applications, ultimately you should use flex-mojo’s repository. Flex mojo’s repository has the version 3.4.0.9271. Check the below url to find the different version of flex SDK supported in flex-mojo’s.

https://repository.sonatype.org/content/groups/flexgroup/com/adobe/flex/compiler/

1. As a first step, you need to include the target version under the <configuration> element of the <plugin> in compiler plugin.

<configuration>
<targetPlayer>10.0.0</targetPlayer>

2. You must include the specific version of playerglobal. When you see your flex_home/frameworks/libs/player you can see two directories named as 9 and 10. Both has the playerglobal.swc for specific target version and invoked based on the player mentioned in the application. Here, you have to include the playerglobal.swc as dependency with the classifier 10.

<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>3.4.0.9271</version>
<classifier>10</classifier>
<type>swc</type>
</dependency>

3. When you add flex-framework dependency in your pom.xml, it includes the playerglobal.swc by default. So in order to make use of the version you specified in step 2, you have to exclude the playerglobal from flex-framework.

<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>3.4.0.9271</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
</exclusion>
</exclusions>
</dependency>

By following these 3 steps, you will be forced to use flash player 10 to render your flex application.

Advertisements