<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2016 HandcraftedBits

  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.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>com.handcraftedbits</groupId>
  <artifactId>handcraftedbits-license</artifactId>
  <packaging>jar</packaging>
  <name>HandcraftedBits License Header Support</name>
  <description>Support files and code for default HandcraftedBits license headers</description>
  <url>https://github.com/handcraftedbits/handcraftedbits-license</url>
  <version>1.0.2</version>
  <inceptionYear>2016</inceptionYear>
  
  <developers>
    <developer>
      <name>Curtiss Howard</name>
      <email>opensource@handcraftedbits.com</email>
      <organization>HandcraftedBits</organization>
      <organizationUrl>https://github.com/handcraftedbits</organizationUrl>
    </developer>
  </developers>
  <organization>
    <name>HandcraftedBits</name>
    <url>https://github.com/handcraftedbits</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  
  <scm>
    <url>https://github.com/handcraftedbits/handcraftedbits-license</url>
    <connection>scm:git:git://github.com/handcraftedbits/handcraftedbits-license.git</connection>
    <developerConnection>
      scm:git:git@github.com:handcraftedbits/handcraftedbits-license.git
    </developerConnection>
  </scm>
  <issueManagement>
    <url>https://github.com/handcraftedbits/handcraftedbits-license/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>
  
  <properties>
    <javadoc.excludedPackages></javadoc.excludedPackages>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.java>1.8</version.java>
    
    <version.dep.license>2.11</version.dep.license>
    
    <version.plugin.compiler>3.3</version.plugin.compiler>
    <version.plugin.gpg>1.6</version.plugin.gpg>
    <version.plugin.javadoc>2.10.3</version.plugin.javadoc>
    <version.plugin.nexus-staging>1.6.5</version.plugin.nexus-staging>
    <version.plugin.source>2.4</version.plugin.source>
  </properties>
  
  <dependencies>
    <dependency>
      <groupId>com.mycila</groupId>
      <artifactId>license-maven-plugin</artifactId>
      <version>${version.dep.license}</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  
  <profiles>
    <!-- Basic settings for Java projects. -->
    <profile>
      <id>java-project</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <file>
          <exists>${basedir}/src/main/java</exists>
        </file>
      </activation>

      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>${version.plugin.compiler}</version>
              <configuration>
                <source>${version.java}</source>
                <target>${version.java}</target>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    
    <!-- Release/deploy to Maven Central -->
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${version.plugin.gpg}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${version.plugin.javadoc}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalparam>-Xdoclint:none</additionalparam>
                  <excludePackageNames>${javadoc.excludedPackages}</excludePackageNames>
                  <links>
                    <link>https://docs.oracle.com/javaee/7/api/</link>
                  </links>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${version.plugin.source}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${version.plugin.nexus-staging}</version>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>

      <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>
    </profile>
  </profiles>
</project>
