Maven: The Complete Reference
   - 14.16. Tips and Tricks

14.16. Tips and Tricks

14.16.1. Other Maven Plugins

Apart from the features of the Android Maven Plugin you have access to all the other Maven plugins to automate things like license header file checks, resource filtering and many more.

14.16.2. Performing a Release Build

A release build for an Android application needs to create an apk file that has been signed and zipaligned. In addition it is adviseable to run shrinking and obfuscation. All these steps can be done with the Maven Jarsigner Plugin, the Proguard Maven Plugin and the zipalign goal of the Android Maven Plugin. A sample configuration of a release build is available in the morseflash example application of the plugin samples.

14.16.3. Configuring command line usage

In order to use the Android Maven Plugin goals on the command line with the short plugin name android outside a directory that contains a reference to the plugin, you have to add the following pluginGroups snippet to your settings.xml file.

Snippet for settings.xml to enable short plugin name usage. 

<pluginGroups>
    <pluginGroup>
        com.jayway.maven.plugins.android.generation2
    </pluginGroup>
</pluginGroups>












Become a Member

Are you a current user of:

Top