Maven Android Plugin

7218 ワード

Maven Android Plugin
http://www.cnblogs.com/santry/archive/2011/10/25/2223524.html
利用可能なGoals
Goal記述
android:appk
appkファイルを作成します。デフォルトではdebug鍵を使ってAppに署名します。変更が必要なら、設定パラメータはfalseに変更できます。
android:appklib
applibファイルを作成します。applibファイルは展開されません。
android:deploy
配置がコンパイルされているか、または指定されたappkファイルが接続されたデバイスに送られます。mvn integration-test(またはmvn install)コマンドは自動的に実行されます。
android:deploy-dependencies
Deploys all directly declared dependencies ofappkin thisprojject's pom.Usuallyused in project with inststininininstststststs、to deploy the test to to device before e e e e e e e e bebebebeinininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininvn install)on a project with instruction tests.
android:dex
コンパイルされたJava clasesをAndroid dexフォーマットに変換します。
android:emulator-start
指定されたAndroidシミュレータを起動します。
android:emulator-stop
指定されたAndroidシミュレータを停止します。
android:generate-sources
Generates R.java based on resource specified by the resource configration parameter.Generates java files based on aidl files.If the configration parater deleteConfliting Files is true(wch it by deult)this goal has the follwing side-effects:deletes any R.java files found in the source directory.deletes any.java files with the same name as an.aidl file found in the source directory.delectory.delets
android:instruument
デバイスでアプリを実行します。
android:internal-intergration-test
内部コマンドは直接使用しないでください。ライフサイクルがintegration-testステップに到達すると自動的に呼び出します。
android:ndk-build
不明
android:pull
ファイル/フォルダをデバイスからコピーします。
android:push
ファイル/フォルダをデバイスにコピーします。
android:redeploy
コンパイルまたは指定されたappkファイルを接続されたデバイスに再配置します。
android:undeploy
接続されたデバイスから生成または指定されたappkファイルをアンインストールします。
android:unpack
解凍庫
android:version-udate
Android Manifest.xmlファイルのバージョン情報を更新します。android:versionName属性値とプロジェクトのバージョン情報を一致させることができます。Android:versionCodeを自動的に成長させるように配置することもできます。注意:この操作は、Android Manifest.xmlファイルの内容を再フォーマットする場合があります。設定自動更新android:versionName:
  <plugin> 


    <groupId> 

com.jayway.maven.plugins.android.generation2</groupId> 


    <artifactId> 

maven-android-plugin</artifactId> 


    <executions> 


      <execution> 


        <id> 

update-version</id> 


        <goals> 


          <goal> 

version-update</goal> 


        </goals> 


        <configuration> 


          <versionNameUpdate> 

true</versionNameUpdate> 


        </configuration> 


      </execution> 


    </executions> 


  </plugin> 

配置android:versionCode自動成長:
  <plugin> 


    <groupId> 

com.jayway.maven.plugins.android.generation2</groupId> 


    <artifactId> 

maven-android-plugin</artifactId> 


    <executions> 


      <execution> 


        <id> 

update-version</id> 


        <goals> 


          <goal> 

version-update</goal> 


        </goals> 


        <configuration> 


          <versionCodeAutoIncrement> 

true</versionCodeAutoIncrement> 


        </configuration> 


      </execution> 


    </executions> 


  </plugin> 

android:zippalign
Zipad lignMojo can the zippalign command against the appk.