ratis
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis</artifactId>
<version>3.2.2</version>
</dependency><?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</groupId>
<artifactId>apache</artifactId>
<version>35</version>
<relativePath /> <!-- resolve from repository -->
</parent>
<artifactId>ratis</artifactId>
<groupId>org.apache.ratis</groupId>
<version>3.2.2</version>
<name>Apache Ratis</name>
<packaging>pom</packaging>
<description>
Apache Ratis is an open source java implementation for RAFT consensus protocol
</description>
<url>https://ratis.apache.org/</url>
<inceptionYear>2017</inceptionYear>
<distributionManagement>
<repository>
<id>${distMgmtStagingId}</id>
<name>${distMgmtStagingName}</name>
<url>${distMgmtStagingUrl}</url>
</repository>
<snapshotRepository>
<id>${distMgmtSnapshotsId}</id>
<name>${distMgmtSnapshotsName}</name>
<url>${distMgmtSnapshotsUrl}</url>
</snapshotRepository>
</distributionManagement>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<modules>
<module>ratis-docs</module>
<module>ratis-proto</module>
<module>ratis-common</module>
<module>ratis-client</module>
<module>ratis-server-api</module>
<module>ratis-server</module>
<module>ratis-resource-bundle</module>
<module>ratis-grpc</module>
<module>ratis-netty</module>
<module>ratis-test</module>
<module>ratis-examples</module>
<module>ratis-metrics-api</module>
<module>ratis-metrics-default</module>
<module>ratis-metrics-dropwizard3</module>
<module>ratis-tools</module>
<module>ratis-shell</module>
<module>ratis-assembly</module>
<module>ratis-bom</module>
</modules>
<scm>
<connection>scm:git:git://git.apache.org/ratis.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/ratis.git</developerConnection>
<url>https://git-wip-us.apache.org/repos/asf?p=ratis.git</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>JIRA</system>
<url>http://issues.apache.org/jira/browse/RATIS</url>
</issueManagement>
<!--<ciManagement> TODO
<system>Jenkins</system>
<url>http://builds.apache.org/job/Ratis-Master/</url>
</ciManagement>-->
<mailingLists>
<mailingList>
<name>User List</name>
<subscribe>user-subscribe@ratis.apache.org</subscribe>
<unsubscribe>user-unsubscribe@ratis.apache.org</unsubscribe>
<post>user@ratis.apache.org</post>
<archive>https://lists.apache.org/list.html?user@ratis.apache.org</archive>
<otherArchives>
<otherArchive>http://mail-archives.apache.org/mod_mbox/ratis-user/</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Developer List</name>
<subscribe>dev-subscribe@ratis.apache.org</subscribe>
<unsubscribe>dev-unsubscribe@ratis.apache.org</unsubscribe>
<post>dev@ratis.apache.org</post>
<archive>https://lists.apache.org/list.html?dev@ratis.apache.org</archive>
<otherArchives>
<otherArchive>http://mail-archives.apache.org/mod_mbox/ratis-dev/</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Commits List</name>
<subscribe>commits-subscribe@ratis.apache.org</subscribe>
<unsubscribe>commits-unsubscribe@ratis.apache.org</unsubscribe>
<archive>https://lists.apache.org/list.html?commits@ratis.apache.org</archive>
<otherArchives>
<otherArchive>http://mail-archives.apache.org/mod_mbox/ratis-commits/</otherArchive>
</otherArchives>
</mailingList>
<mailingList>
<name>Issues List</name>
<subscribe>issues-subscribe@ratis.apache.org</subscribe>
<unsubscribe>issues-unsubscribe@ratis.apache.org</unsubscribe>
<archive>https://lists.apache.org/list.html?issues@ratis.apache.org</archive>
<otherArchives>
<otherArchive>http://mail-archives.apache.org/mod_mbox/ratis-issues/</otherArchive>
</otherArchives>
</mailingList>
</mailingLists>
<developers>
<!-- TODO: Add developers -->
</developers>
<properties>
<project.build.outputTimestamp>2026-03-12T15:19:59Z</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- where to find the generated LICENSE files -->
<license.aggregate.path>
${project.build.directory}/maven-shared-archive-resources/META-INF/LICENSE
</license.aggregate.path>
<license.bundles.dependencies>false</license.bundles.dependencies>
<!-- Maven plugin versions -->
<maven-bundle-plugin.version>5.1.8</maven-bundle-plugin.version>
<wagon-ssh.version>3.5.3</wagon-ssh.version>
<hadoop-maven-plugins.version>3.4.2</hadoop-maven-plugins.version>
<sonar-maven-plugin.version>5.3.0.6276</sonar-maven-plugin.version>
<!-- org.codehaus.mojo -->
<build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
<exec-maven-plugin.version>3.6.2</exec-maven-plugin.version>
<extra-enforcer-rules.version>1.11.0</extra-enforcer-rules.version>
<restrict-imports-enforcer-rule.version>3.0.0</restrict-imports-enforcer-rule.version>
<license-maven-plugin.version>2.7.0</license-maven-plugin.version>
<protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
<cyclonedx.version>2.9.1</cyclonedx.version>
<spotbugs.version>4.8.6</spotbugs.version>
<spotbugs-plugin.version>4.8.6.2</spotbugs-plugin.version>
<distMgmtSnapshotsId>apache.snapshots.https</distMgmtSnapshotsId>
<distMgmtSnapshotsName>Apache Development Snapshot Repository</distMgmtSnapshotsName>
<distMgmtSnapshotsUrl>https://repository.apache.org/content/repositories/snapshots</distMgmtSnapshotsUrl>
<distMgmtStagingId>apache.staging.https</distMgmtStagingId>
<distMgmtStagingName>Apache Release Distribution Repository</distMgmtStagingName>
<distMgmtStagingUrl>https://repository.apache.org/service/local/staging/deploy/maven2</distMgmtStagingUrl>
<shell-executable>bash</shell-executable>
<!-- define the Java language version used by the compiler -->
<maven.compiler.release>8</maven.compiler.release>
<!-- override maven.compiler.target=8 defined in parent POM 35; can be removed on upgrade to 36+ -->
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<!-- Contains all shaded thirdparty dependencies; make sure to also update in ratis-bom/pom.xml -->
<ratis.thirdparty.version>1.0.11</ratis.thirdparty.version>
<!-- Need these for the protobuf compiler. *MUST* match what is in ratis-thirdparty -->
<shaded.protobuf.version>3.25.8</shaded.protobuf.version>
<shaded.grpc.version>1.77.1</shaded.grpc.version>
<!-- Test properties -->
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
<test.exclude.pattern>_</test.exclude.pattern>
<!-- number of threads/forks to use when running tests in parallel, see parallel-tests profile -->
<testsThreadCount>4</testsThreadCount>
<slf4j.version>2.0.7</slf4j.version>
<junit-bom.version>5.13.3</junit-bom.version>
<mockito.version>4.11.0</mockito.version>
<jacoco.version>0.8.12</jacoco.version>
<jakarta.annotation.version>1.3.5</jakarta.annotation.version>
<flaky-test-groups>flaky | org.apache.ratis.test.tag.FlakyTest</flaky-test-groups>
</properties>
<dependencyManagement>
<dependencies>
<!-- Internal dependencies -->
<dependency>
<artifactId>ratis-docs</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-client</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-client</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-common</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-common</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-examples</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-examples</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-experiments</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-metrics-api</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-metrics-default</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-metrics-dropwizard3</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-metrics-default</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-tools</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-tools</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-shell</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-grpc</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-grpc</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-netty</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-netty</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-proto</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-server-api</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-server</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-server</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>ratis-test</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
</dependency>
<dependency>
<artifactId>ratis-test</artifactId>
<groupId>org.apache.ratis</groupId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ratis</groupId>
<artifactId>ratis-thirdparty-misc</artifactId>
<version>${ratis.thirdparty.version}</version>
</dependency>
<!-- External dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<scope>test</scope>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta.annotation.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.5.0.Final</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-maven-plugins</artifactId>
<version>${hadoop-maven-plugins.version}</version>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>${protobuf-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${build-helper-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<source>8</source>
<additionalJOptions>
<additionalJOption>-J-Duser.language=en</additionalJOption>
<additionalJOption>-J-Duser.country=US</additionalJOption>
<additionalJOption>-Xmaxwarns</additionalJOption>
<additionalJOption>10000</additionalJOption>
<additionalJOption>-Xdoclint:-missing</additionalJOption>
</additionalJOptions>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotbugs.version}</version>
</dependency>
</dependencies>
<configuration>
<fork>true</fork>
<maxHeap>2048</maxHeap>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<dependencies>
<dependency>
<groupId>de.skuzzle.enforcer</groupId>
<artifactId>restrict-imports-enforcer-rule</artifactId>
<version>${restrict-imports-enforcer-rule.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>bannedImports-finalizers</id>
<phase>process-sources</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<restrictImports>
<includeTestCode>false</includeTestCode>
<reason>Classes (e.g. FileInputStream, FileOutputStream) overriding the Object.finalize() method will cause gc to run a much longer time. As stated in Effective Java, there is a severe performance penalty for using finalizers.</reason>
<bannedImports>
<bannedImport>java.io.FileInputStream</bannedImport>
<bannedImport>java.io.FileOutputStream</bannedImport>
</bannedImports>
</restrictImports>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<!--Defer to the ratis-assembly sub-module. It does all assembly-->
<skipAssembly>true</skipAssembly>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<meminitial>512m</meminitial>
<maxmem>2048m</maxmem>
<showDeprecation>false</showDeprecation>
<useIncrementalCompilation>false</useIncrementalCompilation>
<compilerArgs>
<arg>-Xlint:all,-options,-path</arg>
</compilerArgs>
</configuration>
</plugin>
<!-- General configuration for submodules who want to build a test jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<!--This goal will install a -test.jar when we do install
See http://maven.apache.org/guides/mini/guide-attached-tests.html
-->
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
<skipIfEmpty>true</skipIfEmpty>
<excludes>
<exclude>log4j.properties</exclude>
<exclude>*.jar</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoTests>false</failIfNoTests>
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
<reuseForks>false</reuseForks>
<trimStackTrace>false</trimStackTrace>
<enableProcessChecker>all</enableProcessChecker>
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
<!-- @argLine is filled by jacoco maven plugin. @{} means late evaluation -->
<argLine>-Xmx2g -XX:+HeapDumpOnOutOfMemoryError @{argLine}</argLine>
<systemPropertyVariables>
<ratis.log.dir>${project.build.directory}/log</ratis.log.dir>
<ratis.tmp.dir>${project.build.directory}/tmp</ratis.tmp.dir>
<java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
</systemPropertyVariables>
<includes>
<include>**/Test*.java</include>
</includes>
<excludes>
<exclude>**/Test*$*.java</exclude>
<exclude>${test.exclude.pattern}</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<!--You need this profile. It'll sign your artifacts.
I'm not sure if this config. actually works though.
I've been specifying -Papache-release on the command-line
-->
<releaseProfiles>apache-release</releaseProfiles>
<!--This stops our running tests for each stage of maven release.
But it builds the test jar. From SUREFIRE-172.
-->
<arguments>-Dmaven.test.skip.exec ${arguments}</arguments>
<goals>${goals}</goals>
<pomFileName>pom.xml</pomFileName>
</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>.github/*.md</exclude>
<exclude>target/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<dependencies>
<dependency><!-- add support for ssh/scp -->
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>${wagon-ssh.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven-bundle-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
</plugin>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<version>${cyclonedx.version}</version>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<inherited>true</inherited>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-maven-plugins</artifactId>
<executions>
<execution>
<id>version-info</id>
<phase>generate-resources</phase>
<goals>
<goal>version-info</goal>
</goals>
<configuration>
<source>
<directory>${project.basedir}</directory>
<includes>
<include>*/src/main/java/**/*.java</include>
<include>*/src/main/proto/*.proto</include>
</includes>
</source>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<!-- We decide not to check style on test directory to focus more on code than format. -->
<!--includeTestSourceDirectory>true</includeTestSourceDirectory-->
<configLocation>dev-support/checkstyle.xml</configLocation>
<failOnViolation>true</failOnViolation>
<linkXRef>false</linkXRef>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/target/generated-sources</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<includes>
<include>**/jacoco.exec</include>
</includes>
<useDefaultExcludes>false</useDefaultExcludes>
</fileSet>
</fileSets>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<includes>org.apache.ratis.*</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>12.1.9</version>
</plugin>
</plugins>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>${project.basedir}/../src/main/resources</directory>
<includes>
<include>ratis-version.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>experiments-build</id>
<activation>
<property>
<name>buildExp</name>
</property>
</activation>
<modules>
<module>ratis-experiments</module>
</modules>
</profile>
<profile>
<id>os.linux</id>
<activation>
<os>
<family>!Mac</family>
</os>
</activation>
<properties>
<build.platform>${os.name}-${os.arch}-${sun.arch.data.model}
</build.platform>
</properties>
</profile>
<profile>
<id>os.mac</id>
<activation>
<os>
<family>Mac</family>
</os>
</activation>
<properties>
<build.platform>Mac_OS_X-${sun.arch.data.model}</build.platform>
</properties>
</profile>
<profile>
<id>native-win</id>
<activation>
<os>
<family>Windows</family>
</os>
</activation>
<properties>
<!-- We must use this exact string for egd on Windows, because the -->
<!-- JVM will check for an exact string match on this. If found, it -->
<!-- will use a native entropy provider. This will not really -->
<!-- attempt to open a file at this path. -->
<java.security.egd>file:/dev/urandom</java.security.egd>
<bundle.snappy.in.bin>true</bundle.snappy.in.bin>
<bundle.openssl.in.bin>true</bundle.openssl.in.bin>
</properties>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<!-- build javadoc jars per jar for publishing to maven -->
<id>module-javadocs</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<!-- builds source jars and attaches them to the project for publishing -->
<id>attach-sources</id> <!-- override execution from maven-apache-parent POM -->
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
<goal>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>negate-license-bundles-property</id>
<goals>
<goal>bsh-property</goal>
</goals>
<configuration>
<source>skip.license.check = !${license.bundles.dependencies};</source>
<properties>
<property>skip.license.check</property>
</properties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>${extra-enforcer-rules.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>dist-enforce</id>
<phase>package</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>${maven.compiler.release}</maxJdkVersion>
<message>Ratis has unsupported dependencies.
Ratis requires that all dependencies be compiled with version ${maven.compiler.release} or earlier
of the JDK to properly build from source. You appear to be using a newer dependency. You can use
either "mvn -version" or "mvn enforcer:display-info" to verify what version is active.
</message>
</enforceBytecodeVersion>
</rules>
</configuration>
</execution>
<execution>
<id>check-aggregate-license</id>
<!-- must check after LICENSE is built at 'generate-resources' -->
<phase>process-resources</phase>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<evaluateBeanshell>
<condition>
File license = new File("${license.aggregate.path}");
// Beanshell does not support try-with-resources,
// so we must close this scanner manually
Scanner scanner = new Scanner(license);
while (scanner.hasNextLine()) {
if (scanner.nextLine().startsWith("ERROR:")) {
scanner.close();
return false;
}
}
scanner.close();
return true;
</condition>
<message>
License errors detected, for more detail find ERROR in
${license.aggregate.path}
</message>
</evaluateBeanshell>
</rules>
<skip>${skip.license.check}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<executions>
<execution>
<!-- Execution at the validate lifecycle is good -->
<id>check-licenses</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.cyclonedx</groupId>
<artifactId>cyclonedx-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>makeBom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>grpc-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>org.apache.ratis.grpc.**</include>
</includes>
<excludedGroups>${flaky-test-groups}</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>server-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>org.apache.ratis.datastream.**</include>
<include>org.apache.ratis.server.**</include>
</includes>
<excludedGroups>${flaky-test-groups}</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>misc-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>org.apache.ratis.datastream.**</exclude>
<exclude>org.apache.ratis.grpc.**</exclude>
<exclude>org.apache.ratis.server.**</exclude>
</excludes>
<excludedGroups>${flaky-test-groups}</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>flaky-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<groups>${flaky-test-groups}</groups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>