Search code examples
androidmavengradleandroid-gradle-pluginandroid-maven-plugin

Gradle for android and pom type dependencies (maven) on S3


I have a pom type dependency (a pom in maven that only defines dependencies to other artefacts, but itself does not have any code i.e. a jar)

I tried adding it to my project as - implementation 'namspace:name:version' and it still looks for, and cannot find a jar. Fails to build.

I tried adding it as - implementation 'namspace:name:version@pom' and it does not seem to import anything from the pom, instead it succeeds to build but running androidDependecies shows none of the modules in the pom are included.

Edit: I am using AWS S3 as the repo. When I publish, I do it with the maven-publish plugin, the S3 folder that the repo is in is public to read.

The strange thing is that when I define the repo like this it fails on not finding a jar (which I now believe is just some kind of symptom) -

maven { url 'http://s3...' }

But when I define the repo like this it works correctly -

maven { url 's3://...', credentials(AwsCredentials) { ... } }

Am I missing a step? According to gradle and maven sites it seems to be a valid pom and gradle inclusion... below is the relevant part of the pom -

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.tabtale.tt_plugins.android</groupId>
  <artifactId>TT_Plugins</artifactId>
  <version>1.13.77.0.13</version>
  <packaging>pom</packaging>
  <dependencies> ...

Thanks,


Solution

  • The issue was with the permissions in our s3 apn, we need to add the listBuckets permisson. The "jar" error was just a symptom.