|
34 | 34 | <properties> |
35 | 35 | <fs.oss.sdk.version>3.17.4</fs.oss.sdk.version> |
36 | 36 | <jindodata.version>6.9.1</jindodata.version> |
| 37 | + <oss.plugin.directory>paimon-plugin-jindo-oss</oss.plugin.directory> |
37 | 38 | </properties> |
38 | 39 |
|
39 | 40 | <repositories> |
|
55 | 56 | <groupId>org.apache.paimon</groupId> |
56 | 57 | <artifactId>paimon-oss-impl</artifactId> |
57 | 58 | <version>${project.version}</version> |
| 59 | + <exclusions> |
| 60 | + <exclusion> |
| 61 | + <groupId>*</groupId> |
| 62 | + <artifactId>*</artifactId> |
| 63 | + </exclusion> |
| 64 | + </exclusions> |
58 | 65 | </dependency> |
59 | 66 |
|
60 | 67 | <dependency> |
|
160 | 167 | <groupId>org.apache.maven.plugins</groupId> |
161 | 168 | <artifactId>maven-jar-plugin</artifactId> |
162 | 169 | <configuration> |
| 170 | + <excludes> |
| 171 | + <exclude>org/apache/paimon/jindo/JindoBlobPresigner*.class</exclude> |
| 172 | + </excludes> |
163 | 173 | <archive> |
164 | 174 | <manifestEntries> |
165 | 175 | <Multi-Release>true</Multi-Release> |
|
168 | 178 | </configuration> |
169 | 179 | </plugin> |
170 | 180 |
|
| 181 | + <plugin> |
| 182 | + <groupId>org.apache.maven.plugins</groupId> |
| 183 | + <artifactId>maven-resources-plugin</artifactId> |
| 184 | + <executions> |
| 185 | + <execution> |
| 186 | + <id>copy-oss-presigner-implementation</id> |
| 187 | + <phase>prepare-package</phase> |
| 188 | + <goals> |
| 189 | + <goal>copy-resources</goal> |
| 190 | + </goals> |
| 191 | + <configuration> |
| 192 | + <outputDirectory>${project.build.outputDirectory}/${oss.plugin.directory}</outputDirectory> |
| 193 | + <resources> |
| 194 | + <resource> |
| 195 | + <directory>${project.build.outputDirectory}</directory> |
| 196 | + <includes> |
| 197 | + <include>org/apache/paimon/jindo/JindoBlobPresigner*.class</include> |
| 198 | + </includes> |
| 199 | + </resource> |
| 200 | + </resources> |
| 201 | + </configuration> |
| 202 | + </execution> |
| 203 | + </executions> |
| 204 | + </plugin> |
| 205 | + |
| 206 | + <plugin> |
| 207 | + <groupId>org.apache.maven.plugins</groupId> |
| 208 | + <artifactId>maven-dependency-plugin</artifactId> |
| 209 | + <executions> |
| 210 | + <execution> |
| 211 | + <id>unpack-oss-runtime</id> |
| 212 | + <phase>prepare-package</phase> |
| 213 | + <goals> |
| 214 | + <goal>unpack-dependencies</goal> |
| 215 | + </goals> |
| 216 | + <configuration> |
| 217 | + <includeScope>runtime</includeScope> |
| 218 | + <excludeArtifactIds>paimon-oss-impl,slf4j-api,jsr305</excludeArtifactIds> |
| 219 | + <outputDirectory>${project.build.outputDirectory}/${oss.plugin.directory}</outputDirectory> |
| 220 | + <excludes>META-INF/*.SF,META-INF/*.DSA,META-INF/*.RSA,META-INF/maven/**</excludes> |
| 221 | + </configuration> |
| 222 | + </execution> |
| 223 | + <execution> |
| 224 | + <id>unpack-oss-presigner</id> |
| 225 | + <phase>prepare-package</phase> |
| 226 | + <goals> |
| 227 | + <goal>unpack</goal> |
| 228 | + </goals> |
| 229 | + <configuration> |
| 230 | + <artifactItems> |
| 231 | + <artifactItem> |
| 232 | + <groupId>org.apache.paimon</groupId> |
| 233 | + <artifactId>paimon-oss-impl</artifactId> |
| 234 | + <version>${project.version}</version> |
| 235 | + <overWrite>true</overWrite> |
| 236 | + <outputDirectory>${project.build.outputDirectory}/${oss.plugin.directory}</outputDirectory> |
| 237 | + <includes>org/apache/paimon/oss/OSSBlobPresigner*.class</includes> |
| 238 | + </artifactItem> |
| 239 | + </artifactItems> |
| 240 | + </configuration> |
| 241 | + </execution> |
| 242 | + </executions> |
| 243 | + </plugin> |
| 244 | + |
| 245 | + <plugin> |
| 246 | + <groupId>org.apache.maven.plugins</groupId> |
| 247 | + <artifactId>maven-surefire-plugin</artifactId> |
| 248 | + <executions> |
| 249 | + <execution> |
| 250 | + <id>integration-tests</id> |
| 251 | + <configuration> |
| 252 | + <systemPropertyVariables> |
| 253 | + <jindo.plugin.jar>${project.build.directory}/${project.build.finalName}.jar</jindo.plugin.jar> |
| 254 | + </systemPropertyVariables> |
| 255 | + </configuration> |
| 256 | + </execution> |
| 257 | + </executions> |
| 258 | + </plugin> |
| 259 | + |
171 | 260 | <plugin> |
172 | 261 | <groupId>org.apache.maven.plugins</groupId> |
173 | 262 | <artifactId>maven-shade-plugin</artifactId> |
174 | 263 | <configuration> |
175 | 264 | <artifactSet> |
176 | 265 | <includes combine.children="append"> |
177 | | - <include>org.apache.paimon:paimon-oss-impl</include> |
178 | | - <include>com.aliyun.oss:aliyun-sdk-oss</include> |
179 | | - <include>com.aliyun:*</include> |
180 | | - <include>com.google.code.gson:gson</include> |
181 | | - <include>commons-codec:commons-codec</include> |
182 | | - <include>commons-logging:commons-logging</include> |
183 | | - <include>io.opentracing:*</include> |
184 | | - <include>org.apache.httpcomponents:*</include> |
185 | | - <include>org.codehaus.jettison:jettison</include> |
186 | | - <include>org.ini4j:ini4j</include> |
187 | | - <include>org.jdom:jdom2</include> |
188 | | - <include>stax:stax-api</include> |
| 266 | + <include>*:*</include> |
189 | 267 | </includes> |
| 268 | + <excludes> |
| 269 | + <exclude>org.slf4j:slf4j-api</exclude> |
| 270 | + <exclude>com.google.code.findbugs:jsr305</exclude> |
| 271 | + </excludes> |
190 | 272 | </artifactSet> |
191 | 273 | <filters> |
192 | 274 | <filter> |
193 | | - <artifact>org.apache.paimon:paimon-oss-impl</artifact> |
| 275 | + <artifact>*:*</artifact> |
194 | 276 | <includes> |
195 | | - <include>org/apache/paimon/oss/OSSBlobPresigner.class</include> |
196 | | - <include>META-INF/versions/11/**</include> |
| 277 | + <include>org/apache/paimon/jindo/**</include> |
| 278 | + <include>${oss.plugin.directory}/**</include> |
| 279 | + <include>META-INF/MANIFEST.MF</include> |
| 280 | + <include>META-INF/LICENSE*</include> |
| 281 | + <include>META-INF/licenses/LICENSE.jdom</include> |
| 282 | + <include>META-INF/licenses/LICENSE.jaxb</include> |
| 283 | + <include>META-INF/NOTICE*</include> |
| 284 | + <include>META-INF/DEPENDENCIES</include> |
| 285 | + <include>META-INF/maven/**</include> |
| 286 | + <include>META-INF/services/org.apache.paimon.fs.FileIOLoader</include> |
| 287 | + <include>META-INF/versions/11/javax/xml/bind/**</include> |
197 | 288 | </includes> |
198 | 289 | </filter> |
| 290 | + <filter> |
| 291 | + <artifact>org.apache.paimon:paimon-oss-impl</artifact> |
| 292 | + <excludes> |
| 293 | + <exclude>META-INF/NOTICE*</exclude> |
| 294 | + </excludes> |
| 295 | + </filter> |
199 | 296 | </filters> |
200 | 297 | </configuration> |
201 | 298 | </plugin> |
|
0 commit comments