<?xml version="1.0" encoding="UTF-8"?>
<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">
  <parent>
    <artifactId>jdbc-yugabytedb-aggregate</artifactId>
    <groupId>com.yugabyte</groupId>
    <version>42.2.7-yb-6</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jdbc-yugabytedb</artifactId>
  <name>YugaByte SQL JDBC Driver - JDBC 4.2</name>
  <version>42.2.7-yb-5-beta.1</version>
  <description>Java JDBC 4.2 (JRE 8+) driver for YugaByte SQL database</description>
  <url>https://github.com/yugabyte/jdbc-yugabytedb</url>
  <developers>
    <developer>
      <name>YugaByte Development Team</name>
      <email>info@yugabyte.com</email>
      <organization>YugaByte, Inc.</organization>
      <organizationUrl>https://www.yugabyte.com</organizationUrl>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>BSD-2-Clause</name>
      <url>https://jdbc.postgresql.org/about/license.html</url>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:yugabyte/jdbc-yugabytedb.git</connection>
    <developerConnection>scm:git:git@github.com:yugabyte/jdbc-yugabytedb.git</developerConnection>
    <url>https://github.com/yugabyte/jdbc-yugabytedb</url>
  </scm>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${maven-checkstyle-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <configLocation>src/main/checkstyle/checks.xml</configLocation>
            <suppressionsLocation>src/main/checkstyle/suppressions.xml</suppressionsLocation>
            <violationSeverity>error</violationSeverity>
            <failOnViolation>true</failOnViolation>
            <failsOnError>true</failsOnError>
            <consoleOutput>true</consoleOutput>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <configuration>
            <failOnWarnings>true</failOnWarnings>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
        <configuration>
          <chmod>true</chmod>
          <inputEncoding>UTF-8</inputEncoding>
          <outputEncoding>UTF-8</outputEncoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven-shade-plugin.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <relocations>
                <relocation>
                  <pattern>com.ongres</pattern>
                  <shadedPattern>org.postgresql.shaded.com.ongres</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.datastax</pattern>
                  <shadedPattern>com.shaded.datastax</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>com.shaded.google</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <minimizeJar>true</minimizeJar>
          <filters>
            <filter>
              <artifact>com.ongres.scram:client</artifact>
              <includes>
                <include>**</include>
              </includes>
            </filter>
            <filter>
              <artifact>com.github.waffle:waffle-jna</artifact>
              <excludes>
                <exclude>**</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>org.slf4j:jcl-over-slf4j</artifact>
              <excludes>
                <exclude>**</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>com/sun/jna/**</exclude>
              </excludes>
            </filter>
          </filters>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <optimize>true</optimize>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
          <useIncrementalCompilation>false</useIncrementalCompilation>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin.version}</version>
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <preparationGoals>clean verify -Penforce-java8</preparationGoals>
          <arguments>-Psonatype-oss-release ${release.arguments}</arguments>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>${maven-gpg-plugin.version}</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>translate</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.vlsi.gettext</groupId>
            <artifactId>gettext-maven-plugin</artifactId>
            <version>${gettext-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>update_po_with_new_messages</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>gettext</goal>
                </goals>
              </execution>
              <execution>
                <id>remove_obsolete_translations</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>attrib</goal>
                </goals>
                <configuration>
                  <extraArgs>
                    <extraArg>--no-obsolete</extraArg>
                  </extraArgs>
                </configuration>
              </execution>
              <execution>
                <id>generate_pot_and_po_files</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>merge</goal>
                </goals>
              </execution>
              <execution>
                <id>generate_resource_bundles</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>dist</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <outputFormat>java</outputFormat>
              <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
              <outputDirectory>${project.build.sourceDirectory}</outputDirectory>
              <keysFile>messages.pot</keysFile>
              <poDirectory>src/main/java/org/postgresql/translation</poDirectory>
              <targetBundle>org.postgresql.translation.messages</targetBundle>
              <keywords>-kGT.tr</keywords>
              <msgmergeCmd>msgmerge</msgmergeCmd>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>excludeWaffleFiles</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>org/postgresql/sspi/NTDSAPI.java</exclude>
                <exclude>org/postgresql/sspi/NTDSAPIWrapper.java</exclude>
                <exclude>org/postgresql/sspi/SSPIClient.java</exclude>
              </excludes>
              <testExcludes>
                <exclude>org/postgresql/test/sspi/*.java</exclude>
              </testExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>excludeOsgiFiles</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>org/postgresql/osgi/PGBundleActivator.java</exclude>
                <exclude>org/postgresql/osgi/PGDataSourceFactory.java</exclude>
              </excludes>
              <testExcludes>
                <exclude>**/PGDataSourceFactoryTest.java</exclude>
                <exclude>**/OsgiTestSuite.java</exclude>
              </testExcludes>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk9-workarounds</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-source-plugin</artifactId>
              <dependencies>
                <dependency>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-archiver</artifactId>
                  <version>2.4.4</version>
                </dependency>
              </dependencies>
            </plugin>
            <plugin>
              <artifactId>maven-jar-plugin</artifactId>
              <dependencies>
                <dependency>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-archiver</artifactId>
                  <version>2.4.4</version>
                </dependency>
              </dependencies>
            </plugin>
            <plugin>
              <artifactId>maven-assembly-plugin</artifactId>
              <version>2.4.1</version>
              <dependencies>
                <dependency>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-archiver</artifactId>
                  <version>2.4.4</version>
                </dependency>
              </dependencies>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>enforce-java8</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>${maven-enforcer-plugin.version}</version>
            <executions>
              <execution>
                <id>enforce-java8</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <requireJavaVersion>
                      <version>1.8</version>
                    </requireJavaVersion>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>se.jiderhamn</groupId>
      <artifactId>classloader-leak-test-framework</artifactId>
      <version>1.1.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>bcel</artifactId>
          <groupId>org.apache.bcel</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <jdbc.specification.version.nodot>42</jdbc.specification.version.nodot>
    <scram.version>2.0</scram.version>
    <classloader-leak-test-framework.version>1.1.1</classloader-leak-test-framework.version>
    <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
    <osgi.enterprise.version>4.2.0</osgi.enterprise.version>
    <osgi.core.version>4.3.1</osgi.core.version>
    <junit.version>4.12</junit.version>
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-site-plugin.version>3.8.2</maven-site-plugin.version>
    <skip.assembly>false</skip.assembly>
    <java.version>1.8</java.version>
    <slf4j.version>1.7.28</slf4j.version>
    <hikaricp.version>3.3.1</hikaricp.version>
    <maven-shade-plugin.version>3.1.0</maven-shade-plugin.version>
    <checkstyle.version>[8.18,)</checkstyle.version>
    <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
    <waffle-jna.version>1.9.1</waffle-jna.version>
    <maven-release-plugin.version>2.5</maven-release-plugin.version>
    <maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
    <maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
    <jdbc.specification.version>4.2</jdbc.specification.version>
    <gettext-maven-plugin.version>1.4.0</gettext-maven-plugin.version>
  </properties>
</project>

