-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathpom.xml
More file actions
270 lines (261 loc) · 12.3 KB
/
pom.xml
File metadata and controls
270 lines (261 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012-2017, Joyent, Inc. All rights reserved.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>java-manta</artifactId>
<groupId>com.joyent.manta</groupId>
<version>3.5.1-SNAPSHOT</version>
</parent>
<artifactId>java-manta-client</artifactId>
<version>3.5.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>java-manta-client</name>
<description>Java Manta Client</description>
<dependencies>
<dependency>
<groupId>com.joyent.manta</groupId>
<artifactId>java-manta-client-unshaded</artifactId>
<version>3.5.1-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>${dependency.bouncycastle.version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>${dependency.bouncycastle.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.jnagmp</groupId>
<artifactId>bouncycastle-rsa</artifactId>
<version>${dependency.jnagmp.version}</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
</exclusion>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Logging bridge that will be shaded to bridge between the Apache
Commons Logging framework and SLF4J -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${dependency.slfj.version}</version>
<exclusions>
<exclusion>
<artifactId>org.slf4j</artifactId>
<groupId>slf4j-api</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<!-- force creation of the empty JAR so that the shade plugin doesn't work on an already shaded JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<forceCreation>true</forceCreation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<!-- minimizeJar would cause an empty JAR since there is no code in this module -->
<minimizeJar>false</minimizeJar>
<artifactSet>
<includes>
<include>com.joyent.manta:*</include>
<include>com.joyent.http-signature:*</include>
<include>org.apache.httpcomponents:*</include>
<include>org.apache.commons:commons-lang3</include>
<include>org.apache.commons:commons-collections4</include>
<include>commons-io:commons-io</include>
<include>commons-codec:commons-codec</include>
<include>com.fasterxml.uuid:java-uuid-generator</include>
<include>com.fasterxml.jackson.core:*</include>
<include>com.fasterxml.jackson.datatype:jackson-datatype-jsr310</include>
<include>com.joyent.util:fast-md5</include>
<include>org.slf4j:jcl-over-slf4j</include>
<include>io.mikael:urlbuilder</include>
<include>uk.com.robust-it:cloning</include>
<include>org.objenesis:objenesis</include>
</includes>
<excludes>
<exclude>com.google.code.findbugs:jsr305</exclude>
<exclude>junit:junit</exclude>
<exclude>org.slf4j:slf4j-api</exclude>
<exclude>org.bouncycastle:*</exclude>
<exclude>com.squareup.jnagmp:*</exclude>
<exclude>net.java.dev.jna:*</exclude>
<exclude>org.hamcrest:*</exclude>
<exclude>org.mockito:*</exclude>
<exclude>commons-logging:*</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.joyent.http</pattern>
<shadedPattern>com.joyent.manta.http</shadedPattern>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>com.joyent.manta.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache</pattern>
<shadedPattern>com.joyent.manta.org.apache</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml</pattern>
<shadedPattern>com.joyent.manta.com.fasterxml</shadedPattern>
</relocation>
<relocation>
<pattern>io.mikael.urlbuilder</pattern>
<shadedPattern>com.joyent.manta.io.mikael.urlbuilder</shadedPattern>
</relocation>
<relocation>
<pattern>org.objenesis</pattern>
<shadedPattern>com.joyent.manta.org.objenesis</shadedPattern>
</relocation>
<relocation>
<pattern>com.rits</pattern>
<shadedPattern>com.joyent.manta.com.rits</shadedPattern>
</relocation>
</relocations>
<filters>
<!-- explicitly remove class that causes security concerns -->
<filter>
<artifact>org.apache.commons:commons-collections4</artifact>
<excludes>
<exclude>org/apache/commons/collections4/functors/InvokerTransformer.class</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<!--
We need to add the default clean phase since we're specifying executions.
-->
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>src</directory>
<directory>target</directory>
</fileset>
</filesets>
</configuration>
</execution>
<!--
Ensure that src is *always*
removed before a compile phase runs. This is
for correctness.
-->
<execution>
<id>clean-client-shade-workaround-source-pre</id>
<phase>deploy</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>src</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${maven-build-helper-maven-plugin.version}</version>
<executions>
<execution>
<id>add-shade-source-workaround-src</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/shade-source-workaround</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-maven-resources-plugin.version}</version>
<executions>
<execution>
<id>copy-shade-source-workaround-src</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>src/shade-source-workaround</outputDirectory>
<resources>
<resource>
<directory>${multi.module.root}/java-manta-client-unshaded/src/main/java</directory>
</resource>
</resources>
</configuration>
</plugin>
<!--
For SOME reason Maven can build a sources JAR for this module based on the above workaround
*and still* deleting the source files during process-resources in order to avoid the shade plugin
detecting overlapping classes.
Maintainer beware! You might be tempted to add an invocation of the maven-source-plugin directly here
and bind it to a phase after the above two but before packaging (in order to avoid the overlapping
classes error) but this does not work. Relying on the parent-pom definition of maven-source-plugin is
unexpected but functional so that behavior is documented here.
-->
</plugins>
</build>
</project>