olegflo
olegflo

Reputation: 1115

How to deal with inner dependencies for apklib in maven (Android project)?

I faced following issue. Sometimes I want to add dependency to apklib in my Android project, but if this library has own dependencies that are not declared in its own pom file I get the error.

For example

<dependency>
    <groupId>com.google.maps.android</groupId>
    <artifactId>android-maps-utils-apklib</artifactId>
    <version>0.3</version>
    <type>apklib</type>
</dependency>

it links us to http://repo2.maven.org/maven2/com/google/maps/android/android-maps-utils-apklib/0.3/android-maps-utils-apklib-0.3.pom

It's really need for correct work following dependencies

<dependency>
    <groupId>android</groupId>
    <artifactId>android</artifactId>
    <version>4.4.2_r2</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>com.google.android</groupId>
    <artifactId>support-v4</artifactId>
    <version>19.0.1</version>
</dependency>
<dependency>
    <groupId>com.google.android.gms</groupId>
    <artifactId>google-play-services</artifactId>
    <version>14.0.0</version>
</dependency>

that are missing in android-maps-utils-apklib-0.3.pom

So, after I add android-maps-utils-apklib dependency, IDE tells me that this apklib needs own dependencies (e.g. android core that is already added to root project).

enter image description here

It means that I have my own project (PROJ) that has some adpklib dependency (D), where D needs some libs D1, D2, D3. They are not declared in pom file for D, but they are declared in pom for PROJ but it doesn't help.

So the question is how I can add missing dependencies for D?

Upvotes: 1

Views: 223

Answers (0)

Related Questions