Use Maven with Android project

12 05 2012

In order to mavenize (existing or not) Android project in Eclipse few steps are required:

1. Install m2eclipse plugin

All instructions how to do it, You will find here.

2. Install ‘Android Configurator for M2E

in Eclipse go to menu:

Help -> Eclipse Marketplace

search for ‘Android Configurator for M2E’ and install it:

Here is plugin’s website. Any additional info will be provided there. Moreover here is very detailed description about Android development with Maven.

3. Install Maven 3.0.3

Android Configurator for m2e requires Maven in version 3.0.3 or higher, and m2eclipse comes with lower version. There is need to update it. Use download source site for Maven 3.0.4 and unzip it. Then in eclipse go to:

Window -> Preferences -> Maven -> Installations

and set path to downloaded files (click ‘Add‘):

4. Create pom.xml

Here is sample pom.xml from plugin’s website. The most important differences between this, and standard pom.xml are marked with green.

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">

                        <!-- platform or api level (api level 4 = platform 1.6)-->

If you need some more info on basic configuration of pom.xml for m2eclipse, look  here.

Did I help you?
I manage this blog and share my knowledge for free sacrificing my time. If you appreciate it and find this information helpful, please consider making a donation in order to keep this page alive and improve quality

Donate Button with Credit Cards

Thank You!




2 responses

17 11 2012
Maven & Android: complete pom.xml files contents « Looks OK!

[…] files are operational, after performing all maven, m2eclipse and maven for android plugin […]

15 07 2013
m2clipse maven with Android and ActionBarSherlock | BlogoSfera

[…] I’m new to the all Maven.. In my understanding it should help me with keeping an order with my dependencies.. I’m trying to make it work using the m2clipse plugin and make it work with Android. (I used this site to do so: […]

Give Your feedback:

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: