aboutsummaryrefslogtreecommitdiff
path: root/core/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'core/pom.xml')
-rw-r--r--core/pom.xml35
1 files changed, 35 insertions, 0 deletions
diff --git a/core/pom.xml b/core/pom.xml
index 6d8be37037..83c708dfc9 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -68,9 +68,15 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
+ <!--
+ Promote Guava to "compile" so that maven-shade-plugin picks it up (for packaging the Optional
+ class exposed in the Java API). The plugin will then remove this dependency from the published
+ pom, so that Guava does not pollute the client's compilation classpath.
+ -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -322,6 +328,35 @@
</arguments>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <shadedArtifactAttached>false</shadedArtifactAttached>
+ <artifactSet>
+ <includes>
+ <include>com.google.guava:guava</include>
+ </includes>
+ </artifactSet>
+ <filters>
+ <!-- See comment in the guava dependency declaration above. -->
+ <filter>
+ <artifact>com.google.guava:guava</artifact>
+ <includes>
+ <include>com/google/common/base/Optional*</include>
+ </includes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
<resources>