<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.bytesgo</groupId>
    <artifactId>parent</artifactId>
    <version>4</version>
  </parent>
  <groupId>com.github.leeyazhou</groupId>
  <artifactId>code-style</artifactId>
  <version>2.0.0</version>
  <name>${project.artifactId}</name>
  <description>bytesgo parent</description>
  <url>https://github.com/${github.org}/${github.repo}.git</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>leeyazhou</id>
      <name>leeyazhou</name>
      <email>coderhook@gmail.com</email>
    </developer>
  </developers>
  <contributors>
    <contributor>
      <name>leeyazhou</name>
      <email>coderhook@gmail.com</email>
      <url>github.com/bytesgo</url>
    </contributor>
  </contributors>
  <scm>
    <connection>scm:git:git@github.com:${github.org}/${github.repo}.git</connection>
    <developerConnection>scm:git:git@github.com:${github.org}/${github.repo}.git</developerConnection>
    <tag>HEAD</tag>
    <url>git@github.com:${github.org}/${github.repo}.git</url>
  </scm>
  <issueManagement>
    <system>github-issue</system>
    <url>https://github.com/${github.org}/${github.repo}/issues</url>
  </issueManagement>
  <ciManagement>
    <system>travis-ci</system>
    <url>https://travis-ci.org/${github.org}/${github.repo}</url>
  </ciManagement>

  <properties>
    <github.org>leeyazhou</github.org>
    <github.repo>code-style</github.repo>
    <jdk.version>1.8</jdk.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <profiles>
    <profile>
      <id>release</id>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <configuration>
              <attach>true</attach>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                  <goal>aggregate</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <charset>${project.build.sourceEncoding}</charset>
                  <encoding>${project.build.sourceEncoding}</encoding>
                  <docencoding>${project.build.sourceEncoding}</docencoding>
                  <additionalJOption>-Xdoclint:none</additionalJOption>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <!--
					                  <executable>${gpg.executable}</executable>
					                  <passphrase>${gpg.passphrase}</passphrase>
					                -->
                  <!-- Prevent `gpg` from using pinentry
									programs -->
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </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>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
