The Android Maven Plugin supports a number of goals that are part of the default lifecycle and are invoked automatically. In most cases you will not have to invoke these goals directly, but it can be useful to know about them and their configuration options.
- android:apk
-
The
apkgoal creates the android package (apk) file. By default the plugin signs the file with the debug keystore. The configuration parameter<sign><debug>false<debug><sign>can be used to disable the signing process. - android:deploy-dependencies
-
The
deploy-dependenciesgoal deploys all directly declared dependencies of<type>apk</type>in this project. This goal is usually used in a project with instrumentation tests, to deploy the apk to test onto the device before running the deploying and running the instrumentation tests apk. The goal is automatically performed when running through the integration-test life cycle phase on a project with instrumentation tests (e.g.mvn installormvn integration-test). - android:dex
-
The
dexgoal converts compiled Java classes to the Android Dalivk Executable (dex) format. The dex execution can be configured with the parametersdex.jvmArguments,dex.coreLibrary,dex.noLocalsanddex.optimize. - android:generate-sources
-
The
generate-sourcesgoal generatesR.javabased on the resources specified by the resources configuration parameter. It generates Java files based on aidl files. If the configuration parameterdeleteConflictingFilesis true (which it is by default), this goal has also 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 and deletes any Thumbs.db files found in the resource directory. - android:internal-integration-test
-
The
internal-integration-testgoal is called automatically when the lifecycle reaches theintegration-testphase. It determines whether to call the goal instrument in this phase based on the existence of instrumentation test classes in the current project. The goal is internal to the plugin lifecycle and should not be used as separate invocation on the command line. - android:internal-pre-integration-test
-
The
internal-pre-integration-testgoal is called automatically when the lifecycle reachespre-integration-testphase. It determines whether to call the goalsandroid:deploy-dependenciesandandroid:deployin this phase and if necessary invokes them. The goal is internal to the plugin lifecycle and should not be used as separate invocation on the command line.