Issues filed here should be about bugs in __the code in this repository__.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
firebase-firestore:18.1.0's POM file specifies an incorrect packaging type of its dependency, io.grpc:grpc-android. The artifact type of grpc-android should be "aar" instead of "jar". https://mvnrepository.com/artifact/io.grpc/grpc-android/1.18.0
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-firestore</artifactId>
<version>18.1.0</version>
<packaging>aar</packaging>
<dependencies>
<!-- redacted for clarity -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-android</artifactId>
<version>1.16.1</version>
<scope>compile</scope>
<!-- The type SHOULD BE aar instead of jar -->
<type>jar</type>
</dependency>
<!-- redacted for clarity -->
</dependencies>
<name>firebase-firestore</name>
</project>
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
// TODO(you): code here to reproduce the problem
Thank you for reporting this @senpo! I was able to reproduce your problem when installing Firestore via Maven. We will try to get this resolved as soon as possible.
Hey @senpo ,
Are you using a build system that is not Gradle. What problem does this lead to in practice for you?
I'm using Bazel with rules_jvm_external to resolve maven dependencies.
Also see https://github.com/bazelbuild/rules_jvm_external/issues/70
Thank you!
The underlying resolver is Coursier. Any build tool using Coursier to resolve its dependencies will run into this problem.
Are there any updates to this issue? Will the POM files be retroactively fixed?
Hey Jin,
Thanks for your patience on this issue. We have a fix in progress that will be applied to releases going forward. We do not plan to patch existing releases since that would make builds non-hermetic.
If you need to unblock yourself in the mean time, you should be able to run this command have generate a maven repo that you can depend on. This generates a pom file that does not codify the type at all (as opposed to codifying it incorrectly as a jar). That might fix your problem ?
./gradlew -PpublishMode=RELEASE -PprojectsToPublish="firebase-firestore" firebasePublish
The maven repo should be in build/m2repository
build/m2repository/com/google/firebase/firebase-firestore/18.2.0/firebase-firestore-18.2.0.pom
This will work for me, but not downstream users of Coursier or Bazel's rules_jvm_external, since the erroneous pom will still be present on the upstream repo.
It's not clear to me how and why Gradle doesn't run into this issue. Do you know if they have special workarounds for non-matching dependency types like this?
@ashwinraghav tells me that this should be fixed in the next release (coming out in the next few weeks). So I'm going to close the issue. Thanks very much for the report!
I can verify that this is fixed with 19.0.0. Thank you!
Most helpful comment
@ashwinraghav tells me that this should be fixed in the next release (coming out in the next few weeks). So I'm going to close the issue. Thanks very much for the report!