http://flexmojos.sonatype.org/
flexmojos-maven-plugin のある場所
http://repository.sonatype.org/content/groups/flexgroup/org/sonatype/flexmojos/flexmojos-maven-plugin/
com.adobe.flex.framework系のある場所
以下あたりを参考にして、バージョンを決めればよさそう。
https://repository.sonatype.org/content/groups/flexgroup/com/adobe/flex/framework/framework/
mvn test と mvn verify ができる最低限の pom.xml
<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">
<!-- pom.xml参考 : http://dev.yoolab.org/maven/content/repositories/releases/org/as3commons/as3commons-project/1.0.1/as3commons-project-1.0.1.pom -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.objectfanatics</groupId>
<artifactId>sandbox</artifactId>
<packaging>swc</packaging>
<name>ObjectFanatics Sandbox Project</name>
<version>0.0.1-SNAPSHOT</version>
<inceptionYear>2010</inceptionYear>
<url>http://www.objectfanatics.com/</url>
<description>ObjectFanatics Sandbox Project</description>
<properties>
<!-- flex-mojos version -->
<flex-mojos.version>3.5.0</flex-mojos.version>
<!-- flex version -->
<flex.version>3.5.0.12683</flex.version>
<!-- flashplayer version -->
<flashplayer.version>${flashplayer.version.major}.${flashplayer.version.minor}.${flashplayer.version.revision}</flashplayer.version>
<flashplayer.version.major>10</flashplayer.version.major>
<flashplayer.version.minor>0</flashplayer.version.minor>
<flashplayer.version.revision>0</flashplayer.version.revision>
</properties>
<!-- 開発者情報 -->
<developers>
<developer>
<id>makoto.sato</id>
<name>Makoto Sato</name>
<email>makoto.sato [at] objectfanatics.com</email>
<url>http://www.objectfanatics.com</url>
<organization>ObjectFanatics Ltd.</organization>
<organizationUrl>http://www.objectfanatics.com</organizationUrl>
<timezone>+9</timezone>
</developer>
</developers>
<dependencies>
<!-- Player/Air Global dependency. -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>${flex.version}</version>
<scope>external</scope>
<type>swc</type>
<classifier>${flashplayer.version.major}</classifier>
<!--<classifier>${flashplayer.version.major}.${flashplayer.version.minor}</classifier>-->
</dependency>
<!-- for unit testing. http://asunit.org/ -->
<dependency>
<groupId>com.asunit</groupId>
<artifactId>asunit</artifactId>
<version>20071011</version>
<type>swc</type>
<scope>test</scope>
</dependency>
<!-- Dependencies for Flex. This includes flex classes. ex: ListCollectionView. -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>framework</artifactId>
<version>${flex.version}</version>
<scope>external</scope>
<type>swc</type>
</dependency>
<!-- Dependencies for Flex. This includes resource bundle. Not having this dependency causes some errors. ex: [ERROR] Unable to resolve resource bundle "collections" for locale "en_US". -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>framework</artifactId>
<version>${flex.version}</version>
<type>rb.swc</type>
<scope>external</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>utilities</artifactId>
<version>${flex.version}</version>
<type>swc</type>
<scope>external</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex</artifactId>
<version>${flex.version}</version>
<type>swc</type>
<scope>external</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>framework</artifactId>
<version>${flex.version}</version>
<scope>external</scope>
<type>zip</type>
<classifier>configs</classifier>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>rpc</artifactId>
<version>${flex.version}</version>
<scope>external</scope>
<type>swc</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>rpc</artifactId>
<version>${flex.version}</version>
<type>rb.swc</type>
<scope>external</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/actionscript</sourceDirectory>
<testSourceDirectory>src/test/actionscript</testSourceDirectory>
<defaultGoal>test</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flex-mojos.version}</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<configuration>
<configurationReport>true</configurationReport>
<targetPlayer>${flashplayer.version}</targetPlayer>
<locales>
<param>en_US</param>
</locales>
<updateSecuritySandbox>true</updateSecuritySandbox>
<includeAsClasses>
<source>
<directory>src/main/actionscript</directory>
</source>
</includeAsClasses>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>flex-mojos-repository</id>
<url>http://repository.sonatype.org/content/groups/flexgroup</url>
</repository>
</repositories>
</project>
asDocの生成
flex-mojosでやろうとしたが、3系だとVectorとかのクラスを認識せず、4系だとspark.cssが見つからないとか言われる。本家のバグレポートでは、3系でバグレポートがでてるのに4.0でFixedということでバグがクローズされてる。このような開発状況を見るかぎりは flex-mojo を利用するのはリスクが高いですね、、、。今回はとりあえずasDocの生成をflex-sdkを直接使って行うだけに留めるけど、将来的には構成管理全般からflex-mojosを外すことにしよう。
"C:\Program Files\flex_sdk_4.1.0.16076\bin\asdoc.exe" -source-path . -doc-sources .ちなみに、as3のソースコードの内容によって以下のようなエラーが出ることがある。
エラー: toplevel.xml を作成できませんでした : String index out of range: -41原因は未確認。