14.13. Internal Android Maven Plugin Goals
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
apk
goal 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-dependencies
goal 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 install
or mvn integration-test
).
-
android:dex
-
The
dex
goal converts compiled Java classes to the Android Dalivk
Executable (dex) format. The dex execution can be configured with
the parameters dex.jvmArguments
, dex.coreLibrary
,
dex.noLocals
and dex.optimize
.
-
android:generate-sources
-
The
generate-sources
goal generates R.java
based on the
resources specified by the resources configuration parameter. It
generates Java files based on aidl files. If the configuration
parameter deleteConflictingFiles
is 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-test
goal is called automatically when
the lifecycle reaches the integration-test
phase. 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-test
goal is called automatically
when the lifecycle reaches pre-integration-test
phase. It
determines whether to call the goals android:deploy-dependencies
and android:deploy
in 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.