Am trying to build an android UIAutomatorTestcase. Since there is a need to merge two xml files inside my testcase, i have to use a thirdparty jar which has its own dependencies. I tried to build the AutomatorTestcase using maven. When i execute the below command,
mvn clean install
the jar that gets generated does not have the classes.dex files in it and has pom.xml , pom.properties file.
The class AutomatorTest is inside src/main/java/com.example.uiautomator.
Can anyone tell me whats wrong in the pom.xml?
My Pom.xml
<?xml version="1.0" encoding="UTF-8"?>
http://ift.tt/IH78KX xmlns:xsi="http://ift.tt/ra1lAU" xsi:schemaLocation="http://ift.tt/IH78KX http://ift.tt/VE5zRx">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>uiautomatortest</artifactId>
<packaging>jar</packaging>
<version>0.0.1</version>
<name>UiAutomatorExample</name>
<description>To try uiautomator testcase</description>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
<id>el4jReleaseRepositoryExternal</id>
<name>External release repository of the EL4J project</name>
<url>http://public-el4.elca-services.ch/el4j/maven2repository</url>
</repository>
<repository>
<id>collectionspace-remote-repos</id>
<name>collectionspace-remote-repos</name>
<url>http://source.collectionspace.org:8081/artifactory/remote-repos</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android-test</artifactId>
<version>4.1.1.4</version>
</dependency>
<dependency>
<groupId>android.test.uiautomator</groupId>
<artifactId>uiautomator</artifactId>
<version>4.4.2_r3</version>
<scope>system</scope>
<systemPath>D:\Softwares\AndroidStudio\sdk\platforms\android-19\uiautomator.jar</systemPath>
</dependency>
<!-- EL4J core module. -->
<dependency>
<groupId>ch.elca.el4j.modules</groupId>
<artifactId>module-core</artifactId>
<version>3.1</version>
<scope>provided</scope>
</dependency>
<!-- EL4J jmx support -->
<dependency>
<groupId>ch.elca.el4j.modules</groupId>
<artifactId>module-jmx</artifactId>
<version>3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.elca.el4j.modules</groupId>
<artifactId>module-xml_merge-common</artifactId>
<version>3.1</version>
<scope>provided</scope>
</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>
<version>4.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src.main.java</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.1.1</version>
<extensions>true</extensions>
<configuration>
<sdk>
<path>${env.ANDROID_HOME}</path>
<platform>19</platform>
</sdk>
<push>
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
<destination>/data/local/tmp/</destination>
</push>
<attachJar>false</attachJar>
<dex>
</dex>
<test>
<createReport>true</createReport>
</test>
<proguard>
<skip>true</skip>
</proguard>
<uiautomator>
<skip>false</skip>
<testClassOrMethods>
<testClassOrMethod>com.example.uiautomatortest.AutomatorTest</testClassOrMethod>
<testClassOrMethod>com.example.uiautomatortest.AutomatorTest#testDemo()</testClassOrMethod>
</testClassOrMethods>
<createReport>true</createReport>
</uiautomator>
</configuration>
<executions>
<execution>
<id>install-jar-to-device</id>
<phase>install</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
<execution>
<id>dex-classes</id>
<phase>prepare-package</phase>
<goals>
<goal>dex</goal>
</goals>
</execution>
<execution>
<id>ui-test</id>
<phase>install</phase>
<goals>
<goal>uiautomator</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<classesDirectory>${project.build.directory}/</classesDirectory>
<includes>
<include>classes.dex</include>
</includes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
No comments:
Post a Comment