<?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>io.extremum</groupId>
    <artifactId>extremum-common-project</artifactId>
    <packaging>pom</packaging>
    <version>${extremum.version}</version>
    <name>Root extremum-common POM</name>
    <description>This POM serves as a root of extremum-common multimodule project. Also, it defines release-related
        settings (scm and distributionManagement).
        You almost never need to use this module as a parent.
        If you need to add a new module to extremum-common, please choose extremum-module-parent as its parent.
        If want to have some extremum parent as a parent of your application, please use extremum-app-parent.
    </description>

    <url>https://github.com/smekalka/extremum-common-java</url>
    <inceptionYear>2022</inceptionYear>
    <scm>
        <connection>scm:https://github.com/smekalka/extremum-common-java.git</connection>
        <developerConnection>scm:git://github.com/smekalka/extremum-common-java.git</developerConnection>
        <url>https://github.com/smekalka/extremum-common-java</url>
    </scm>
    <licenses>
        <license>
            <name>Business Source License 1.1</name>
            <url>https://github.com/smekalka/extremum-common-java/blob/develop/LICENSE.md</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>urgimchak</id>
            <name>Maksim Tyutyaev</name>
            <email>maksim.tyutyaev@smekalka.com</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
        <extremum.version>3.0.0</extremum.version>
    </properties>
    <modules>
        <module>extremum-bom</module>
        <module>extremum-module-parent</module>
        <module>extremum-app-parent</module>
        <module>extremum-shared-models</module>
        <module>authentication-api</module>
        <module>extremum-test-harness</module>
        <module>extremum-mongo-db-factory</module>
        <module>extremum-descriptors</module>
        <module>extremum-common-starter</module>
        <module>extremum-core-test</module>
        <module>extremum-security</module>
        <module>extremum-jpa-starter</module>
        <module>extremum-everything-core</module>
        <module>extremum-everything-starter</module>
        <module>extremum-everything-reactive-starter</module>
        <module>extremum-watch-starter</module>
        <module>extremum-batch-service</module>
        <module>extremum-jackson-mapper</module>
        <module>extremum-annotations</module>
        <module>extremum-everything-dynamic</module>
        <module>extremum-shared-models-grpc</module>
        <module>extremum-datetime</module>
        <module>extremum-rdf</module>
        <module>extremum-model-starter</module>
        <module>extremum-graphql-starter</module>
        <module>extremum-sku</module>
        <module>extremum-tx-starter</module>
    </modules>

    <pluginRepositories>
        <pluginRepository>
            <id>jfrog-plugins-release</id>
            <name>plugins-release</name>
            <url>https://oss.jfrog.org/artifactory/plugins-release</url>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.3.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.13</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.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>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
            <plugin>
                <groupId>org.jfrog.buildinfo</groupId>
                <artifactId>artifactory-maven-plugin</artifactId>
                <version>3.2.3</version>
                <executions>
                    <execution>
                        <id>build-info</id>
                        <goals>
                            <goal>publish</goal>
                        </goals>
                        <configuration>
                            <deployProperties>
                                <gradle>awesome</gradle>
                            </deployProperties>
                            <artifactory>
                                <includeEnvVars>true</includeEnvVars>
                                <envVarsExcludePatterns>*password*,*secret*,*key*,*token*,*passphrase*</envVarsExcludePatterns>
                                <timeoutSec>60</timeoutSec>
                            </artifactory>
                            <publisher>
                                <contextUrl>${artifactoryUrl}</contextUrl>
                                <username>${username}</username>
                                <password>${password}</password>
                                <excludePatterns>*-tests.jar</excludePatterns>
                                <repoKey>extremum-releases</repoKey>
                                <snapshotRepoKey>extremum-snapshots</snapshotRepoKey>
                            </publisher>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>flatten-maven-plugin</artifactId>
                <version>1.1.0</version>
                <configuration>
                    <updatePomFile>true</updatePomFile>
                    <flattenMode>resolveCiFriendliesOnly</flattenMode>
                </configuration>
                <executions>
                    <execution>
                        <id>flatten</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>flatten.clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
