Maven: The Complete Reference
The Android Maven Plugin has powerful features for interacting with
attached devices and emulators implemented in a number of goals. They
android.device parameter to determine a specific device as
specified by the serial number, all connected emulators or all
connected devices should be affected. A value of
trigger execution on all emulators connected via adb and a value of
usb will affect all devices.
The following goals support the device parameter and sequential execution against all devices.
deploygoal deploys the built apk file, or another specified apk, to the connected device(s). This goal is automatically performed when running through the
integration-testlifecycle phase on a project with instrumentation tests (e.g.
undeploygoal removes the apk of the current project, or another specified apk, from the connected devices and emulators.
redeploygoal executes undeploy and deploy consecutively on all specified devices and emulators.
instrumentgoal runs the instrumentation tests after automatically deploying the test application and the tests. It honors the standard Maven skip test properties as well as
android.test.skip. It supports a number of further parameters that are explained in more detail in Section 14.14, “Testing Android Application Code”.
pullgoal can be used to copy a file or directory from the device. Source and destination file have to be specified with the
pushgoal can be used to copy a file or directory to the device. Configuration is done with the
rungoal will start the application on the device. If the run.debug paramter is set to true starting will wait for a debugger to connect.