|
| 1 | +<?xml version="1.0"?> |
| 2 | +<!-- |
| 3 | +
|
| 4 | + Licensed to the Apache Software Foundation (ASF) under one |
| 5 | + or more contributor license agreements. See the NOTICE file |
| 6 | + distributed with this work for additional information |
| 7 | + regarding copyright ownership. The ASF licenses this file |
| 8 | + to you under the Apache License, Version 2.0 (the |
| 9 | + "License"); you may not use this file except in compliance |
| 10 | + with the License. You may obtain a copy of the License at |
| 11 | +
|
| 12 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | +
|
| 14 | + Unless required by applicable law or agreed to in writing, |
| 15 | + software distributed under the License is distributed on an |
| 16 | + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 17 | + KIND, either express or implied. See the License for the |
| 18 | + specific language governing permissions and limitations |
| 19 | + under the License. |
| 20 | +
|
| 21 | +--> |
| 22 | +<project |
| 23 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" |
| 24 | + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| 25 | + <modelVersion>4.0.0</modelVersion> |
| 26 | + <parent> |
| 27 | + <groupId>com.datastax.oss</groupId> |
| 28 | + <artifactId>pulsar</artifactId> |
| 29 | + <version>3.1.4.3-SNAPSHOT</version> |
| 30 | + </parent> |
| 31 | + |
| 32 | + <artifactId>jetcd-core-shaded</artifactId> |
| 33 | + <name>Apache Pulsar :: jetcd-core shaded</name> |
| 34 | + |
| 35 | + <dependencies> |
| 36 | + <dependency> |
| 37 | + <groupId>io.etcd</groupId> |
| 38 | + <artifactId>jetcd-core</artifactId> |
| 39 | + <exclusions> |
| 40 | + <exclusion> |
| 41 | + <groupId>io.grpc</groupId> |
| 42 | + <artifactId>grpc-netty</artifactId> |
| 43 | + </exclusion> |
| 44 | + <exclusion> |
| 45 | + <groupId>io.netty</groupId> |
| 46 | + <artifactId>*</artifactId> |
| 47 | + </exclusion> |
| 48 | + </exclusions> |
| 49 | + </dependency> |
| 50 | + <dependency> |
| 51 | + <groupId>io.grpc</groupId> |
| 52 | + <artifactId>grpc-netty-shaded</artifactId> |
| 53 | + </dependency> |
| 54 | + <!-- add transient dependencies for jetcd libraries, this is necessary for IntelliJ support --> |
| 55 | + <dependency> |
| 56 | + <groupId>dev.failsafe</groupId> |
| 57 | + <artifactId>failsafe</artifactId> |
| 58 | + </dependency> |
| 59 | + <dependency> |
| 60 | + <groupId>io.grpc</groupId> |
| 61 | + <artifactId>grpc-protobuf</artifactId> |
| 62 | + </dependency> |
| 63 | + <dependency> |
| 64 | + <groupId>io.grpc</groupId> |
| 65 | + <artifactId>grpc-stub</artifactId> |
| 66 | + </dependency> |
| 67 | + <dependency> |
| 68 | + <groupId>io.grpc</groupId> |
| 69 | + <artifactId>grpc-grpclb</artifactId> |
| 70 | + </dependency> |
| 71 | + <dependency> |
| 72 | + <groupId>io.grpc</groupId> |
| 73 | + <artifactId>grpc-util</artifactId> |
| 74 | + </dependency> |
| 75 | + </dependencies> |
| 76 | + <build> |
| 77 | + <plugins> |
| 78 | + <plugin> |
| 79 | + <groupId>org.apache.maven.plugins</groupId> |
| 80 | + <artifactId>maven-shade-plugin</artifactId> |
| 81 | + <executions> |
| 82 | + <execution> |
| 83 | + <phase>package</phase> |
| 84 | + <goals> |
| 85 | + <goal>shade</goal> |
| 86 | + </goals> |
| 87 | + <configuration> |
| 88 | + <createDependencyReducedPom>true</createDependencyReducedPom> |
| 89 | + <promoteTransitiveDependencies>true</promoteTransitiveDependencies> |
| 90 | + <minimizeJar>false</minimizeJar> |
| 91 | + <artifactSet> |
| 92 | + <includes> |
| 93 | + <include>io.etcd:*</include> |
| 94 | + <include>io.vertx:*</include> |
| 95 | + </includes> |
| 96 | + </artifactSet> |
| 97 | + <relocations> |
| 98 | + <!-- relocate vertx packages since they will be transformed to use grpc-netty-shaded packages --> |
| 99 | + <relocation> |
| 100 | + <pattern>io.vertx</pattern> |
| 101 | + <shadedPattern>org.apache.pulsar.jetcd.shaded.io.vertx</shadedPattern> |
| 102 | + </relocation> |
| 103 | + <!-- relocate to use grpc-netty-shaded packages --> |
| 104 | + <relocation> |
| 105 | + <pattern>io.grpc.netty</pattern> |
| 106 | + <shadedPattern>io.grpc.netty.shaded.io.grpc.netty</shadedPattern> |
| 107 | + </relocation> |
| 108 | + <!-- relocate to use grpc-netty-shaded packages --> |
| 109 | + <relocation> |
| 110 | + <pattern>io.netty</pattern> |
| 111 | + <shadedPattern>io.grpc.netty.shaded.io.netty</shadedPattern> |
| 112 | + </relocation> |
| 113 | + </relocations> |
| 114 | + <filters> |
| 115 | + <filter> |
| 116 | + <artifact>*:*</artifact> |
| 117 | + <excludes> |
| 118 | + <exclude>META-INF/*.SF</exclude> |
| 119 | + <exclude>META-INF/*.DSA</exclude> |
| 120 | + <exclude>META-INF/*.RSA</exclude> |
| 121 | + <exclude>META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml</exclude> |
| 122 | + </excludes> |
| 123 | + </filter> |
| 124 | + </filters> |
| 125 | + <transformers> |
| 126 | + <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 127 | + <transformer implementation="org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer"/> |
| 128 | + <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer"> |
| 129 | + <resource>META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml</resource> |
| 130 | + <file>${project.basedir}/dependency-reduced-pom.xml</file> |
| 131 | + </transformer> |
| 132 | + </transformers> |
| 133 | + <!-- required for IntelliJ support --> |
| 134 | + <shadedArtifactAttached>true</shadedArtifactAttached> |
| 135 | + <shadedClassifierName>shaded</shadedClassifierName> |
| 136 | + </configuration> |
| 137 | + </execution> |
| 138 | + </executions> |
| 139 | + </plugin> |
| 140 | + <!-- required for IntelliJ support, for some reason shadedArtifactAttached isn't sufficient alone --> |
| 141 | + <plugin> |
| 142 | + <groupId>org.codehaus.mojo</groupId> |
| 143 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 144 | + <executions> |
| 145 | + <execution> |
| 146 | + <id>attach-shaded-jar</id> |
| 147 | + <phase>package</phase> |
| 148 | + <goals> |
| 149 | + <goal>attach-artifact</goal> |
| 150 | + </goals> |
| 151 | + <configuration> |
| 152 | + <artifacts> |
| 153 | + <artifact> |
| 154 | + <file>${project.build.directory}/${project.artifactId}-${project.version}-shaded.jar</file> |
| 155 | + <type>jar</type> |
| 156 | + <classifier>shaded</classifier> |
| 157 | + </artifact> |
| 158 | + </artifacts> |
| 159 | + </configuration> |
| 160 | + </execution> |
| 161 | + </executions> |
| 162 | + </plugin> |
| 163 | + <!-- required for running tests in subproject --> |
| 164 | + <plugin> |
| 165 | + <groupId>org.apache.maven.plugins</groupId> |
| 166 | + <artifactId>maven-antrun-plugin</artifactId> |
| 167 | + <version>${maven-antrun-plugin.version}</version> |
| 168 | + <executions> |
| 169 | + <execution> |
| 170 | + <id>unpack-shaded-jar</id> |
| 171 | + <phase>package</phase> |
| 172 | + <goals> |
| 173 | + <goal>run</goal> |
| 174 | + </goals> |
| 175 | + <configuration> |
| 176 | + <target> |
| 177 | + <unzip src="${project.build.directory}/${project.artifactId}-${project.version}-shaded.jar" |
| 178 | + dest="${project.build.outputDirectory}" |
| 179 | + overwrite="true" /> |
| 180 | + </target> |
| 181 | + </configuration> |
| 182 | + </execution> |
| 183 | + </executions> |
| 184 | + </plugin> |
| 185 | + </plugins> |
| 186 | + </build> |
| 187 | +</project> |
0 commit comments