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

    <groupId>ru.spb.tksoft</groupId>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>tk-common-controller-advice</artifactId>
    <name>tk-common-controller-advice</name>
    <version>2.0.5</version>
    <url>https://github.com/taker1974/tk-common-controller-advice</url>
    <description>Common controller advice.</description>

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

    <developers>
        <developer>
            <name>Konstantin Terskikh</name>
            <email>kostus.online.1974@yandex.ru</email>
            <organization>TKSoft</organization>
            <organizationUrl>https://tksoft.spb.ru</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:taker1974/tk-common-controller-advice.git</connection>
        <developerConnection>scm:git:ssh://github.com:taker1974/tk-common-controller-advice.git</developerConnection>
        <url>https://github.com/taker1974/tk-common-controller-advice/tree/main</url>
    </scm>

    <properties>
        <java.version>21</java.version>

        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <spring-boot.version>3.5.6</spring-boot.version>
        <jakarta-validation.version>3.1.1</jakarta-validation.version>
        <swagger.version>2.2.37</swagger.version>
        <tk-log-utils.version>2.0.2</tk-log-utils.version>
        <maven-compiler.version>3.11.0</maven-compiler.version>
        <maven-jar.version>3.4.0</maven-jar.version>
        <maven-source.version>3.3.1</maven-source.version>
        <maven-javadoc.version>3.6.2</maven-javadoc.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring-boot.version}</version>
        </dependency>

        <dependency>
            <groupId>jakarta.validation</groupId>
            <artifactId>jakarta.validation-api</artifactId>
            <version>${jakarta-validation.version}</version>
        </dependency>

        <!-- Swagger/OpenAPI annotations -->
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>${swagger.version}</version>
        </dependency>

        <!-- Internal dependencies -->
        <dependency>
            <groupId>ru.spb.tksoft</groupId>
            <artifactId>tk-log-utils</artifactId>
            <version>${tk-log-utils.version}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar.version}</version>
            </plugin>

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

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc.version}</version>
                <configuration>
                    <doclint>none</doclint>
                    <encoding>UTF-8</encoding>
                    <charset>UTF-8</charset>
                </configuration>
                <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>3.1.0</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.6.0</version>
                <extensions>true</extensions>
                <configuration>
                    <autoPublish>true</autoPublish>
                    <waitUntil>published</waitUntil>
                </configuration>
            </plugin>
        </plugins>
    </build>

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

</project>