2011-07-13 9 views
2

mavenを使用してFlexモバイルプロジェクトをビルドする方法があるかどうかを確認しようとしています。Flex Mobile Maven Build

ビルドプロセスの出力として、私はmavenビルドを実行するときに、apk-fileとipa-fileが必要です。ユニットテストを実行する方法があれば、本当にクールです。

解決策、チュートリアル、またはそれを処理する方法の例があります。

提案がありますか?

答えて

4

Flex Mojosは、Mavenを使用してFlexアプリケーションを構築する際のデファクトスタンダードです。私の知る限り、現在はモバイルビルドをサポートしていません。

Antの経験がある場合は、Antベースのビルドを作成し、Maven AntRunプラグインを使用してターゲットの実行をMavenフェーズにバインドすることができます。以下は、クリーン、コンパイル、テストおよびパッケージのためにこれを行い例です。

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-antrun-plugin</artifactId> 
      <version>1.6</version> 
      <executions> 
       <execution> 
        <id>clean-project</id> 
        <phase>clean</phase> 
        <goals> 
         <goal>run</goal> 
        </goals> 
        <configuration> 
         <tasks> 
          <ant antfile="${basedir}/build/build.xml"> 
           <target name="clean"/> 
          </ant> 
         </tasks> 
        </configuration> 
       </execution> 
       <execution> 
        <id>create-swf</id> 
        <phase>compile</phase> 
        <goals> 
         <goal>run</goal> 
        </goals> 
        <configuration> 
         <tasks unless="flex.skip"> 
          <ant antfile="${basedir}/build/build.xml"> 
           <target name="compile"/> 
          </ant> 
         </tasks> 
        </configuration> 
       </execution> 
       <execution> 
        <id>flexunit-tests</id> 
        <phase>test</phase> 
        <goals> 
         <goal>run</goal> 
        </goals> 
        <configuration> 
         <tasks unless="maven.test.skip"> 
          <ant antfile="${basedir}/build/build.xml"> 
           <target name="test"/> 
          </ant> 
         </tasks> 
        </configuration> 
       </execution> 
       <execution> 
        <id>generate-asdoc</id> 
        <phase>package</phase> 
        <goals> 
         <goal>run</goal> 
        </goals> 
        <configuration> 
         <tasks unless="asdoc.skip"> 
          <ant antfile="${basedir}/build/build.xml"> 
           <target name="asdoc"/> 
          </ant> 
         </tasks> 
        </configuration> 
       </execution> 
       <execution> 
        <id>dist</id> 
        <phase>package</phase> 
        <goals> 
         <goal>run</goal> 
        </goals> 
        <configuration> 
         <tasks> 
          <ant antfile="${basedir}/build/build.xml"> 
           <target name="dist"/> 
          </ant> 
         </tasks> 
        </configuration> 
       </execution> 
      </executions> 
      <dependencies> 
       <!-- 
        since we are using maven-antrun 1.6 which depends on ant 1.8.1 
        make sure the version number on ant-junit matches 
       --> 
       <dependency> 
        <groupId>org.apache.ant</groupId> 
        <artifactId>ant-junit</artifactId> 
        <version>1.8.1</version> 
       </dependency> 
      </dependencies> 
     </plugin> 
    </plugins> 
</build> 
+1

追加で、私は[Flex on mobile](http://www.michelboudreau.com/2010/08/15/flex-on-android/)のブログを開き、Antビルドを使用してコンパイル/パッケージ化しました/ deploy。プロジェクトを見て、必要なすべてを行うために、MavenビルドでAntスクリプトを使用する必要があります。 –

3

私が知っているほとんどの人は、Flex Mojosプロジェクトを利用しています。私が理解しているように、これはFlexデベロッパー向けのMavenプラグインのセットです。

1

私もそれを必要とする...

私はいくつかの周りにgoogleingんでした...ここで私は純粋見つかりましどのようなものですMavenのソリューションは..これまでのところ、このブログ記事を参照してください、私はそれが http://www.flexthinker.com/2011/07/how-to-build-a-flex-mobile-app-with-maven/

はしかし、それはバージョンと公式リリースを支払われている作品、試してみました...

たぶん私は空想、純粋なAntのない使用します。より効率的です

関連する問題