<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>net.ttddyy</groupId>
  <artifactId>datasource-assert</artifactId>
  <version>1.0</version>

  <packaging>jar</packaging>

  <name>datasource-assert</name>
  <description>
    Provide assertions for DataSource using datasource-proxy.
    Also, include custom assertions(assertThat) for AssertJ and Hamcrest.
  </description>
  <url>https://github.com/ttddyy/datasource-assert/</url>

  <licenses>
    <license>
      <name>Apache2 License</name>
      <url>https://opensource.org/licenses/Apache-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:https://github.com/ttddyy/datasource-assert.git</connection>
    <developerConnection>scm:git:https://github.com/ttddyy/datasource-assert.git</developerConnection>
    <url>https://github.com/ttddyy/datasource-assert</url>
    <tag>datasource-assert-1.0</tag>
  </scm>

  <distributionManagement>
    <repository>
      <id>bintray</id>
      <url>https://api.bintray.com/maven/ttddyy/maven/datasource-assert</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <developers>
    <developer>
      <id>tadaya</id>
      <name>Tadaya Tsuyukubo</name>
      <email>tadaya@ttddyy.net</email>
      <url>http://www.ttddyy.net</url>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <datasource-proxy.version>1.4.4</datasource-proxy.version>
    <flyway.version>3.2.1</flyway.version>

    <surefire.version>2.19.1</surefire.version>
    <asciidoctor.version>1.5.2</asciidoctor.version>
    <hsqldb.version>2.2.9</hsqldb.version>

    <junit4.version>4.12</junit4.version>
    <mockito.version>1.9.5</mockito.version>
    <hamcrest.version>2.0.0.0</hamcrest.version>
    <assertj.version>2.6.0</assertj.version>

  </properties>

  <repositories>
    <repository>
      <id>ossrh-snapshot</id>
      <name>OSSRH snapshot repository</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <profiles>
    <!-- This profile is activated by src/build/settings.xml for deployment -->
    <profile>
      <id>ossrh</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.7</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- This profile is used for generating docs that will be published on github -->
    <profile>
      <id>publish-doc</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <configuration>
              <attributes>
                <insert-analytics>true</insert-analytics>
              </attributes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <additionalparam>--allow-script-in-comments</additionalparam>
              <footer>
                <![CDATA[
                <!-- Global site tag (gtag.js) - Google Analytics -->
                <script async src="https://www.googletagmanager.com/gtag/js?id=UA-1318853-7"></script>
                <script>
                  window.dataLayer = window.dataLayer || [];
                  function gtag(){dataLayer.push(arguments);}
                  gtag('js', new Date());

                  gtag('config', 'UA-1318853-7');
                </script>
                ]]>]
              </footer>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.0.0-M1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctor-maven-plugin</artifactId>
        <version>${asciidoctor.version}</version>
        <executions>
          <execution>
            <id>output-html</id>
            <configuration>
              <sourceDocumentName>index.adoc</sourceDocumentName>
              <backend>html5</backend>
              <sourceHighlighter>highlightjs</sourceHighlighter>
              <attributes>
                <toc>left</toc>
                <highlightjs-theme>github</highlightjs-theme>
                <sectanchors />
                <icons>font</icons>
                <sectnums />
                <testDir>${project.build.testSourceDirectory}</testDir>
                <revnumber>${project.version}</revnumber>
              </attributes>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
          <testSource>1.8</testSource>
          <testTarget>1.8</testTarget>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <version>1.15</version>
        <configuration>
          <signature>
            <groupId>org.codehaus.mojo.signature</groupId>
            <artifactId>java17</artifactId>
            <version>1.0</version>
          </signature>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.9.5</version>
          </dependency>
        </dependencies>
      </plugin>

    </plugins>
  </build>


  <dependencies>

    <dependency>
      <groupId>net.ttddyy</groupId>
      <artifactId>datasource-proxy</artifactId>
      <version>${datasource-proxy.version}</version>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>java-hamcrest</artifactId>
      <version>${hamcrest.version}</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <optional>true</optional>
    </dependency>


    <!-- For Test -->
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>${hsqldb.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-core</artifactId>
      <version>${flyway.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit4.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
      <scope>test</scope>
    </dependency>

  </dependencies>

</project>
