3

My client asked me to make my existing android app buildable with maven. I tried generating a pom.xml using the maven plugin , but unfortunately it doesn't map the dependencies. (Tried all solutions from here: Gradle build.gradle to Maven pom.xml)

After that I tried writing the pom.xml myself , but maven cannot find the support libraries nor the google play ones:

Failed to execute goal on project xxx: Could not resolve dependencies for project xxx.yyy:z:jar:1.0.0: The following artifacts could not be resolved: com.android.support:support-v13:jar:25.3.1, com.android.support:design:jar:25.3.1, com.android.support:appcompat-v7:jar:25.3.1, com.android.support:recyclerview-v7:jar:25.3.1, com.android.support:cardview-v7:jar:25.3.1, com.android.support:support-v4:jar:25.3.1, com.google.android.gms:play-services-maps:jar:11.0.2, com.google.android.gms:play-services-location:jar:11.0.2, com.google.android.gms:play-services-places:jar:11.0.2:

My pom.xml entries look like this:

...
 <dependency>
   <groupId>com.android.support</groupId>
   <artifactId>design</artifactId>
   <version>25.3.1</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>com.android.support</groupId>
   <artifactId>appcompat-v7</artifactId>
   <version>25.3.1</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>com.android.support</groupId>
   <artifactId>recyclerview-v7</artifactId>
   <version>25.3.1</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>com.android.support</groupId>
   <artifactId>cardview-v7</artifactId>
   <version>25.3.1</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>com.android.support</groupId>
   <artifactId>support-v4</artifactId>
   <version>25.3.1</version>
   <scope>provided</scope>
  </dependency>
...

If someone can guide me how to convert the support libraries into maven dependencies (automatically or manually) , that would be helpful.

Hristo Stoyanov
  • 1,960
  • 1
  • 12
  • 24

0 Answers0