| <?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>1.0.3</version> |
| </parent> |
| <artifactId>ratis-thirdparty-test</artifactId> |
| <name>Apache Ratis Thirdparty Test</name> |
| <packaging>jar</packaging> |
| <description>Miscellaneous tests for Apache Ratis Thirdparty Jar</description> |
| <url>https://github.com/apache/ratis-thirdparty</url> |
| |
| <properties> |
| <protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version> |
| |
| <junit.version>4.13.2</junit.version> |
| <slf4j.version>1.7.33</slf4j.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.ratis</groupId> |
| <artifactId>ratis-thirdparty-misc</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <version>${junit.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| <version>${slf4j.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-log4j12</artifactId> |
| <version>${slf4j.version}</version> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <extensions> |
| <extension> |
| <groupId>kr.motd.maven</groupId> |
| <artifactId>os-maven-plugin</artifactId> |
| <version>${os-maven-plugin.version}</version> |
| </extension> |
| </extensions> |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.xolstice.maven.plugins</groupId> |
| <artifactId>protobuf-maven-plugin</artifactId> |
| <version>${protobuf-maven-plugin.version}</version> |
| <configuration> |
| <protocArtifact> |
| com.google.protobuf:protoc:${shaded.protobuf.version}:exe:${os.detected.classifier} |
| </protocArtifact> |
| <!-- Place these in a location that compiler-plugin is already looking --> |
| <outputDirectory>${project.build.directory}/generated-sources</outputDirectory> |
| <!-- With multiple executions, this must be `false` otherwise we wipe out the previous execution --> |
| <clearOutputDirectory>false</clearOutputDirectory> |
| </configuration> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| |
| <plugins> |
| <plugin> |
| <groupId>org.xolstice.maven.plugins</groupId> |
| <artifactId>protobuf-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>compile-protobuf</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>compile</goal> |
| </goals> |
| </execution> |
| <execution> |
| <id>compile-grpc</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>compile-custom</goal> |
| </goals> |
| <configuration> |
| <pluginId>grpc-java</pluginId> |
| <pluginArtifact> |
| io.grpc:protoc-gen-grpc-java:${shaded.grpc.version}:exe:${os.detected.classifier} |
| </pluginArtifact> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- Modify the generated source to use our shaded protobuf --> |
| <plugin> |
| <groupId>com.google.code.maven-replacer-plugin</groupId> |
| <artifactId>replacer</artifactId> |
| <version>${maven-replacer-plugin.version}</version> |
| <executions> |
| <execution> |
| <phase>process-sources</phase> |
| <goals> |
| <goal>replace</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <basedir>${project.build.directory}/generated-sources</basedir> |
| <includes> |
| <include>**/*.java</include> |
| </includes> |
| <replacements> |
| <replacement> |
| <token>([^\.])com.google</token> |
| <value>$1org.apache.ratis.thirdparty.com.google</value> |
| </replacement> |
| <replacement> |
| <token>([^\.])io.grpc</token> |
| <value>$1org.apache.ratis.thirdparty.io.grpc</value> |
| </replacement> |
| </replacements> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <source>${maven.compiler.source}</source> |
| <target>${maven.compiler.target}</target> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <systemPropertyVariables> |
| <log4j.configuration>file:///${project.basedir}/src/test/resources/log4j.properties</log4j.configuration> |
| </systemPropertyVariables> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.rat</groupId> |
| <artifactId>apache-rat-plugin</artifactId> |
| <!-- target/ should get picked up from Apache parent pom.. --> |
| <configuration> |
| <!-- Lets us define more exclusions in child-modules without overriding these --> |
| <excludes combine.children="append"> |
| <exclude>src/test/resources/ssl/*.crt</exclude> |
| <exclude>src/test/resources/ssl/*.csr</exclude> |
| <exclude>src/test/resources/ssl/*.key</exclude> |
| <exclude>src/test/resources/ssl/*.pem</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |