<?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.alapierre.ksef</groupId>
    <artifactId>ksef-java</artifactId>

    <version>2.0.25</version>

    <name>KSeF Java Rest Client</name>
    <description>Krajowy System eFaktur Rest API Java Klient</description>
    <url>https://github.com/alapierre/ksef-java-rest-client</url>

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

    <developers>
        <developer>
            <name>Adrian Lapierre</name>
            <email>al@alapierre.io</email>
        </developer>
        <developer>
            <name>Karol Bryzgiel</name>
            <email>karol.bryzgiel@soft-project.pl</email>
        </developer>
        <developer>
            <name>Michał Domański</name>
        </developer>
        <developer>
            <name>Robert Bartosiak</name>
        </developer>

    </developers>

    <scm>
        <connection>scm:git:git@github.com:alapierre/ksef-java-rest-client.git</connection>
        <developerConnection>scm:git:git@github.com:alapierre/ksef-java-rest-client.git</developerConnection>
        <url>https://github.com/alapierre/ksef-java-rest-client</url>
      <tag>2.0.25</tag>
  </scm>

    <modules>
        <module>ksef-api-metadata</module>
        <module>ksef-client-spec</module>
        <module>ksef-client-okhttp</module>
        <module>ksef-api</module>
        <module>ksef-json-serializer-gson</module>
        <module>ksef-json-serializer-jackson</module>
        <module>ksef-client-jdk11-http-client</module>
        <module>ksef-token-facade</module>
        <module>ksef-dss-facade</module>
        <module>ksef-test-common</module>
        <module>ksef-sample</module>
        <module>ksef-xml-model</module>
        <module>ksef-qr</module>
    </modules>
    <packaging>pom</packaging>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.release>11</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <annotations.version>24.1.0</annotations.version>
        <lombok.version>1.18.30</lombok.version>
        <slf4j-api.version>2.0.10</slf4j-api.version>
        <logback-classic.version>1.4.14</logback-classic.version>
        <okhttp.version>4.12.0</okhttp.version>
        <gson.version>2.10.1</gson.version>
        <junit-jupiter-api.version>5.10.1</junit-jupiter-api.version>
        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
        <jackson-databind.version>2.16.1</jackson-databind.version>
        <sonar.organization>alapierre</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.scanner.force-deprecated-java-version>true</sonar.scanner.force-deprecated-java-version>
        <common-utils.version>1.15</common-utils.version>
        <crypto-utils.version>1.15</crypto-utils.version>
        <mockserver.version>5.14.0</mockserver.version>
        <jaxb-runtime.version>4.0.2</jaxb-runtime.version>
    </properties>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>

            <plugin>
                <groupId>se.eris</groupId>
                <artifactId>notnull-instrumenter-maven-plugin</artifactId>
                <version>1.1.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>instrument</goal>
                            <goal>tests-instrument</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains</groupId>
                        <artifactId>annotations</artifactId>
                        <version>${annotations.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.13.0</version>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-api</artifactId>
                        <version>1.13.0</version>
                    </dependency>

                </dependencies>
            </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>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.12.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.4.2</version>
            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                    </configuration>
                    <version>3.11.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j-api.version}</version>
            </dependency>

            <dependency>
                <artifactId>logback-classic</artifactId>
                <groupId>ch.qos.logback</groupId>
                <optional>true</optional>
                <version>${logback-classic.version}</version>
            </dependency>

            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>${okhttp.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>

            <dependency>
                <groupId>org.jetbrains</groupId>
                <artifactId>annotations</artifactId>
                <version>${annotations.version}</version>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit-jupiter-api.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>2.2</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit-jupiter-api.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>io.alapierre.commons</groupId>
                <artifactId>io-utils</artifactId>
                <version>${common-utils.version}</version>
            </dependency>
            <dependency>
                <groupId>io.alapierre.commons</groupId>
                <artifactId>xml-utils</artifactId>
                <version>${common-utils.version}</version>
            </dependency>
            <dependency>
                <groupId>io.alapierre.crypto</groupId>
                <artifactId>digital-signature</artifactId>
                <version>${crypto-utils.version}</version>
            </dependency>
            <dependency>
                <groupId>io.alapierre.commons</groupId>
                <artifactId>date-utils</artifactId>
                <version>${common-utils.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>4.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>5.10.1</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <profiles>
        <!-- GPG Signature on release -->
        <profile>
            <id>release-sign-artifacts</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.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>sonatype-snapshots</id>
            <name>sonatype snapshots maven repository</name>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>

    <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>

</project>
