<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright DataStax, Inc.

    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.

-->
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.datastax.oss</groupId>
  <artifactId>dsbulk-parent</artifactId>
  <version>1.8.0</version>
  <packaging>pom</packaging>
  <name>DataStax Bulk Loader</name>
  <description>A unified tool for loading into and unloading from storage engines compatible with Apache Cassandra: OSS Cassandra, DataStax Astra and DataStax Enterprise (DSE).</description>
  <url>https://github.com/datastax/dsbulk</url>
  <inceptionYear>2017</inceptionYear>
  <organization>
    <name>DataStax</name>
    <url>http://www.datastax.com</url>
  </organization>
  <modules>
    <module>bom</module>
    <module>url</module>
    <module>io</module>
    <module>config</module>
    <module>tests</module>
    <module>cql</module>
    <module>codecs</module>
    <module>format</module>
    <module>connectors</module>
    <module>sampler</module>
    <module>batcher</module>
    <module>mapping</module>
    <module>partitioner</module>
    <module>executor</module>
    <module>workflow</module>
    <module>runner</module>
    <module>docs</module>
    <module>distribution</module>
  </modules>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <!--
    When upgrading compile-time and runtime library versions,
    make sure the resulting binary tarball contains only
    required jars, and that no jar has an offending license.
    -->
    <driver.version>4.10.0</driver.version>
    <reactive-streams.version>1.0.3</reactive-streams.version>
    <reactor.version>2020.0.3</reactor.version>
    <config.version>1.4.1</config.version>
    <netty.version>4.1.51.Final</netty.version>
    <!-- Note: Caffeine 3 requires java 11 or higher -->
    <caffeine.version>2.8.8</caffeine.version>
    <jctools.version>3.2.0</jctools.version>
    <slf4j.version>1.7.26</slf4j.version>
    <logback.version>1.2.3</logback.version>
    <metrics.version>4.1.17</metrics.version>
    <lz4.version>1.7.1</lz4.version>
    <snappy.version>1.1.7.3</snappy.version>
    <hdr.version>2.1.12</hdr.version>
    <jackson.version>2.12.1</jackson.version>
    <univocity.version>2.9.1</univocity.version>
    <commons-compress.version>1.19</commons-compress.version>
    <compress.zstd.version>1.4.5-6</compress.zstd.version>
    <compress.xz.version>1.8</compress.xz.version>
    <compress.brotli.version>0.1.2</compress.brotli.version>
    <antlr4.version>4.9.1</antlr4.version>
    <!-- Test dependencies -->
    <junit.version>5.7.1</junit.version>
    <assertj.version>3.19.0</assertj.version>
    <mockito.version>3.7.7</mockito.version>
    <simulacron.version>0.11.0</simulacron.version>
    <tinkerpop.version>3.4.10</tinkerpop.version>
    <awaitility.version>4.0.3</awaitility.version>
    <commons-exec.version>1.3</commons-exec.version>
    <surefire.version>2.22.2</surefire.version>
    <max.simulacron.clusters>4</max.simulacron.clusters>
    <max.ccm.clusters>2</max.ccm.clusters>
  </properties>
  <dependencyManagement>
    <dependencies>
      <!--
      Compile-time and runtime dependencies are declared in DSBulk's BOM;
      below are the test dependencies used by DSBulk
      -->
      <dependency>
        <groupId>com.datastax.oss</groupId>
        <artifactId>dsbulk-batcher-api</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>com.datastax.oss</groupId>
        <artifactId>dsbulk-executor-api</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.reactivestreams</groupId>
        <artifactId>reactive-streams-tck</artifactId>
        <version>${reactive-streams.version}</version>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj.version}</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>${mockito.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-exec</artifactId>
        <version>${commons-exec.version}</version>
      </dependency>
      <!-- Tinkerpop is excluded when importing the driver, but we use it in integration tests -->
      <dependency>
        <groupId>org.apache.tinkerpop</groupId>
        <artifactId>gremlin-core</artifactId>
        <version>${tinkerpop.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.tinkerpop</groupId>
        <artifactId>tinkergraph-gremlin</artifactId>
        <version>${tinkerpop.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datastax.oss.simulacron</groupId>
        <artifactId>simulacron-native-server</artifactId>
        <version>${simulacron.version}</version>
      </dependency>
      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>${awaitility.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.tomakehurst</groupId>
        <artifactId>wiremock</artifactId>
        <version>2.27.1</version>
      </dependency>
      <dependency>
        <groupId>ru.lanwen.wiremock</groupId>
        <artifactId>wiremock-junit5</artifactId>
        <version>1.3.1</version>
      </dependency>
      <!-- Documentation dependencies -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-text</artifactId>
        <version>1.8</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>au.com.acegi</groupId>
          <artifactId>xml-format-maven-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>com.coveo</groupId>
          <artifactId>fmt-maven-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>3.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>1.16</version>
        </plugin>
        <plugin>
          <groupId>org.antlr</groupId>
          <artifactId>antlr4-maven-plugin</artifactId>
          <version>${antlr4.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.8</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>au.com.acegi</groupId>
        <artifactId>xml-format-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>xml-format</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>ci/**</exclude>
            <exclude>perf/**</exclude>
            <exclude>.idea/**</exclude>
            <exclude>**/target/**</exclude>
            <exclude>**/dependency-reduced-pom.xml</exclude>
            <exclude>**/.flattened-pom.xml</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.coveo</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-integration-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/it/java</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-integration-test-resources</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>add-test-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <filtering>false</filtering>
                  <directory>src/it/resources</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <inlineHeader><![CDATA[
Copyright DataStax, Inc.

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.]]></inlineHeader>
          <includes>
            <include>src/**/*.java</include>
            <include>src/**/*.xml</include>
            <include>src/**/*.properties</include>
            <include>**/pom.xml</include>
            <include>src/**/*.g4</include>
          </includes>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
            <properties>SCRIPT_STYLE</properties>
            <g4>SLASHSTAR_STYLE</g4>
          </mapping>
          <strictCheck>true</strictCheck>
        </configuration>
        <executions>
          <execution>
            <id>check-license</id>
            <phase>initialize</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>check-jdk8</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <signature>
                <groupId>org.codehaus.mojo.signature</groupId>
                <artifactId>java18</artifactId>
                <version>1.0</version>
              </signature>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <optimize>true</optimize>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
          <failOnWarning>false</failOnWarning>
          <compilerId>javac-with-errorprone</compilerId>
          <forceJavacCompilerUse>true</forceJavacCompilerUse>
          <useIncrementalCompilation>false</useIncrementalCompilation>
          <compilerArgs>
            <arg>-XepExcludedPaths:.*/generated/.*</arg>
          </compilerArgs>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-compiler-javac-errorprone</artifactId>
            <version>2.8.5</version>
          </dependency>
          <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_core</artifactId>
            <version>2.3.3</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-maven-plugin</artifactId>
        <configuration>
          <visitor>true</visitor>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>antlr4</goal>
            </goals>
            <phase>generate-sources</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>unit-tests-coverage</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>integration-tests-coverage</id>
            <goals>
              <goal>prepare-agent-integration</goal>
            </goals>
          </execution>
          <execution>
            <id>report-unit-tests-coverage</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>report-integration-tests-coverage</id>
            <goals>
              <goal>report-integration</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**/generated/**</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <logback.configurationFile>${project.basedir}/src/test/resources/logback-test.xml</logback.configurationFile>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <logback.configurationFile>${project.basedir}/src/test/resources/logback-test.xml</logback.configurationFile>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <id>short-tests</id>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
            <configuration>
              <excludedGroups>medium,long</excludedGroups>
              <reportNameSuffix>short</reportNameSuffix>
              <forkCount>${max.simulacron.clusters}</forkCount>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>false</autoReleaseAfterClose>
          <skipLocalStaging>true</skipLocalStaging>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <!--
    Profile activated when releasing. See:
    http://central.sonatype.org/pages/apache-maven.html
    -->
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <verbose>false</verbose>
              <quiet>true</quiet>
              <doclint>all,-missing</doclint>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <header><![CDATA[<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TWSQ28');</script>
<!-- End Google Tag Manager -->
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TWSQ28"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->]]></header>
                  <additionalOptions>
                    <additionalOption>--allow-script-in-comments</additionalOption>
                  </additionalOptions>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>medium</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <!-- add a special execution that only runs CCM tests -->
              <execution>
                <id>medium-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <groups>medium</groups>
                  <reportNameSuffix>medium</reportNameSuffix>
                  <forkCount>${max.ccm.clusters}</forkCount>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>long</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <!-- add a special execution that only runs long CCM tests -->
              <execution>
                <id>long-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <groups>long</groups>
                  <reportNameSuffix>long</reportNameSuffix>
                  <forkCount>1</forkCount>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>Apache License Version 2.0</comments>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:datastax/dsbulk.git</connection>
    <developerConnection>scm:git:git@github.com:datastax/dsbulk.git</developerConnection>
    <url>https://github.com/datastax/dsbulk</url>
    <tag>1.8.0</tag>
  </scm>
  <developers>
    <developer>
      <name>Various</name>
      <organization>DataStax</organization>
    </developer>
  </developers>
</project>
