-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathpom.xml
215 lines (211 loc) · 8.92 KB
/
pom.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<!--
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ON MVN COMPILE NOT WORKING
If you wondering why 'mvn compile' does not work building HBase
(in particular, if you are doing it for the first time), instead do
'mvn package'. If you are interested in the full story, see
https://issues.apache.org/jira/browse/HBASE-6795.
-->
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>hbase-thirdparty</artifactId>
<version>${revision}</version>
<relativePath>..</relativePath>
</parent>
<artifactId>hbase-shaded-jersey</artifactId>
<name>Apache HBase Relocated (Shaded) Jersey Libs</name>
<description>
Pulls down Jersey, relocates it and makes a far jar.
</description>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>dependency-reduced-pom.xml</include>
</includes>
</fileset>
</filesets>
</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>
<shadeSourcesContent>true</shadeSourcesContent>
<createSourcesJar>true</createSourcesJar>
<relocations>
<relocation>
<pattern>javax.ws.rs</pattern>
<shadedPattern>${rename.offset}.javax.ws.rs</shadedPattern>
</relocation>
<relocation>
<pattern>org.glassfish</pattern>
<shadedPattern>${rename.offset}.org.glassfish</shadedPattern>
</relocation>
<relocation>
<pattern>jersey</pattern>
<shadedPattern>${rename.offset}.jersey</shadedPattern>
</relocation>
<relocation>
<pattern>com.sun.research</pattern>
<shadedPattern>${rename.offset}.com.sun.research</shadedPattern>
</relocation>
<relocation>
<pattern>org.aopalliance</pattern>
<shadedPattern>${rename.offset}.org.aopalliance</shadedPattern>
</relocation>
<relocation>
<pattern>org.jvnet.hk2</pattern>
<shadedPattern>${rename.offset}.org.jvnet.hk2</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>
<!--
Anything added here needs to be excluded from the jar that pulls it in
also else we give an odd signal in the META-INF/DEPENDENCIES that we
produce. See below for how to exclusion of transitive dependencies.
-->
<exclude>jakarta.annotation:jakarta.annotation-api</exclude>
<exclude>jakarta.validation:jakarta.validation-api</exclude>
<exclude>org.glassfish.hk2.external:jakarta.inject</exclude>
<exclude>org.javassist:javassist</exclude>
<!-- On the "next" build, exclude a lingering shaded jar if it exists (user did not `clean`).
Maven will happily pick up the previous shaded jar and try to include that in the N+1th build
if we don't exclude it. This will result in a failure in the ServicesResourceTransformer claiming
that we've already packaged a services file once. -->
<exclude>org.apache.hbase.thirdparty:hbase-shaded-jersey</exclude>
</excludes>
</artifactSet>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
<addHeader>false</addHeader>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!--
There are some classes under META-INF in jersey-common jar, for supporting multiple jdks,
we should also relocate them.
-->
<execution>
<id>relocate-jersey-jdk11-support</id>
<phase>package</phase>
<configuration>
<target>
<echo message="unjar" />
<unzip src="${project.build.directory}/${project.artifactId}-${project.version}.jar" dest="${project.build.directory}/unpacked/" />
<echo message="Rename jersey versions in META-INF" />
<mkdir dir="${project.build.directory}/unpacked/META-INF/versions/11/${rename.offset.dir}" />
<move todir="${project.build.directory}/unpacked/META-INF/versions/11/${rename.offset.dir}">
<fileset dir="${project.build.directory}/unpacked/META-INF/versions/11" />
</move>
<echo message="Redo jar" />
<jar destfile="${project.build.directory}/${project.artifactId}-${project.version}.jar" basedir="${project.build.directory}/unpacked" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>${jakarta.ws.rs-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta.annotation-api.version}</version>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>${jakarta.validation-api.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>jakarta.inject</artifactId>
<version>${jakarta.inject.version}</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
</dependency>
</dependencies>
</project>