Maven & Android: complete pom.xml files contents

The complete pom.xml file I use for Android projects is as follows. 1. Main Android application's pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pl.looksok</groupId> <artifactId>ColCalc</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>apk</packaging> <build> <sourceDirectory>${project.basedir}/src</sourceDirectory> <plugins> <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>3.3.2</version> <configuration> <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile> <assetsDirectory>${project.basedir}/assets</assetsDirectory> <resourceDirectory>${project.basedir}/res</resourceDirectory> <genDirectory>${project.basedir}/gen</genDirectory> <deleteConflictingFiles>true</deleteConflictingFiles> <undeployBeforeDeploy>true</undeployBeforeDeploy> <sdk> <platform>7</platform> </sdk> </configuration> <extensions>true</extensions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> … Continue reading Maven & Android: complete pom.xml files contents

Use Maven with Android project

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 … Continue reading Use Maven with Android project

Basic Maven (m2eclipse / pom.xml) configuration

Introducing Maven to Eclipse projects from scratch was described in my previous post. Now the basic usage and configuration will be described. 1a. Adding external jars (Maven dependencies) To add some external jar file or reference to another workspace project you will need to: Right Click on project -> Maven -> Add dependency You can … Continue reading Basic Maven (m2eclipse / pom.xml) configuration

Incorporate Maven into Eclipse project

Here is short instruction how to incorporate Maven into existing Eclipse projects from scratch, step by step. The goal of Maven introduction presented here is quite generic, however I installed Maven to manage dependencies (jars). Maven build, installs or clean functions are not used by me. If You need to know more about maven itself … Continue reading Incorporate Maven into Eclipse project