Skip to content

Commit

Permalink
Fix the issue with classes that should only be included in the failur…
Browse files Browse the repository at this point in the history
…eaccess artifact being included in the main Guava jar.

It appears (thanks to @michaelhixson on #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
  • Loading branch information
cgdecker committed Nov 19, 2018
1 parent a35bfd9 commit 4d4a676
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
7 changes: 6 additions & 1 deletion android/guava/pom.xml
Expand Up @@ -78,8 +78,13 @@
</executions>
<configuration>
<instructions>
<Export-Package>!com.google.common.base.internal,com.google.common.*</Export-Package>
<Export-Package>
!com.google.common.base.internal,
!com.google.common.util.concurrent.internal,
com.google.common.*
</Export-Package>
<Import-Package>
com.google.common.util.concurrent.internal,
javax.annotation;resolution:=optional,
javax.crypto.*;resolution:=optional,
sun.misc.*;resolution:=optional
Expand Down
23 changes: 22 additions & 1 deletion futures/failureaccess/pom.xml
Expand Up @@ -8,7 +8,7 @@
<version>26.0-android</version>
</parent>
<artifactId>failureaccess</artifactId>
<version>1.0</version>
<version>1.0.1</version>
<name>Guava InternalFutureFailureAccess and InternalFutures</name>
<description>
Contains
Expand All @@ -28,6 +28,27 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
</plugin>
<plugin>
<extensions>true</extensions>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.0</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Export-Package>com.google.common.util.concurrent.internal</Export-Package>
<Bundle-DocURL>https://github.com/google/guava/</Bundle-DocURL>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
Expand Down
7 changes: 6 additions & 1 deletion guava/pom.xml
Expand Up @@ -78,8 +78,13 @@
</executions>
<configuration>
<instructions>
<Export-Package>!com.google.common.base.internal,com.google.common.*</Export-Package>
<Export-Package>
!com.google.common.base.internal,
!com.google.common.util.concurrent.internal,
com.google.common.*
</Export-Package>
<Import-Package>
com.google.common.util.concurrent.internal,
javax.annotation;resolution:=optional,
javax.crypto.*;resolution:=optional,
sun.misc.*;resolution:=optional
Expand Down

0 comments on commit 4d4a676

Please sign in to comment.