maven - Android Integration Test Uses Old APK -
i've created beautiful android project using maven , the android-release archetype. have simple problem: integration tests don't use newest version of library under test.
when run eclipse, maven , m2e seem use obsolete version (at least app opened on device split second looks way). first thought might eclipse's stupid caching, maven should able use correct version. deleted bin , target folders , entries in maven repositories, build pulls old version out of thin air.
and found not library under test obsolete, there test executed via maven , m2e deleted time ago.
i know question pretty vague, i'm not sure source of problem. can give me pointer happening?
evidently these @ least 2 separate problems. fixed eclipse portion adding library dependency in android properties of project. since it's problem android-maven-plugin i'll post relevant parts of pom.xml of integration test project in hopes starting same archetype had same problem , knows how fix it:
<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> <artifactid>org.acme.project.android.it</artifactid> <packaging>apk</packaging> <dependencies> <dependency> <groupid>org.acme.project</groupid> <artifactid>org.acme.project.android</artifactid> <version>${project.version}</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> </dependencies> <build> <plugins> <plugin> <groupid>com.jayway.maven.plugins.android.generation2</groupid> <artifactid>android-maven-plugin</artifactid> <configuration> <sdk> <platform>16</platform> </sdk> </configuration> <extensions>true</extensions> </plugin> </plugins> </build> </project>
you have make sure the version of application want test correct. in case using version 1.0.0 ... while in reality latest version under development 1.1.0-snapshot.
also pom above invalid. @ samples project provide part of android maven plugin project.
Comments
Post a Comment