Skip to content

Commit 082ee8e

Browse files
cjmctaguekeith-turner
authored andcommitted
fixes #980 shaded libthrift into core jar (#995)
1 parent df46a3f commit 082ee8e

File tree

1 file changed

+40
-13
lines changed

1 file changed

+40
-13
lines changed

modules/core/pom.xml

+40-13
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@
7373
<groupId>org.apache.hadoop</groupId>
7474
<artifactId>hadoop-client</artifactId>
7575
</dependency>
76+
<dependency>
77+
<groupId>org.apache.thrift</groupId>
78+
<artifactId>libthrift</artifactId>
79+
<optional>true</optional>
80+
</dependency>
7681
<dependency>
7782
<groupId>org.apache.zookeeper</groupId>
7883
<artifactId>zookeeper</artifactId>
@@ -85,19 +90,6 @@
8590
<groupId>org.slf4j</groupId>
8691
<artifactId>slf4j-api</artifactId>
8792
</dependency>
88-
<dependency>
89-
<groupId>org.apache.thrift</groupId>
90-
<artifactId>libthrift</artifactId>
91-
<!--
92-
Ensure that this does not get included in the set of transitive
93-
dependencies coming from fluo-core; the specific version of
94-
libthrift required for a particular Fluo application at runtime must
95-
also be compatible with the libthrift version required by the
96-
Accumulo client code, and should be brought in transitively from the
97-
Accumulo dependencies.
98-
-->
99-
<scope>provided</scope>
100-
</dependency>
10193
<dependency>
10294
<groupId>junit</groupId>
10395
<artifactId>junit</artifactId>
@@ -141,6 +133,41 @@
141133
</execution>
142134
</executions>
143135
</plugin>
136+
<plugin>
137+
<groupId>org.apache.maven.plugins</groupId>
138+
<artifactId>maven-shade-plugin</artifactId>
139+
<executions>
140+
<execution>
141+
<goals>
142+
<goal>shade</goal>
143+
</goals>
144+
<phase>package</phase>
145+
<configuration>
146+
<relocations>
147+
<relocation>
148+
<pattern>org.apache.thrift</pattern>
149+
<shadedPattern>org.apache.fluo.core.shaded.thrift</shadedPattern>
150+
</relocation>
151+
</relocations>
152+
<artifactSet>
153+
<includes>
154+
<include>org.apache.thrift:*</include>
155+
</includes>
156+
</artifactSet>
157+
<include>org.apache.fluo.core.*</include>
158+
<transformers>
159+
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
160+
<resources>
161+
<resource>LICENSE.txt</resource>
162+
<resource>NOTICE.txt</resource>
163+
</resources>
164+
</transformer>
165+
</transformers>
166+
<createDependencyReducedPom>false</createDependencyReducedPom>
167+
</configuration>
168+
</execution>
169+
</executions>
170+
</plugin>
144171
</plugins>
145172
</build>
146173
</project>

0 commit comments

Comments
 (0)