blob: 1e876c1199b28471579deec6d932db64dfaae633 [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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds</artifactId>
<version>2.1.0-SNAPSHOT</version>
</parent>
<artifactId>hdds-interface-client</artifactId>
<version>2.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Apache Ozone HDDS Client Interface</name>
<description>Apache Ozone Distributed Data Store Client interface</description>
<properties>
<!-- no testable code in this module -->
<maven.test.skip>true</maven.test.skip>
<!-- only generated code in this module -->
<spotbugs.skip>true</spotbugs.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop.thirdparty</groupId>
<artifactId>hadoop-shaded-protobuf_3_25</artifactId>
</dependency>
<dependency>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis-thirdparty-misc</artifactId>
</dependency>
<dependency>
<!-- for generated sources, Java 11+ -->
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.salesforce.servicelibs</groupId>
<artifactId>proto-backwards-compatibility</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<proc>none</proc>
</configuration>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>${protobuf-maven-plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>compile-protoc-grpc</id>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
<goal>compile-custom</goal>
<goal>test-compile-custom</goal>
</goals>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${grpc.protobuf-compile.version}:exe:${os.detected.classifier}</protocArtifact>
<protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
<includes>
<include>DatanodeClientProtocol.proto</include>
<include>SCMClientProtocol.proto</include>
</includes>
<outputDirectory>target/generated-sources/java</outputDirectory>
<clearOutputDirectory>false</clearOutputDirectory>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${io.grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
</execution>
<execution>
<id>compile-protoc-2</id>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${proto2.hadooprpc.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
<protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
<includes>
<include>hdds.proto</include>
<include>ReconfigureProtocol.proto</include>
</includes>
<outputDirectory>target/generated-sources/java</outputDirectory>
<clearOutputDirectory>false</clearOutputDirectory>
</configuration>
</execution>
<execution>
<id>compile-protoc-3</id>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${proto3.hadooprpc.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
<protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
<includes>
<include>hdds.proto</include>
<include>ReconfigureProtocol.proto</include>
</includes>
<outputDirectory>target/generated-sources/java/proto3</outputDirectory>
<clearOutputDirectory>false</clearOutputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>run</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<target>
<replace dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto" token="com.google.protobuf" value="org.apache.ratis.thirdparty.com.google.protobuf" />
<replace dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto" token="io.grpc" value="org.apache.ratis.thirdparty.io.grpc" />
<replace dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/datanode/proto" token="com.google.common" value="org.apache.ratis.thirdparty.com.google.common" />
<replace dir="target/generated-sources/java/proto3/org/apache/hadoop/hdds/protocol/proto" token="org.apache.hadoop.hdds.protocol.proto" value="org.apache.hadoop.hdds.protocol.proto3" />
<replace dir="target/generated-sources/java/proto3/org/apache/hadoop/hdds/protocol/proto" token="com.google.protobuf" value="org.apache.hadoop.thirdparty.protobuf" />
<move file="target/generated-sources/java/proto3/org/apache/hadoop/hdds/protocol/proto" tofile="target/generated-sources/java/proto3/org/apache/hadoop/hdds/protocol/proto3" />
<move file="target/generated-sources/java/proto3" tofile="target/generated-sources/java" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>