Skip to content

Instantly share code, notes, and snippets.

@pestrada
Created May 13, 2013 15:02
Show Gist options
  • Save pestrada/5568976 to your computer and use it in GitHub Desktop.
Save pestrada/5568976 to your computer and use it in GitHub Desktop.
Sample POM file for an Android Library of an Android project managed with Maven.
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<groupId>com.your_company.package</groupId>
<artifactId>your_parent_artifact_id</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>apk</packaging>
<artifactId>your-project-tests</artifactId>
<properties>
<android.device>test</android.device>
<android.enableIntegrationTest>false</android.enableIntegrationTest>
</properties>
<profiles>
<profile>
<id>integration-tests</id>
<activation>
<property>
<name>integration-tests</name>
</property>
</activation>
<properties>
<android.enableIntegrationTest>true</android.enableIntegrationTest>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-test</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.your_company.package</groupId>
<artifactId>your_application</artifactId>
<scope>provided</scope>
<type>apk</type>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.your_company.package</groupId>
<artifactId>your_application</artifactId>
<scope>provided</scope>
<type>jar</type>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment