This is an automated email from the ASF dual-hosted git repository. stoty pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/master by this push: new a90b87deec PHOENIX-7137 Create phoenix-client-lite shaded JAR without server-side dependencies a90b87deec is described below commit a90b87deec6a70078f5fdc9b8c564913b170dfc3 Author: Istvan Toth <st...@apache.org> AuthorDate: Mon Dec 4 14:13:23 2023 +0100 PHOENIX-7137 Create phoenix-client-lite shaded JAR without server-side dependencies --- phoenix-assembly/pom.xml | 25 ++++ .../src/build/components/all-common-jars.xml | 8 ++ phoenix-client-parent/phoenix-client-lite/pom.xml | 135 +++++++++++++++++++++ pom.xml | 21 ++++ 4 files changed, 189 insertions(+) diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml index 52d337618f..7f929c118c 100644 --- a/phoenix-assembly/pom.xml +++ b/phoenix-assembly/pom.xml @@ -63,6 +63,27 @@ </arguments> </configuration> </execution> + <execution> + <id>lite client without version</id> + <phase>compile</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>ln</executable> + <workingDirectory>${project.basedir}/../phoenix-client-parent/phoenix-client-lite/target</workingDirectory> + <arguments> + <argument>-fnsv</argument> + <argument> + phoenix-client-lite-${hbase.suffix}-${project.version}.jar + </argument> + <argument> + <!-- We are overwriting the unshaded client JAR, but we don't care --> + phoenix-client-lite-${hbase.suffix}.jar + </argument> + </arguments> + </configuration> + </execution> <execution> <id>server without version</id> <phase>compile</phase> @@ -153,6 +174,10 @@ <groupId>org.apache.phoenix</groupId> <artifactId>phoenix-client-embedded-${hbase.suffix}</artifactId> </dependency> + <dependency> + <groupId>org.apache.phoenix</groupId> + <artifactId>phoenix-client-lite-${hbase.suffix}</artifactId> + </dependency> <dependency> <groupId>org.apache.phoenix</groupId> <artifactId>phoenix-pherf</artifactId> diff --git a/phoenix-assembly/src/build/components/all-common-jars.xml b/phoenix-assembly/src/build/components/all-common-jars.xml index 1a6abd3193..c51ff9c98e 100644 --- a/phoenix-assembly/src/build/components/all-common-jars.xml +++ b/phoenix-assembly/src/build/components/all-common-jars.xml @@ -31,6 +31,14 @@ <include>phoenix-client-embedded-${hbase.suffix}.jar</include> </includes> </fileSet> + <fileSet> + <directory>${project.basedir}/../phoenix-client-parent/phoenix-client-lite/target</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>phoenix-client-lite-${hbase.suffix}-${project.version}.jar</include> + <include>phoenix-client-lite-${hbase.suffix}.jar</include> + </includes> + </fileSet> <fileSet> <directory>${project.basedir}/../phoenix-server/target</directory> <outputDirectory>/</outputDirectory> diff --git a/phoenix-client-parent/phoenix-client-lite/pom.xml b/phoenix-client-parent/phoenix-client-lite/pom.xml new file mode 100644 index 0000000000..8ca940eb37 --- /dev/null +++ b/phoenix-client-parent/phoenix-client-lite/pom.xml @@ -0,0 +1,135 @@ +<?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.phoenix</groupId> + <artifactId>phoenix-client-parent</artifactId> + <version>5.2.0-SNAPSHOT</version> + </parent> + + <artifactId>phoenix-client-lite-${hbase.suffix}</artifactId> + <name>Phoenix Client Lite</name> + <description>Phoenix Client without server-side code and dependencies</description> + <packaging>jar</packaging> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <executions> + <execution> + <id>lite-shaded</id> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + <configuration> + <promoteTransitiveDependencies>true</promoteTransitiveDependencies> + <shadeTestJar>false</shadeTestJar> + <createSourcesJar>true</createSourcesJar> + <dependencyReducedPomLocation>${basedir}/target/pom.xml</dependencyReducedPomLocation> + <artifactSet> + <includes> + <include>*:*</include> + </includes> + <excludes> + <exclude>org.apache.phoenix:phoenix-client</exclude> + <exclude>xom:xom</exclude> + </excludes> + </artifactSet> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <dependencies> + <!-- These must not be moved to phoenix-client-parent, see PHOENIX-6377 --> + <!-- Depend on all other internal projects --> + <dependency> + <groupId>org.apache.phoenix</groupId> + <artifactId>phoenix-core-client</artifactId> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-reload4j</artifactId> + </exclusion> + <exclusion> + <groupId>ch.qos.reload4j</groupId> + <artifactId>reload4j</artifactId> + </exclusion> + <!-- These are coming from transitive dependencies --> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.phoenix</groupId> + <artifactId>phoenix-hbase-compat-${hbase.compat.version}</artifactId> + <optional>false</optional> + </dependency> + <!-- Exclude servlet and Jetty. We don't need it, and it causes problems with minicluster --> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-server</artifactId> + <scope>provided</scope> + <version>${jetty.version}</version> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <scope>provided</scope> + <version>${jetty.version}</version> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util-ajax</artifactId> + <scope>provided</scope> + <version>${jetty.version}</version> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlet</artifactId> + <scope>provided</scope> + <version>${jetty.version}</version> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-webapp</artifactId> + <scope>provided</scope> + <version>${jetty.version}</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + <scope>provided</scope> + <version>${javax.servlet-api.version}</version> + </dependency> + </dependencies> +</project> diff --git a/pom.xml b/pom.xml index 635a551023..c57df453f0 100644 --- a/pom.xml +++ b/pom.xml @@ -709,6 +709,26 @@ <artifactId>phoenix-client-embedded-hbase-2.5</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.phoenix</groupId> + <artifactId>phoenix-client-lite-hbase-2.4.0</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.phoenix</groupId> + <artifactId>phoenix-client-lite-hbase-2.4</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.phoenix</groupId> + <artifactId>phoenix-client-lite-hbase-2.5.0</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.phoenix</groupId> + <artifactId>phoenix-client-lite-hbase-2.5</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.apache.phoenix</groupId> <artifactId>phoenix-server-hbase-2.4.0</artifactId> @@ -1572,6 +1592,7 @@ <modules> <module>phoenix-client-parent</module> <module>phoenix-client-parent/phoenix-client-embedded</module> + <module>phoenix-client-parent/phoenix-client-lite</module> <module>phoenix-server</module> <module>phoenix-assembly</module> </modules>