Skip to content

Commit 4d4a676

Browse files
committed
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 google#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
1 parent a35bfd9 commit 4d4a676

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

android/guava/pom.xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,13 @@
7878
</executions>
7979
<configuration>
8080
<instructions>
81-
<Export-Package>!com.google.common.base.internal,com.google.common.*</Export-Package>
81+
<Export-Package>
82+
!com.google.common.base.internal,
83+
!com.google.common.util.concurrent.internal,
84+
com.google.common.*
85+
</Export-Package>
8286
<Import-Package>
87+
com.google.common.util.concurrent.internal,
8388
javax.annotation;resolution:=optional,
8489
javax.crypto.*;resolution:=optional,
8590
sun.misc.*;resolution:=optional

futures/failureaccess/pom.xml

+22-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<version>26.0-android</version>
99
</parent>
1010
<artifactId>failureaccess</artifactId>
11-
<version>1.0</version>
11+
<version>1.0.1</version>
1212
<name>Guava InternalFutureFailureAccess and InternalFutures</name>
1313
<description>
1414
Contains
@@ -28,6 +28,27 @@
2828
<groupId>org.codehaus.mojo</groupId>
2929
<artifactId>animal-sniffer-maven-plugin</artifactId>
3030
</plugin>
31+
<plugin>
32+
<extensions>true</extensions>
33+
<groupId>org.apache.felix</groupId>
34+
<artifactId>maven-bundle-plugin</artifactId>
35+
<version>2.5.0</version>
36+
<executions>
37+
<execution>
38+
<id>bundle-manifest</id>
39+
<phase>process-classes</phase>
40+
<goals>
41+
<goal>manifest</goal>
42+
</goals>
43+
</execution>
44+
</executions>
45+
<configuration>
46+
<instructions>
47+
<Export-Package>com.google.common.util.concurrent.internal</Export-Package>
48+
<Bundle-DocURL>https://github.com/google/guava/</Bundle-DocURL>
49+
</instructions>
50+
</configuration>
51+
</plugin>
3152
<plugin>
3253
<artifactId>maven-javadoc-plugin</artifactId>
3354
<executions>

guava/pom.xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,13 @@
7878
</executions>
7979
<configuration>
8080
<instructions>
81-
<Export-Package>!com.google.common.base.internal,com.google.common.*</Export-Package>
81+
<Export-Package>
82+
!com.google.common.base.internal,
83+
!com.google.common.util.concurrent.internal,
84+
com.google.common.*
85+
</Export-Package>
8286
<Import-Package>
87+
com.google.common.util.concurrent.internal,
8388
javax.annotation;resolution:=optional,
8489
javax.crypto.*;resolution:=optional,
8590
sun.misc.*;resolution:=optional

0 commit comments

Comments
 (0)