<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.github.jinahya</groupId>
    <artifactId>jinahya-parent</artifactId>
    <version>0.7.8</version>
  </parent>

  <groupId>com.github.jinahya</groupId>
  <artifactId>database-metadata-bind</artifactId>
  <version>2.0.2</version>
  <packaging>jar</packaging>

  <name>${project.artifactId}</name>
  <description>bindings for java.sql.DatabaseMetaData</description>
  <url>https://github.com/jinahya/$project.artifactId}</url>
  <inceptionYear>2011</inceptionYear>

  <scm>
    <connection>scm:git:git@github.com:jinahya/${project.artifactId}.git</connection>
    <developerConnection>scm:git:git@github.com:jinahya/${project.artifactId}.git</developerConnection>
    <url>https://github.com:jinahya/${project.artifactId}</url>
    <tag>2.0.2</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/jinahya/${project.artifactId}/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Travis CI</system>
    <url>https://travis-ci.org/jinahya/${project.artifactId}</url>
  </ciManagement>

  <properties>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
    <maven.compiler.testSource>1.8</maven.compiler.testSource>
    <maven.compiler.testTarget>1.8</maven.compiler.testTarget>
    <version.animal-sniffer>1.16</version.animal-sniffer>
    <version.postgresql-embedded>2.9</version.postgresql-embedded>
    <version.postgresql>42.2.2</version.postgresql>
    <version.mariaDB4j>2.3.0</version.mariaDB4j>
    <version.mariadb-java-client>2.2.5</version.mariadb-java-client>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.mariadb.jdbc</groupId>
        <artifactId>mariadb-java-client</artifactId>
        <version>${version.mariadb-java-client}</version>
      </dependency>
      <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>${version.postgresql}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.2.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.vorburger.mariaDB4j</groupId>
      <artifactId>mariaDB4j</artifactId>
      <version>${version.mariaDB4j}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.4.197</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <version>1.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>10.14.2.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.atteo</groupId>
      <artifactId>evo-inflector</artifactId>
      <version>1.2.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>animal-sniffer-annotations</artifactId>
      <version>${version.animal-sniffer}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>2.4.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.14.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xerial</groupId>
      <artifactId>sqlite-jdbc</artifactId>
      <version>3.23.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ru.yandex.qatools.embed</groupId>
      <artifactId>postgresql-embedded</artifactId>
      <version>${version.postgresql-embedded}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.7.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.6</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>3.4.0.905</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerArgs>
            <arg>-Xlint</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/EmbeddedMariadbTest.java</exclude>
            <exclude>**/EmbeddedPostgresqlTest.java</exclude>
            <exclude>**/ExternalTest.java</exclude>
          </excludes>
          <systemProperties>
            <property>
              <name>derby.stream.error.file</name>
              <value>target/derby.log</value>
            </property>
          </systemProperties>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <version>${version.animal-sniffer}</version>
        <executions>
          <execution>
            <id>check-against-java16</id>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <signature>
                <groupId>org.codehaus.mojo.signature</groupId>
                <artifactId>java16</artifactId>
                <version>1.0</version>
              </signature>
            </configuration>
          </execution>
          <execution>
            <id>check-against-java17</id>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <signature>
                <groupId>org.codehaus.mojo.signature</groupId>
                <artifactId>java17</artifactId>
                <version>1.0</version>
              </signature>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.5</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.8</version>
      </plugin>
      <!--      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.7</version>
      </plugin>-->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.5</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javancss-maven-plugin</artifactId>
        <version>2.1</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>umlgraph</id>
      <properties>
        <additionalparam>
          -hide java.*
          -hide com.github.jinahya.database.metadata.bind.TableKey
          -collapsible -horizontal
          -inferdep -inferdepinpackage -inferrel
          -outputencoding UTF-8
        </additionalparam>
      </properties>
    </profile>
    <profile>
      <id>embedded-mariadb</id>
      <properties>
        <server>${version.mariaDB4j}</server>
        <client>${version.mariadb-java-client}</client>
      </properties>
      <dependencies>
        <dependency>
          <groupId>ch.vorburger.mariaDB4j</groupId>
          <artifactId>mariaDB4j</artifactId>
          <version>${server}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.mariadb.jdbc</groupId>
          <artifactId>mariadb-java-client</artifactId>
          <version>${client}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <excludes>
                <exclude>**/EmbeddedPostgresqlTest.java</exclude>
              </excludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <test>EmbeddedMariadbTest</test>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>embedded-postgresql</id>
      <properties>
        <server>${version.postgresql-embedded}</server>
        <client>${version.postgresql}</client>
      </properties>
      <dependencies>
        <dependency>
          <groupId>ru.yandex.qatools.embed</groupId>
          <artifactId>postgresql-embedded</artifactId>
          <version>${server}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.postgresql</groupId>
          <artifactId>postgresql</artifactId>
          <version>${client}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <test>EmbeddedPostgresqlTest</test>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>external-mysql</id>
      <dependencies>
        <dependency>
          <groupId>mysql</groupId>
          <artifactId>mysql-connector-java</artifactId>
          <version>${client}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <!--      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <includes>
                <include>**/ExternalTest.java</include>
              </includes>
            </configuration>
          </plugin>
        </plugins>
      </build>-->
    </profile>
    <profile>
      <id>external-postgresql</id>
      <dependencies>
        <dependency>
          <groupId>org.postgresql</groupId>
          <artifactId>postgresql</artifactId>
          <version>${client}</version>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>external-sqlserver</id>
      <dependencies>
        <dependency>
          <groupId>com.microsoft.sqlserver</groupId>
          <artifactId>mssql-jdbc</artifactId>
          <version>${client}</version>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>external-oracle</id>
      <dependencies>
        <dependency>
          <groupId>com.oracle.jdbc</groupId>
          <artifactId>ojdbc8</artifactId>
          <version>${client}</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
