<!--
  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>

  <groupId>jp.co.yahoo.yosegi</groupId>
  <artifactId>yosegi-hive</artifactId>
  <version>0.9.0</version>
  <packaging>jar</packaging>
  <name>Yosegi Hive</name>
  <description>Yosegi Hive library.</description>
  <url>https://github.com/yahoojapan/yosegi-hive</url>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:yahoojapan/yosegi-hive.git</connection>
    <developerConnection>scm:git:git@github.com:yahoojapan/yosegi-hive.git</developerConnection>
    <url>scm:git:https://github.com/yahoojapan/yosegi-hive</url>
    <tag>HEAD</tag>
  </scm>

  <organization>
    <name>Yahoo Japan Corporation</name>
    <url>https://www.yahoo.co.jp/</url>
  </organization>

  <developers>
    <developer>
      <id>koijima</id>
      <name>Koji Ijima</name>
      <organization>Yahoo Japan Corporation</organization>
    </developer>
    <developer>
      <id>yoto</id>
      <name>Yasunori Ohto</name>
      <organization>Yahoo Japan Corporation</organization>
    </developer>
  </developers>

  <properties>
    <configlibVersion>1.2.1.1</configlibVersion>
    <schemalibVersion>1.2.4_hive-1.2.1000.2.6.4.0-91</schemalibVersion>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <target_jdk_version>1.8</target_jdk_version>
    <maven-surefire-plugin.version>3.0.0-M2</maven-surefire-plugin.version>
    <maven-surefire-report-plugin.version>${maven-surefire-plugin.version}</maven-surefire-report-plugin.version>
    <maven-clover2-plugin.version>4.0.6</maven-clover2-plugin.version>
    <buildtype>test</buildtype>
    <spotbugs-maven-plugin.version>3.1.8</spotbugs-maven-plugin.version>
    <spotbugs.version>3.1.9</spotbugs.version>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>2.7.3</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-exec</artifactId>
      <version>1.2.1000.2.6.4.0-91</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.9.8</version>
      <scope>test</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>jp.co.yahoo.yosegi</groupId>
      <artifactId>yosegi</artifactId>
      <version>0.9.0</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.3.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.3.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>5.3.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <useSystemClassLoader>false</useSystemClassLoader>
          <forkCount>2</forkCount>
          <reuseForks>true</reuseForks>
          <argLine>-Xmx1536m -XX:MaxPermSize=512m</argLine>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.3.2</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.1</version>
        <configuration>
          <show>package</show>
          <source>1.8</source>
          <encoding>UTF-8</encoding>
          <docencoding>UTF-8</docencoding>
          <charset>UTF-8</charset>
          <links>
            <link>http://docs.oracle.com/javase/8/docs/api/</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</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>

      <plugin>
        <groupId>org.apache.rat</groupId>
        <version>0.13</version>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*.json</exclude>
            <exclude>**/*.txt</exclude>
            <exclude>.gitignore</exclude>
            <exclude>.circleci/config.yml</exclude>
            <exclude>.github/PULL_REQUEST_TEMPLATE.md</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <configLocation>google_checks.xml</configLocation>
          <violationSeverity>warning</violationSeverity>
          <encoding>UTF-8</encoding>
          <consoleOutput>false</consoleOutput>
          <outputFile>${project.build.directory}/site/checkstyle/checkstyle-result.xml</outputFile>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>hdp</id>
      <url> http://repo.hortonworks.com/content/repositories/releases</url>
      <name>HDP</name>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>spring</id>
      <url>http://repo.spring.io/plugins-release/</url>
      <name>SPRING</name>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>${spotbugs-maven-plugin.version}</version>
      </plugin>
    </plugins>
  </reporting>

</project>
