From 4d4a6765fb046f711030f8cfd4a11468aa3a1f56 Mon Sep 17 00:00:00 2001 From: cgdecker Date: Fri, 26 Oct 2018 11:22:49 -0700 Subject: [PATCH] Fix the issue with classes that should only be included in the failureaccess artifact being included in the main Guava jar. It appears (thanks to @michaelhixson on https://github.com/google/guava/issues/3302) that the issue is with the maven-bundle-plugin (which does OSGi stuff). Presumably because Guava was declaring that it exports com.google.common.* (and doesn't exclude com.google.common.util.concurrent.internal), it was pulling those class files in from the dependency. It was also pointed out by @talios in that issue that failureaccess doesn't include OSGi metadata to export that package. This change should fix both of those issues, but we're going to need to release a failureaccess 1.0.1 and then guava 27.0.1. RELNOTES=Fixes an issue where classes that should only be included in failureaccess (Guava's one dependency) were also being included in the main Guava jar. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=218884985 --- android/guava/pom.xml | 7 ++++++- futures/failureaccess/pom.xml | 23 ++++++++++++++++++++++- guava/pom.xml | 7 ++++++- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/android/guava/pom.xml b/android/guava/pom.xml index 6061f6121bb6..6d2146ddf708 100644 --- a/android/guava/pom.xml +++ b/android/guava/pom.xml @@ -78,8 +78,13 @@ - !com.google.common.base.internal,com.google.common.* + + !com.google.common.base.internal, + !com.google.common.util.concurrent.internal, + com.google.common.* + + com.google.common.util.concurrent.internal, javax.annotation;resolution:=optional, javax.crypto.*;resolution:=optional, sun.misc.*;resolution:=optional diff --git a/futures/failureaccess/pom.xml b/futures/failureaccess/pom.xml index 01ce0922172c..7a58ef3de120 100644 --- a/futures/failureaccess/pom.xml +++ b/futures/failureaccess/pom.xml @@ -8,7 +8,7 @@ 26.0-android failureaccess - 1.0 + 1.0.1 Guava InternalFutureFailureAccess and InternalFutures Contains @@ -28,6 +28,27 @@ org.codehaus.mojo animal-sniffer-maven-plugin + + true + org.apache.felix + maven-bundle-plugin + 2.5.0 + + + bundle-manifest + process-classes + + manifest + + + + + + com.google.common.util.concurrent.internal + https://github.com/google/guava/ + + + maven-javadoc-plugin diff --git a/guava/pom.xml b/guava/pom.xml index 9cda951d1f88..0f1cbc29e7f7 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -78,8 +78,13 @@ - !com.google.common.base.internal,com.google.common.* + + !com.google.common.base.internal, + !com.google.common.util.concurrent.internal, + com.google.common.* + + com.google.common.util.concurrent.internal, javax.annotation;resolution:=optional, javax.crypto.*;resolution:=optional, sun.misc.*;resolution:=optional