<?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">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.microbean</groupId>
  <artifactId>microbean-parent-pom</artifactId>
  <version>19</version>
  <packaging>pom</packaging>

  <name>microBean™: Parent POM</name>
  <description>${project.name}</description>
  <inceptionYear>2019</inceptionYear>
  <url>https://microbean.github.io/microbean-parent/</url>

  <organization>
    <name>microBean™</name>
    <url>http://microbean.systems/</url>
  </organization>

  <licenses>
    <license>
      <comments>The Apache License, Version 2.0</comments>
      <distribution>repo</distribution>
      <name>Apache License 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:microbean/microbean-parent.git</connection>
    <developerConnection>scm:git:git@github.com:microbean/microbean-parent.git</developerConnection>
    <url>https://github.com/microbean/microbean-parent/</url>
    <tag>microbean-parent-pom-19</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-oss-repository-hosting</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <developers>
    <developer>
      <id>ljnelson</id>
      <name>Laird Nelson</name>
      <email>ljnelson@gmail.com</email>
      <url>https://about.me/lairdnelson</url>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-8</timezone>
    </developer>
  </developers>

  <issueManagement>
    <system>Github</system>
    <url>https://github.com/microbean/microbean-parent/issues</url>
  </issueManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
          <configuration>
            <filesets>
              <fileset>
                <directory>${basedir}</directory>
                <includes>
                  <include>src/**/*~</include>
                  <include>*~</include>
                </includes>
              </fileset>
            </filesets>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.1.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>3.0.0-M4</version> <!-- see https://issues.apache.org/jira/browse/MRELEASE-1038 -->
        </plugin>
        <plugin>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.12.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.9.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.3.1</version>
          <configuration>
            <additionalJOptions combine.children="append">
              <additionalJOption>-J-Dhttp.agent=maven-javadoc-plugin</additionalJOption>
            </additionalJOptions>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.8</version>
          <extensions>true</extensions>
          <dependencies>
            <!-- https://issues.sonatype.org/browse/NEXUS-26993?focusedCommentId=1098136&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1098136 -->
            <dependency>
              <groupId>com.thoughtworks.xstream</groupId>
              <artifactId>xstream</artifactId>
              <version>1.4.15</version>
            </dependency>
          </dependencies>
          <configuration>
            <serverId>sonatype-oss-repository-hosting</serverId>
            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <properties>

    <!-- maven-compiler-plugin properties -->
    <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
    <maven.compiler.showWarnings>true</maven.compiler.showWarnings>

    <!-- maven-release-plugin properties -->
    <goals>deploy</goals>
    <!-- See http://central.sonatype.org/pages/apache-maven.html#performing-a-release-deployment-with-the-maven-release-plugin -->
    <releaseProfiles>deployment</releaseProfiles>
    <useReleaseProfile>false</useReleaseProfile>

    <!-- maven-resource-plugin properties -->
    <maven.resource.escapeString>\</maven.resource.escapeString>

    <!-- nexus-staging-maven-plugin properties -->
    <!-- See https://github.com/sonatype/nexus-maven-plugins/blob/0aee3defb33cb133ff536aba59b11d32a368b1e6/staging/maven-plugin/src/main/java/org/sonatype/nexus/maven/staging/AbstractStagingMojo.java#L169-L175 -->
    <stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>

    <!-- Other properties -->
    <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF8</project.reporting.outputEncoding>

  </properties>

  <profiles>
    <profile>
      <id>deployment</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
