<!--suppress MavenModelInspection -->
<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>

    <groupId>ru.easydonate.easydonate4j</groupId>
    <artifactId>parent</artifactId>
    <version>2.0.2</version>
    <packaging>pom</packaging>

    <name>EasyDonate4J</name>
    <description>The official SDK for the EasyDonate payments system written on Java</description>
    <url>https://github.com/SoKnight/EasyDonate4J/</url>

    <organization>
        <name>EasyDonate</name>
        <url>https://easydonate.ru/</url>
    </organization>

    <scm>
        <connection>scm:git:git://github.com/SoKnight/EasyDonate4J.git</connection>
        <developerConnection>scm:git:ssh://github.com:SoKnight/EasyDonate4J.git</developerConnection>
        <url>http://github.com/SoKnight/EasyDonate4J/tree/master</url>
    </scm>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/SoKnight/EasyDonate4J/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <id>soknight</id>
            <name>SoKnight</name>
            <url>https://soknight.me/</url>
            <organization>EasyDonate</organization>
            <organizationUrl>https://easydonate.ru/</organizationUrl>
        </developer>
    </developers>

    <modules>
        <!-- API versions implementations -->
        <module>api-v3</module>

        <!-- Callback API implementation -->
        <module>callback-api</module>

        <!-- Core module providing any other implementations -->
        <module>core</module>

        <!-- JSON serialization providers -->
        <module>json-providers/gson-json-provider</module>
        <module>json-providers/jackson-json-provider</module>

        <!-- HTTP client implementations -->
        <module>http-clients/apache-http-client</module>
        <module>http-clients/okhttp3-http-client</module>
        <module>http-clients/jdk-legacy-http-client</module>
        <module>http-clients/jdk-modern-http-client</module>

        <!-- Testing framework -->
        <module>testing</module>
    </modules>

    <properties>
        <!-- Building -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>8</java.version>

        <!-- Core libs versions -->
        <apache.http.client.version>5.1</apache.http.client.version>
        <okhttp3.version>4.9.0</okhttp3.version>
        <gson.version>2.8.9</gson.version>
        <jackson.version>2.12.0</jackson.version>

        <!-- Additional libs versions -->
        <commons.lang.version>3.11</commons.lang.version>
        <jetbrains.annotations.version>22.0.0</jetbrains.annotations.version>
        <lombok.version>1.18.22</lombok.version>

        <!-- Maven plugins -->
        <maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
        <nexus.staging.maven.plugin.version>1.6.8</nexus.staging.maven.plugin.version>
        <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
        <maven.javadoc.plugin.version>3.3.1</maven.javadoc.plugin.version>
        <maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>
        <maven.shade.plugin.version>3.2.4</maven.shade.plugin.version>
    </properties>

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

    <dependencyManagement>
        <dependencies>
            <!-- Core module -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>core</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- API v3 Implementation -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>api-v3</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Callback API Implementation -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>callback-api</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Apache HTTP Client Implementation -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>apache-http-client</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- JDK Legacy HTTP Client Implementation -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>jdk-legacy-http-client</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- JDK Modern HTTP Client Implementation -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>jdk-modern-http-client</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- OkHttp3 HTTP Client Implementation -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>okhttp3-http-client</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- GSON JSON Serialization Provider -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>gson-json-provider</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Jackson JSON Serialization Provider -->
            <dependency>
                <groupId>ru.easydonate.easydonate4j</groupId>
                <artifactId>jackson-json-provider</artifactId>
                <version>${project.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Apache HTTP Client -->
            <dependency>
                <groupId>org.apache.httpcomponents.client5</groupId>
                <artifactId>httpclient5</artifactId>
                <version>${apache.http.client.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- OkHttp 3 -->
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>${okhttp3.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Gson -->
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Jackson Core + Databind + Annotations -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${jackson.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${jackson.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Apache Commons Land 3 -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons.lang.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- JetBrains Annonations -->
            <dependency>
                <groupId>org.jetbrains</groupId>
                <artifactId>annotations</artifactId>
                <version>${jetbrains.annotations.version}</version>
                <scope>compile</scope>
            </dependency>

            <!-- Lombok -->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <build>
        <finalName>easydonate4j-${project.artifactId}-${project.version}</finalName>
        <pluginManagement>
            <plugins>
                <!-- Maven compiler plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.plugin.version}</version>
                    <configuration>
                        <compilerArgs>
                            <arg>-Xlint:deprecation</arg>
                            <arg>-Xlint:unchecked</arg>
                        </compilerArgs>
                        <release>${java.version}</release>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>

                <!-- Nexus staging plugin -->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${nexus.staging.maven.plugin.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>

                <!-- Maven sources plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Maven javadoc plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Maven GPG plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven.gpg.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <configuration>
                                <keyname>${gpg.keyname}</keyname>
                                <passphraseServerId>${gpg.keyname}</passphraseServerId>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!-- Maven shade plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven.shade.plugin.version}</version>
                    <configuration>
                        <createDependencyReducedPom>false</createDependencyReducedPom>
                        <shadedArtifactAttached>true</shadedArtifactAttached>
                        <finalName>easydonate4j-${project.artifactId}-${project.version}-full</finalName>
                        <shadedClassifierName>full</shadedClassifierName>
                        <filters>
                            <filter>
                                <artifact>*:*</artifact>
                                <excludes>
                                    <exclude>module-info.class</exclude>
                                    <exclude>META-INF/maven/</exclude>
                                    <exclude>META-INF/versions/</exclude>
                                    <exclude>META-INF/proguard/</exclude>
                                    <exclude>META-INF/services/</exclude>
                                    <exclude>META-INF/LICENSE</exclude>
                                    <exclude>META-INF/LICENSE.txt</exclude>
                                    <exclude>META-INF/NOTICE</exclude>
                                    <exclude>META-INF/NOTICE.txt</exclude>
                                    <exclude>META-INF/DEPENDENCIES</exclude>
                                    <exclude>META-INF/*.kotlin_module</exclude>
                                    <exclude>META-INF/*.MF</exclude>
                                    <exclude>META-INF/*.SF</exclude>
                                    <exclude>META-INF/*.DSA</exclude>
                                    <exclude>META-INF/*.RSA</exclude>
                                </excludes>
                            </filter>
                        </filters>
                        <relocations>
                            <relocation>
                                <pattern>org.intellij.lang.annotations</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.jetbrains.annotations</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>org.jetbrains.annotations</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.jetbrains.annotations</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>org.apache</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.apache</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>org.slf4j</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.slf4j</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>kotlin</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.kotlin</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>okhttp3</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.okhttp3</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>okio</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.okio</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>com.google.gson</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.gson</shadedPattern>
                            </relocation>
                            <relocation>
                                <pattern>com.fasterxml.jackson</pattern>
                                <shadedPattern>ru.easydonate.easydonate4j.libs.jackson</shadedPattern>
                            </relocation>
                        </relocations>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>