Maven: The Complete Reference

14.9. Plugin Configuration Parameters

The Android Maven Plugin supports a large number of configuration parameters. They can typically be passed into the execution as plugin configuration, as properties defined in the pom or settings file or as command line parameters.

An example of a plugin configuration. 

<configuration>
    <sdk>
        <platform>2.1</platform>
    </sdk>
    <emulator>
        <avd>21</avd>
        <options>-no-skin</options>
    </emulator>
</configuration>

Configuration as properties in pom.xml. 

<properties>
    <android.emulator.avd>21</android.emulator.avd>
<properties>

Configuration on command line invocation. 

mvn android:emulator-start -Dandroid.emulator.avd=21

A number of other parameters have defaults that point to the default location as used by the standard Android/Eclipse project layout, but can be customized if desired.

  • androidManifestFile
  • assetsDirectory
  • resourceDirectory
  • sourceDirectories

Some of the other useful parameters are

device
Specify usb, emulator or a specific serial number. Read Section 14.10, “Device Interaction” for more information.
undeployBeforeDeploy
This parameter will cause the application as well as the test application to be undeployed from the device before each deployment.