Exclude Guava Maven data and javax sources from Guice JARs

Guice 4.0-beta leaked the maven metadata files for Guava when it was
repacked to a private namespace.  This confuses Buck when creating a
combined JAR that has both Guice and Guava.

Guice also leaked the source files for javax.annotation into its
binary JAR files. Buck sometimes finds and extracts these source
files at compile time, creating duplicate versions of the classes.

Change-Id: Iea0a3394530abd8b0853d016b7cb2f5182f82a96
This commit is contained in:
Shawn Pearce 2013-08-06 08:44:46 -07:00
parent bf083dd0ce
commit 3918177c6b
2 changed files with 36 additions and 1 deletions

View File

@ -4,6 +4,7 @@ java_library(
deps = [
'//lib:args4j',
'//lib:guava',
'//lib:jsr305',
'//lib/guice:guice',
'//lib/guice:guice-assistedinject',
],

View File

@ -23,7 +23,41 @@ maven_jar(
sha1 = 'a82be989679df08b66d48b42659a3ca2daaf1d5b',
license = 'Apache2.0',
deps = [':aopalliance'],
exclude = EXCLUDE,
exclude = EXCLUDE + [
'META-INF/maven/com.google.guava/guava/pom.properties',
'META-INF/maven/com.google.guava/guava/pom.xml',
'javax/annotation/CheckForNull.java',
'javax/annotation/CheckForSigned.java',
'javax/annotation/CheckReturnValue.java',
'javax/annotation/concurrent/GuardedBy.java',
'javax/annotation/concurrent/Immutable.java',
'javax/annotation/concurrent/NotThreadSafe.java',
'javax/annotation/concurrent/ThreadSafe.java',
'javax/annotation/Detainted.java',
'javax/annotation/MatchesPattern.java',
'javax/annotation/meta/Exclusive.java',
'javax/annotation/meta/Exhaustive.java',
'javax/annotation/meta/TypeQualifier.java',
'javax/annotation/meta/TypeQualifierDefault.java',
'javax/annotation/meta/TypeQualifierNickname.java',
'javax/annotation/meta/TypeQualifierValidator.java',
'javax/annotation/meta/When.java',
'javax/annotation/Nonnegative.java',
'javax/annotation/Nonnull.java',
'javax/annotation/Nullable.java',
'javax/annotation/OverridingMethodsMustInvokeSuper.java',
'javax/annotation/ParametersAreNonnullByDefault.java',
'javax/annotation/ParametersAreNullableByDefault.java',
'javax/annotation/PropertyKey.java',
'javax/annotation/RegEx.java',
'javax/annotation/Signed.java',
'javax/annotation/Syntax.java',
'javax/annotation/Tainted.java',
'javax/annotation/Untainted.java',
'javax/annotation/WillClose.java',
'javax/annotation/WillCloseWhenClosed.java',
'javax/annotation/WillNotClose.java',
],
visibility = [],
)