Skip to content

Commit

Permalink
Fix Guava shading in jdbc module (#399)
Browse files Browse the repository at this point in the history
* Fix Guava shading in jdbc module

* fix shading tests
  • Loading branch information
bsideup committed Jul 10, 2017
1 parent 8707770 commit 22339fc
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.

## UNRELEASED
### Fixed
- Fixed Guava shading in `jdbc` module

### Changed

Expand Down
12 changes: 12 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
<name>TestContainers Core</name>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>

<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
Expand Down
47 changes: 46 additions & 1 deletion modules/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,53 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>org.testcontainers.shaded.com.google</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<includes>
<include>com.google.guava:*</include>
</includes>
</artifactSet>
<promoteTransitiveDependencies>false</promoteTransitiveDependencies>
<shadedArtifactAttached>false</shadedArtifactAttached>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/NOTICE</exclude>
<exclude>META-INF/LICENSE</exclude>
<exclude>META-INF/DEPENDENCIES</exclude>
<exclude>META-INF/maven/</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>

</project>
12 changes: 0 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@
</developers>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>

<!-- Project lombok for additional safety/convenience support -->
<dependency>
<groupId>org.projectlombok</groupId>
Expand All @@ -83,12 +77,6 @@
<scope>provided</scope>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
9 changes: 9 additions & 0 deletions shade-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,13 @@
<module>service-lookup-dropwizard</module>
<module>jar-file</module>
</modules>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 22339fc

Please sign in to comment.