<?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>

  <parent>
    <groupId>org.codeprimate</groupId>
    <artifactId>cp-core</artifactId>
    <version>1.2.0.RELEASE</version>
  </parent>

  <artifactId>cp-elements</artifactId>
  <version>1.0.0.M5</version>
  <packaging>jar</packaging>

  <name>cp-elements</name>
  <description>
    'Codeprimate Elements' (a.k.a. cp-elements, or Elements) is a Java class library and micro-framework that simplifies 
    the development of software applications written in Java.  Elements packages several APIs in one library in order to 
    address various application concerns and aspects of software development collectively.  Elememts is a highly simple, 
    yet robust and proven library built on solid OO principles, design patterns and best practices effectively solving 
    common and reoccuring problems in software development. 
  </description>
  <inceptionYear>2011</inceptionYear>
  <url>http://www.codeprimate.org/projects/cp-elements</url>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <comments>
        Copyright 2016-Present Author or Authors.

        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.
      </comments>
    </license>
  </licenses>

  <organization>
    <name>Codeprimate, LLC</name>
    <url>http://www.codeprimate.org/</url>
  </organization>

  <developers>
    <developer>
      <id>jblum</id>
      <name>John J. Blum</name>
      <email>john dot blum at codeprimate dot org</email>
      <organization>Codeprimate, LLC.</organization>
      <organizationUrl>http://www.codeprimate.org</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:codeprimate-software/cp-elements.git</connection>
    <developerConnection>scm:git:git@github.com:codeprimate-software/cp-elements.git</developerConnection>
    <url>https://github.com/codeprimate-software/cp-elements</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/codeprimate-software/cp-elements/issues</url>
  </issueManagement>

  <properties>
    <build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
    <maven-changelog-plugin.version>2.3</maven-changelog-plugin.version>
    <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.sun.tools</groupId>
      <artifactId>attach-api</artifactId>
      <version>${java.version}</version>
      <optional>true</optional>
      <scope>system</scope>
      <systemPath>${java.home}/../lib/tools.jar</systemPath>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctor-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.cp.elements.ElementsVersion</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>prepare-release</id>
      <!-- $ mvn -P prepare-release install site -->
      <properties>
        <skipTests>false</skipTests>
      </properties>
      <reporting>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-changelog-plugin</artifactId>
            <version>${maven-changelog-plugin.version}</version>
            <reportSets>
              <reportSet>
                <id>all-reports</id>
                <configuration>
                  <type>date</type>
                  <dates>
                    <date implementation="java.lang.String">2018-01-22</date>
                    <date implementation="java.lang.String">2018-07-12</date>
                  </dates>
                  <dateFormat>yyyy-MM-dd</dateFormat>
                </configuration>
                <reports>
                  <report>changelog</report>
                  <report>dev-activity</report>
                  <report>file-activity</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>${build-helper-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-artifacts</id>
                <phase>package</phase>
                <goals>
                  <goal>attach-artifact</goal>
                </goals>
                <configuration>
                  <artifacts>
                    <artifact>
                      <file>${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar</file>
                      <type>jar</type>
                      <classifier>javadoc</classifier>
                    </artifact>
                    <artifact>
                      <file>${project.build.directory}/${project.artifactId}-${project.version}-sources.jar</file>
                      <type>jar</type>
                      <classifier>sources</classifier>
                    </artifact>
                  </artifacts>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
