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

    <groupId>org.assertstruct</groupId>
    <artifactId>assertstruct-root</artifactId>
    <version>0.9.1</version>
    <packaging>pom</packaging>

    <name>assertStruct</name>
    <description>AssertStruct is a library to simplify validating complex data structure including hierarchy of POJO
        objects.
    </description>
    <url>https://github.com/borstep/assertStruct</url>
    <inceptionYear>2024</inceptionYear>

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

    <developers>
        <developer>
            <id>borstep</id>
            <name>Boris Stepchenko</name>
            <email>assertstruct@gmail.com</email>
            <organization>InfoTechnoService Ltd</organization>
            <organizationUrl>https://www.its.kiev.ua</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:https://github.com/borstep/assertStruct.git</connection>
        <developerConnection>scm:git:git@github.com:borstep/assertStruct.git</developerConnection>
        <url>https://github.com/borstep/assertStruct/tree/main</url>
      <tag>release/0.9.1</tag>
  </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>central</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>central</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <lombok.version>1.18.34</lombok.version>
        <junit.version>5.10.3</junit.version>
        <jackson.version>2.17.1</jackson.version>
    </properties>


    <modules>
        <module>core</module>
        <module>examples</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <releaseProfiles>release,sign</releaseProfiles>
                    <tagNameFormat>release/@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <pushChanges>false</pushChanges>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.8.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.5.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>sign</id>
<!--            <activation>-->
<!--                <property>-->
<!--                    <name>performRelease</name>-->
<!--                    <value>true</value>-->
<!--                </property>-->
<!--            </activation>-->
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
<!--                        <version>3.2.4</version>-->
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>borstep@gmail.com</keyname>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

<!--

        TODO POM File Enhancements

        Licensing: Crucial for open-source projects. Include the license details.
        Distribution Management: Specify where your artifacts will be deployed (Maven Central).
        Developer Information: Add your name, contact, etc.
        SCM: Link to your project's Git repository.
        Source and Javadoc Plugins: Essential for generating and attaching source and Javadoc JARs for better usability.
        gpg Plugin: Necessary for signing artifacts for Maven Central.
        XML
        -->
