<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>

    <modules>
        <module>tiny-event-sourcing-lib</module>
        <module>tiny-mongo-event-store</module>
        <module>tiny-event-sourcing-spring-boot-starter</module>
        <module>tiny-mongo-event-store-spring-boot-starter</module>
        <module>tiny-event-sourcing-spring-app</module>
        <module>tiny-postgresql-event-store</module>
        <module>tiny-postgres-event-store-spring-boot-starter</module>
        <module>tiny-event-sourcing-app</module>
        <module>tiny-event-sourcing-app-base</module>
    </modules>

    <name>tiny-event-sourcing</name>
    <description>Tiny event sourcing framework</description>
    <developers>
        <developer>
            <name>
                Andrey Sukhovitsky
            </name>
        </developer>
    </developers>

    <url>https://github.com/andrsuh/tiny-event-sourcing/tree/master-2.0/tiny-event-sourcing-lib</url>

    <scm>
        <connection>scm:git:git://github.com/andrsuh/tiny-event-sourcing.git</connection>
        <developerConnection>scm:git:ssh://github.com:andrsuh/tiny-event-sourcing.git</developerConnection>
        <url>https://github.com/andrsuh/tiny-event-sourcing/tree/master-2.0/tiny-event-sourcing-lib</url>
    </scm>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <groupId>ru.quipy</groupId>
    <artifactId>tiny-event-sourcing</artifactId>
    <version>2.7.5</version>

    <properties>
        <java.version>11</java.version>
        <git.username>andrsuh</git.username>
        <git.repo>tiny-event-sourcing</git.repo>
        <kotlin.version>2.1.21</kotlin.version>
        <kotlinx-coroutines-core.version>1.9.0</kotlinx-coroutines-core.version>
        <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
        <jackson-module-kotlin.version>2.18.4</jackson-module-kotlin.version>
    </properties>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.8.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>


                    <plugin>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>default-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>javadoc-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>javadoc</classifier>
                                </configuration>
                            </execution>
                            <execution>
                                <id>sources-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>sources</classifier>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</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>
                                <phase>package</phase>
                                <configuration>
                                    <show>public</show>
                                    <failOnError>false</failOnError>
                                    <detectOfflineLinks>false</detectOfflineLinks>
                                    <doclint>all,-missing</doclint>
                                    <nohelp>true</nohelp>
                                    <excludePackageNames>*.internal.*,testutil,demo</excludePackageNames>
                                    <quiet>true</quiet>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <failOnError>false</failOnError>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
