blob: 38bffe1d6140edf46d87cc8a790cf97985b7d698 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed 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. See accompanying LICENSE file.
-->
<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.ratis</groupId>
<artifactId>ratis-thirdparty</artifactId>
<version>0.2.0</version>
</parent>
<artifactId>ratis-thirdparty-hadoop</artifactId>
<name>Apache Ratis Thirdparty Hadoop</name>
<packaging>jar</packaging>
<description>Hadoop dependencies for Apache Ratis</description>
<dependencies>
<dependency>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis-thirdparty-misc</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-annotations</artifactId>
<version>1.16</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!--Make it so assembly:single does nothing in here-->
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<skipAssembly>true</skipAssembly>
</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>
<!-- Replace the original artifact which is no good on its own -->
<shadedArtifactAttached>false</shadedArtifactAttached>
<dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
<!-- Using shade-plugin to relocate hadoop's protobuf dependency and find it in ratis-thirdparty.
So dirty. -->
<relocations>
<relocation>
<pattern>com.google.protobuf</pattern>
<shadedPattern>${ratis.thirdparty.shaded.prefix}.com.google.protobuf</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.hadoop.ipc.protobuf</pattern>
<shadedPattern>${ratis.thirdparty.shaded.prefix}.org.apache.hadoop.ipc.protobuf</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>org.apache.hadoop:hadoop-common</artifact>
<includes>
<include>org/apache/hadoop/ipc/protobuf/**</include>
</includes>
</filter>
</filters>
<artifactSet>
<includes>
<!-- Must list explicitly, otherwise we pull in all of hadoop-common's
transitive dependencies. -->
<include>org.apache.hadoop:hadoop-common</include>
<include>com.google.j2objc:j2objc-annotations</include>
<include>com.google.errorprone:error_prone_annotations</include>
<include>org.codehaus.mojo:animal-sniffer-annotations</include>
</includes>
</artifactSet>
<!-- Pick up any LICENSE/NOTICE files from our dependencies -->
<transformers>
<!-- There are transformers for LICENSE and NOTICE, but none of our dependencies have proper upstream
L&N files, so we can just manage it ourselves with less pain and more correctness. -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<versionRange>[3.1.1,)</versionRange>
<goals>
<goal>shade</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>