<?xml version="1.0" encoding="ISO-8859-1"?>
<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>
  <parent>
    <groupId>org.easymock</groupId>
    <artifactId>easymock-parent</artifactId>
    <version>3.4</version>
  </parent>

  <artifactId>easymock-android-tck</artifactId>
  <packaging>apk</packaging>
  <name>EasyMock Android Test</name>
  <description>EasyMock Android Test</description>
  <inceptionYear>2013</inceptionYear>

  <developers>
    <developer>
      <id>henri</id>
      <name>Henri Tremblay</name>
      <url>http://blog.tremblay.pro</url>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <properties>
    <skipTests>false</skipTests>

    <!-- No code coverage need on this project since it's only a test project -->
    <jacoco.skip>true</jacoco.skip>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>cglib</groupId>
          <artifactId>cglib</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.dexmaker</groupId>
      <artifactId>dexmaker</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>com.google.android</groupId>
      <artifactId>android</artifactId>
      <version>4.1.1.4</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpclient</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.khronos</groupId>
          <artifactId>opengl-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xerces</groupId>
          <artifactId>xmlParserAPIs</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xpp3</groupId>
          <artifactId>xpp3</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.json</groupId>
          <artifactId>json</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.android</groupId>
      <artifactId>android-test</artifactId>
      <version>4.1.1.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.simpligility.maven.plugins</groupId>
          <artifactId>android-maven-plugin</artifactId>
          <version>4.3.0</version>
          <extensions>true</extensions>
          <configuration>
            <test>
              <instrumentationPackage>org.easymock.android</instrumentationPackage>
              <instrumentationRunner>android.test.InstrumentationTestRunner</instrumentationRunner>
            </test>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.simpligility.maven.plugins</groupId>
                    <artifactId>android-maven-plugin</artifactId>
                    <versionRange>[1.0,)</versionRange>
                    <goals>
                      <goal>consume-aar</goal>
                      <goal>generate-sources</goal>
                      <goal>proguard</goal>
                      <goal>emma</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.simpligility.maven.plugins</groupId>
        <artifactId>android-maven-plugin</artifactId>
        <configuration>
          <sdk>
            <platform>19</platform>
          </sdk>
        </configuration>
        <extensions>true</extensions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.4.0</version>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>install</id>
            <phase>integration-test</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>adb</executable>
              <arguments>
                <argument>install</argument>
                <argument>-r</argument>
                <argument>${project.build.directory}/${project.build.finalName}.apk</argument>
              </arguments>
              <skip>${skipTests}</skip>
            </configuration>
          </execution>
          <execution>
            <id>execute</id>
            <phase>integration-test</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>adb</executable>
              <arguments>
                <argument>shell</argument>
                <argument>am</argument>
                <argument>instrument</argument>
                <argument>-w</argument>
                <argument>org.easymock.android/.AndroidTck</argument>
              </arguments>
              <skip>${skipTests}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Won't be deployed in the Central repository -->
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
