<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.webfuzzing</groupId>
    <artifactId>overlay-jvm</artifactId>

    <version>0.3.0</version>

    <inceptionYear>2026</inceptionYear>
    <name>overlay-jvm</name>
    <description>JVM Library (e.g., for Java and Kotlin) to support OpenAPI Overlay transformations</description>
    <url>https://github.com/WebFuzzing/overlay-jvm</url>
    <packaging>jar</packaging>


    <properties>
        <java.version>1.8</java.version>
        <snackjson.version>4.0.50</snackjson.version>
        <jackson.version>2.14.3</jackson.version>
        <junit.jupiter.version>5.14.3</junit.jupiter.version>
        <junit.platform.version>1.14.3</junit.platform.version>
    </properties>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/WebFuzzing/overlay-jvm/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:https://github.com/WebFuzzing/overlay-jvm.git</connection>
        <developerConnection>scm:git:https://github.com/WebFuzzing/overlay-jvm.git</developerConnection>
        <url>https://github.com/WebFuzzing/overlay-jvm/tree/master</url>
    </scm>

    <developers>
        <developer>
            <id>arcuri82</id>
            <name>Andrea Arcuri</name>
            <email>arcuri82@gmail.com</email>
            <url>http://www.arcuriandrea.org</url>
            <timezone>2</timezone>
            <roles>
                <role>Architect/Developer</role>
            </roles>
        </developer>
    </developers>

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


    <dependencies>
        <!--  Jackson      -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
            <version>${jackson.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.17</version>
            <scope>provided</scope>
        </dependency>

        <!-- To handle RFC9535 JSONPath -->
        <dependency>
            <groupId>org.noear</groupId>
            <artifactId>snack4-jsonpath</artifactId>
            <version>${snackjson.version}</version>
        </dependency>

        <!--
            Popular library, used in  oas-overlay-java, but it is not  RFC9535 compliant
            https://github.com/json-path/JsonPath/issues/999
         -->
<!--        <dependency>-->
<!--            <groupId>com.jayway.jsonpath</groupId>-->
<!--            <artifactId>json-path</artifactId>-->
<!--            &lt;!&ndash;  Version 3.0 requires updating to Jackson 3  and JDK 17 &ndash;&gt;-->
<!--            <version>2.10.0</version>-->
<!--        </dependency>-->

        <!--  JUnit      -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>

        <!--  For comparing transformed schemas -->
        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>1.5.1</version>
            <scope>test</scope>
        </dependency>

    </dependencies>


    <profiles>
        <profile>
            <!--
                   This profile is needed when making a deployment to Maven Central.

                   0) make sure you are on the "master" branch

                   1) update release_notes.md before preparing a new release

                   2) manually update <version> in thi file. Typically just remove the -SNAPSHOT tag.
                      Update the same version number in the README.md.
                      Git commit/push.

                   3) run:
                      mvn  -P release -DskipTests  deploy

                      IMPORTANT: must make sure you are building with JDK 8!!!

                      make sure it is visible at:
                      https://central.sonatype.com/artifact/com.webfuzzing/overlay-jvm
                      if not, check publishing status at
                      https://central.sonatype.com/publishing/deployments (requires login)

                   4) run:
                      git tag v<x.y.z>
                      git push origin v<x.y.z>

                   5) increase version number, and put back -SNAPSHOT.
                      Git commit/push.
              -->
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>



    <build>
        <pluginManagement>
            <plugins>
                <!-- To deploy to Maven Central
                    https://central.sonatype.com/account
                    https://central.sonatype.org/publish/publish-portal-maven/
                -->
                <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>
                    </configuration>
                </plugin>
                <!-- To sign Jar files before uploading them to Maven Central -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>deploy</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>


        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.5</version>
                <configuration>
                    <rerunFailingTestsCount>2</rerunFailingTestsCount>
                    <trimStackTrace>false</trimStackTrace>
                    <argLine>-ea -Xms1024m -Xmx4096m -Xss4m -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=GB</argLine>
                    <runOrder>alphabetical</runOrder>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>create-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>create-javadocs</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
