<?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/maven-v4_0_0.xsd"
>
<modelVersion>4.0.0</modelVersion>
<groupId>se.thefarm</groupId>
<artifactId></artifactId>
<version>0.0.0</version>
<packaging>apk</packaging>
<name></name>
<pluginRepositories>
<pluginRepository>
<id>zact-snaphost</id>
<url>http://zact.googlecode.com/svn/maven/snapshot-repository</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>zact-snaphost</id>
<url>http://zact.googlecode.com/svn/maven/snapshot-repository</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>acra-repository</id>
<name>acra Maven2 repository</name>
<url>http://acra.googlecode.com/svn/repository/releases</url>
</repository>
</repositories>
<properties>
<platform.version> 4.1.1.4</platform.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>${platform.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>library</artifactId>
<version>4.1.0</version>
<type>apklib</type>
</dependency>
<dependency>
<groupId>org.acra</groupId>
<artifactId>acra</artifactId>
<version>4.3.0b2</version>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>r10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android.gcm</groupId>
<artifactId>gcm-client</artifactId>
<version>r3</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>com.j256.ormlite</groupId>
<artifactId>ormlite-android</artifactId>
<version>4.41</version>
</dependency>
<!-- Make sure this is below the android dependencies -->
<dependency>
<groupId>com.pivotallabs</groupId>
<artifactId>robolectric</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>signing</id>
<goals>
<goal>sign</goal>
</goals>
<phase>package</phase>
<inherited>true</inherited>
<configuration>
<archiveDirectory></archiveDirectory>
<includes>
<include>target/${project.build.finalName}.apk</include>
</includes>
<keystore>./inner.keystore</keystore>
<storepass>inner2012</storepass>
<alias>inner</alias>
<arguments>
<argument>-sigalg</argument>
<argument>MD5withRSA</argument>
<argument>-digestalg</argument>
<argument>SHA1</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<sign>
<debug>false</debug>
</sign>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>some-group-id</groupId>
<artifactId>some-artifact-id</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>install</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
<androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
<resourceDirectory>${project.basedir}/res</resourceDirectory>
<nativeLibrariesDirectory>${project.basedir}/src/java/main/</nativeLibrariesDirectory>
<sdk>
<platform>15</platform>
</sdk>
<undeployBeforeDeploy>false</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>undercover</groupId>
<artifactId>undercover-maven-plugin</artifactId>
<version>0.8.5-SNAPSHOT</version>
<configuration>
<sourceEncoding>UTF-8</sourceEncoding>
<exclude>gen/</exclude>
<formats>
<format>html</format>
</formats>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
</plugins>
</build>
</project>
That did the trick (and does locally) but I got a NullPointer on the CI now, submittet a bugreport here: http://code.google.com/p/undercover/issues/detail?id=10
Basically that was all there was to it, the repository stuff was a headache though... So im setting upp my own maven repo now :)
Hope this helps
Den tisdagen den 30:e oktober 2012 kl. 06:38:05 UTC+1 skrev Neal:I've been trying to get undercover working with Robolectric built with Maven, can you share your knowledge on how this is accomplished?Thanks in advance.-Neal