<?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>de.ferderer</groupId>
    <artifactId>response-entity-matchers</artifactId>
    <version>1.1.0</version>
    <packaging>jar</packaging>

    <name>ResponseEntity-Matchers</name>
    <description>Integration testing matchers for Spring's ResponseEntity</description>
    <url>https://github.com/ferderer/response-entity-matchers</url>
    <inceptionYear>2023</inceptionYear>

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

    <developers>
        <developer>
            <name>Vadim Ferderer</name>
            <email>github87f3@ferderer.de</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/ferderer/response-entity-matchers.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/ferderer/response-entity-matchers.git</developerConnection>
        <url>https://github.com/ferderer/response-entity-matchers</url>
    </scm>

    <distributionManagement>
        <repository>
            <id>central</id>
            <name>Maven Central</name>
            <url>https://central.sonatype.com/api/v1/publisher/upload</url>
        </repository>
        <snapshotRepository>
            <id>central</id>
            <name>Maven Central Snapshots</name>
            <url>https://central.sonatype.com/api/v1/publisher/upload</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>

        <spring-boot.version>3.5.11</spring-boot.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>

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

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
        </dependency>

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

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>

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

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

        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path-assert</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.xmlunit</groupId>
            <artifactId>xmlunit-core</artifactId>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.7.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.14.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.9.0</version>
                </plugin>

                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.4</version>
                </plugin>

                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.5.3</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.4</version>
                </plugin>

                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                </plugin>

                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.3</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <additionalOptions>-Xdoclint:none</additionalOptions>
                        <additionalJOption>-Xdoclint:none</additionalJOption>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <tagNameFormat>@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>

                <plugin>
                    <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>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.12.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.4</version>
                </plugin>

                <plugin>
                    <groupId>net.nicoulaj.maven.plugins</groupId>
                    <artifactId>checksum-maven-plugin</artifactId>
                    <version>1.11</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>artifacts</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <appendFilename>true</appendFilename>
                        <algorithms>
                            <algorithm>SHA-256</algorithm>
                            <algorithm>SHA-512</algorithm>
                        </algorithms>
                        <fileSets>
                            <fileSet>
                                <includes>
                                    <include>*.jar</include>
                                    <include>*.pom</include>
                                </includes>
                            </fileSet>
                        </fileSets>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.13</version>
                    <configuration>
                        <skip>${maven.test.skip}</skip>
                        <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
                        <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
                        <output>file</output>
                        <append>true</append>
                        <excludes>
                            <exclude>*MethodAccess</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>jacoco-initialize</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                            <phase>test-compile</phase>
                        </execution>
                        <execution>
                            <id>jacoco-site</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.simplify4u.plugins</groupId>
                    <artifactId>sign-maven-plugin</artifactId>
                    <version>1.1.0</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>0.10.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>central</publishingServerId>
                        <autoPublish>true</autoPublish>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.simplify4u.plugins</groupId>
                        <artifactId>sign-maven-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>net.nicoulaj.maven.plugins</groupId>
                        <artifactId>checksum-maven-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
