<?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.github.mitsumi-solutions-develop</groupId>
    <artifactId>spring-swagger-mock-server</artifactId>
    <version>1.0.1</version>
    <packaging>jar</packaging>
    <name>spring-swagger-mock-server</name>
    <description>spring swagger mock server</description>
    <url>https://github.com/mitsumi-solutions-develop/spring-swagger-mock-server</url>

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

    <developers>
        <developer>
            <name>mitsumi solutions</name>
            <email>github@mitsumi-solutions.co.jp</email>
            <organization>Mitsumi Solutions</organization>
            <organizationUrl>https://www.mitsumi-solutions.co.jp</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/mitsumi-solutions-develop/spring-swagger-mock-server.git</connection>
        <developerConnection>scm:git:ssh://github.com:mitsumi-solutions-develop/spring-swagger-mock-server.git</developerConnection>
        <url>https://github.com/mitsumi-solutions-develop/spring-swagger-mock-server/tree/main</url>
    </scm>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>4.1.0</version>
    </parent>

    <properties>
        <maven.compiler.source>25</maven.compiler.source>
        <maven.compiler.target>25</maven.compiler.target>
        <java.version>25</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <mitsumi-solutions.java-shared.version>1.0.0</mitsumi-solutions.java-shared.version>

    </properties>
    <distributionManagement>
        <repository>
            <id>central</id>
            <name>Central Repository OSSRH</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.github.mitsumi-solutions-develop</groupId>
            <artifactId>java-shared</artifactId>
            <version>${mitsumi-solutions.java-shared.version}</version>
        </dependency>
    </dependencies>


    <build>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <waitUntil>validated</waitUntil>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.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>3.11.2</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doclint>all,-missing</doclint>
                </configuration>
            </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>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.28.0</version>
                <dependencies>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-core</artifactId>
                        <version>7.25.0</version>
                    </dependency>
                    <dependency>
                        <groupId>net.sourceforge.pmd</groupId>
                        <artifactId>pmd-java</artifactId>
                        <version>7.25.0</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <rulesets>
                        <ruleset>${basedir}/pmd/spring-swagger-mock-server.xml</ruleset>
                    </rulesets>
                    <targetJdk>${java.version}</targetJdk>
                    <failOnViolation>true</failOnViolation>
                    <failurePriority>5</failurePriority>
                    <printFailingErrors>true</printFailingErrors>
                    <verbose>true</verbose>
                    <analysisCache>true</analysisCache>
                </configuration>
                <executions>
                    <execution>
                        <id>PMD</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.15.0</version> <!-- Use a recent version -->
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.18.46</version> <!-- Match your project's Lombok version -->
                        </path>
                        <!-- IMPORTANT: If you use MapStruct, it must be declared HERE right after Lombok -->
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
