You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by ji...@apache.org on 2024/06/11 03:46:47 UTC

(amoro-shade) 04/04: Add thrift shade

This is an automated email from the ASF dual-hosted git repository.

jinsongzhou pushed a commit to branch add-more-shades
in repository https://gitbox.apache.org/repos/asf/amoro-shade.git

commit 3d73a163848137298618da6707909044ebd491b0
Author: zhoujinsong <zh...@163.com>
AuthorDate: Tue Jun 11 11:40:59 2024 +0800

    Add thrift shade
---
 amoro-shade-thrift/pom.xml                         | 89 ++++++++++++++++++++++
 .../src/main/resources/META-INF/NOTICE             | 15 ++++
 pom.xml                                            |  2 +
 3 files changed, 106 insertions(+)

diff --git a/amoro-shade-thrift/pom.xml b/amoro-shade-thrift/pom.xml
new file mode 100644
index 0000000..04e5eb1
--- /dev/null
+++ b/amoro-shade-thrift/pom.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<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>
+        <groupId>org.apache.amoro</groupId>
+        <artifactId>amoro-shade</artifactId>
+        <version>0.7-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>amoro-shade-thrift</artifactId>
+    <name>amoro-shade-thrift</name>
+    <version>${thrift.version}-0.7-SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+            <version>${thrift.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>shade-amoro</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <createDependencyReducedPom>true</createDependencyReducedPom>
+                            <dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
+                            <artifactSet>
+                                <includes>
+                                    <include>*</include>
+                                </includes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>org.apache</pattern>
+                                    <shadedPattern>${shading.prefix}.thrift.org.apache</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>jakarta</pattern>
+                                    <shadedPattern>${shading.prefix}.thrift.jakarta</shadedPattern>
+                                </relocation>
+                            </relocations>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <!-- Used to resolve variables in the 'version' tag -->
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>flatten-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/amoro-shade-thrift/src/main/resources/META-INF/NOTICE b/amoro-shade-thrift/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..e12a16b
--- /dev/null
+++ b/amoro-shade-thrift/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,15 @@
+amoro-shade-thrift
+Copyright (C) 2006 - 2019, The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This project bundles the following dependencies under the Apache Software License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+- org.apache.httpcomponents.client5:httpclient5:5.2.1
+- org.apache.httpcomponents.core5:httpcore5:5.2
+- org.apache.commons:commons-lang3:3.12.0
+
+This project bundles the following dependencies under Eclipse Public License v. 2.0 (http://www.eclipse.org/legal/epl-2.0)
+- jakarta.servlet:jakarta.servlet-api:5.0.0
+- jakarta.annotation:jakarta.annotation-api:2.1.1
diff --git a/pom.xml b/pom.xml
index 71331d7..8b94363 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,7 @@ under the License.
         <module>amoro-shade-guava-32</module>
         <module>amoro-shade-jackson-parent</module>
         <module>amoro-shade-zookeeper-3</module>
+        <module>amoro-shade-thrift</module>
     </modules>
     <groupId>org.apache.amoro</groupId>
     <name>amoro-shade</name>
@@ -66,6 +67,7 @@ under the License.
     <properties>
         <shading.prefix>org.apache.amoro.shade</shading.prefix>
         <guava.version>32.1.1-jre</guava.version>
+        <thrift.version>0.20.0</thrift.version>
     </properties>
 
     <profiles>