maven-android-archetype


Maven Android Archetype

Goal

The goal of this archetype is to assemble Android and Maven, using their full features. So we can package and deploy it to our device, or start/debug it, as an Android project.

We can also use the Android xml generator and have suggestions building xml.

Usage

To use the archetype, just add it in your archetype-catalog.xml :

<archetype> <groupId>it.soulsoftware.android</groupId> <artifactId>Android-archetype</artifactId> <version>1.4</version> <repository>https://maven-android-archetype.googlecode.com/svn/repository</repository> <description>Android-archetype</description> </archetype>

Then you can start a new Maven Project, using this archetype as template.

Result

This will be structure of the project, and the result of the deployment on the device:

| project | Android | |:------------|:------------| | https://maven-android-archetype.googlecode.com/svn/repository/images/device/2/device-2.png | https://maven-android-archetype.googlecode.com/svn/repository/images/device/1/device-1.png |

Start a new maven android project from scratch

To start a new project, you need :

  • Eclipse
  • Maven 2.2.1 (or higher)

For the support to google maps, you need also to install the Google Api add-on. Further information on http://code.google.com/android/add-ons/google-apis/mapkey.html.

Then follow the SettingUpEnvironment wiki page.

Create a maven-android project, with the archetype

When your environment is setted up, you can use the archetype to start working with android. To use the archetype, follow the CreateAndroidProject wiki.

Trik

To enable android to recognize your project as a genuine android, you need to create a new project by the android wizard in your workspace. At this point you can use the Android xml generator also for the maven-android projects.

Once created the project via android wizard, you can delete it.

Project Information

Labels:
android maven archetype apache