<?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.build</groupId>
    <artifactId>maven-build</artifactId>
    <version>2.0.0</version>
  </parent>

  <groupId>org.codeprimate</groupId>
  <artifactId>elements</artifactId>
  <version>2.0.0</version>
  <packaging>jar</packaging>

  <name>Elements</name>
  <description>
    Java Simplified. Extensions and Useful Constructs for the Java Platform.

    Codeprimate Elements (a.k.a. cp-elements) is a Java library and micro-framework used to simplify
    the development of software applications written in Java. Elements packages several APIs into one
    library in order to address various application concerns and aspects of software design and development
    collectively and conveniently. Elements is a highly simple, yet robust and proven library built on
    solid OO principles, software design patterns and best practices to effectively solve common
    and reoccurring problems in software development.

    Write better Java!
  </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 2011-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.org</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.org</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>
    <java-module-name>codeprimate.elements</java-module-name>
    <build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
    <changelog-start-date>2025-03-22</changelog-start-date>
    <changelog-end-date>2025-04-05</changelog-end-date>
    <datafaker.version>2.4.2</datafaker.version>
    <maven-changelog-plugin.version>2.3</maven-changelog-plugin.version>
  </properties>

  <build>
    <plugins>
      <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>
<!--
          <excludes>
            <exclude>**/package-info.class</exclude>
          </excludes>
-->
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.datafaker</groupId>
      <artifactId>datafaker</artifactId>
      <version>${datafaker.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.yaml</groupId>
          <artifactId>snakeyaml</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-core</artifactId>
      <version>${jmh.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-generator-annprocess</artifactId>
      <version>${jmh.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>java24</id>
      <activation>
        <jdk>[24,)</jdk>
      </activation>
      <properties>
        <java.version>24</java.version>
        <maven.compiler.release>${java.version}</maven.compiler.release>
      </properties>
    </profile>
    <profile>
      <id>java23</id>
      <activation>
        <jdk>[23,24)</jdk>
      </activation>
      <properties>
        <java.version>23</java.version>
        <maven.compiler.release>${java.version}</maven.compiler.release>
      </properties>
    </profile>
    <profile>
      <id>java21</id>
      <activation>
        <jdk>[21,23)</jdk>
      </activation>
      <properties>
        <java.version>21</java.version>
        <maven.compiler.release>${java.version}</maven.compiler.release>
      </properties>
    </profile>
    <profile>
      <id>docs</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </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>
