Sorry for adding another question, โGoogle Maps Dependency Dependent on Google Android Dependency,โ but I think I read most of the posts about this and did not use all the proposed solutions without success.
I have an Android maven project that works fine, with a Google Maps V2 dependency that is not referenced using maven, but through the google-play-services_lib project, imported depending on the workspace and the attenuation of the capitalization library.
Now I am trying to configure the dependency of google-play-services via pom, since I am implementing automated maven tests with Robolectric, but I am stuck in this error shown in the first line of pom, without a quick fix:
dependency = [com.google.android.gms: google-play-services: apklib: 7: compilation] not found in workspace
What I have tried so far, after many searches and checking the results after each step without success:
Initially installed google play services components in my local .m2 repository using android-maven-sdk-helper (after these instructions ) and add two dependencies to jar and apklib version 7 in my pom project, which is my locally installed version (like here ) . After that, it should have worked, but a dependency error appeared.
Remove the link to the google-play-services_lib library (in project / preferences / Android / Library) from the eclipse build path. In any case, the google-play-services_lib project is still in the workspace.
Copy apklib from my local m2 storage to some place in the workspace: I tried google-play-services_lib / bin, google-play-services_lib / libs, MyProject / libs. Tested using the name google-play-services-7.apklib (as in the repository file) and google-play-services.apklib.
The "Mavenise" google-play-services_lib project included in the workspace by running the Eclipse Configure / Convert to Maven project. I edited the created pom to upgrade the packaging type to apklib: <packaging>apklib</packaging> , and the android-maven-plugin module with <extensions>true</extensions> added to recognize the apklib package type. I compiled the project with the maven target compilation with success, but I cannot find the generated apklib file anywhere.
After each of these changes, I make a Maven / Update project, clear the project, even restart Eclipse. Not successful: a dependency not found in the whitespace error still exists.
I do not know what else to try. Maybe this is something with the name of the library? The name of the library project is google.play-services_lib, with the suffix _lib, and the jar specified in the build path of the eclipse android library is _lib.jar, but maven artifacts do not have the suffix _lib. I also tried renaming components and artifacts without success, but I think the problem might be there. Can someone send a pom.xml example for the mavenized google-play-services_lib project?
Another suggestion: when I compile the mavenized library project, why can't I find the generated .apklib file, where is it? I checked the trace using mvn -X compilation and did not find a hint.
Environment and Versions:
Eclipse Indigo External maven 3.0.5 (embedded Maven 3.0.3 not used) android-maven-plugin 3.6.0 maven-eclipse-plugin 2.8 m2e-android plugin (m2eclipse android integration) 0.4.2 Android API level 13
pom.xml I added google-play-services_lib to the project:
<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"> <modelVersion>4.0.0</modelVersion> <groupId>google-play-services_lib</groupId> <artifactId>google-play-services_lib</artifactId> <version>7</version> <packaging>apklib</packaging> <properties> <android-platform>13</android-platform> <android-emulator>13</android-emulator> <android-maven-plugin-version>3.6.0</android-maven-plugin-version> <maven-compiler-plugin-version>3.0</maven-compiler-plugin-version> <java-version>1.6</java-version> <local-sdk-path>C:\NoProgramFiles\Android\android-sdk</local-sdk-path> </properties> <build> <finalName>${project.artifactId}</finalName> <plugins> <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>${android-maven-plugin-version}</version> <configuration> <sdk> <path>${local-sdk-path}</path> <platform>${android-platform}</platform> </sdk> <emulator> <avd>${android-emulator}</avd> </emulator> <deleteConflictingFiles>true</deleteConflictingFiles> <undeployBeforeDeploy>true</undeployBeforeDeploy> </configuration> <extensions>true</extensions> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin-version}</version> <configuration> <source>${java-version}</source> <target>${java-version}</target> </configuration> </plugin> </plugins> </build>