<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.kinde</groupId>
    <artifactId>kinde-parent-pom</artifactId>
    <version>2.0.1</version>
    <name>parent-project</name>
    <description>Kinde Java SDK</description>
    <packaging>pom</packaging>
    <url>https://kinde.com</url>
    <organization>
        <name>Kinde</name>
        <url>https://kinde.com/docs</url>
    </organization>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://github.com/kinde-oss/kinde-java-sdk/blob/main/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <developerConnection>scm:git:https://github.com/kinde-oss/kinde-java-sdk.git</developerConnection>
        <connection>scm:git:https://github.com/kinde-oss/kinde-java-sdk.git</connection>
        <url>https://github.com/kinde-oss/kinde-java-sdk.git</url>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>kinde-engineering</id>
            <name>Kinde Engineering</name>
            <email>engineering at kinde.com</email>
            <roles>
                <role>Owner</role>
            </roles>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <dependencyManagement>
        <dependencies>
            <!-- https://mvnrepository.com/artifact/com.nimbusds/oauth2-oidc-sdk -->
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>oauth2-oidc-sdk</artifactId>
                <version>11.14</version>
            </dependency>
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>nimbus-jose-jwt</artifactId>
                <version>9.40</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.8.1</version>
                <scope>test</scope>
            </dependency>
            <!-- JUnit 5 API and Engine -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>5.10.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>5.10.0</version>
                <scope>test</scope>
            </dependency>

            <!-- Optional: For parameterized tests -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-params</artifactId>
                <version>5.10.0</version>
                <scope>test</scope>
            </dependency>

            <!-- Mockito (if you are using it for mocking) -->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>5.4.0</version>
                <scope>test</scope>
            </dependency>


            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <!-- {version} can be 6.0.0, 7.0.0, etc. -->
                <version>7.0.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>32.1.3-jre</version>
            </dependency>


            <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.18.34</version>
                <scope>provided</scope>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>2.0.15</version>
            </dependency>
            <dependency>
                <groupId>io.github.cdimascio</groupId>
                <artifactId>dotenv-java</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.github.tomakehurst</groupId>
                <artifactId>wiremock-jre8</artifactId>
                <version>2.33.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.servlet</groupId>
                <artifactId>jakarta.servlet-api</artifactId>
                <version>5.0.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.kinde</groupId>
                <artifactId>kinde-core</artifactId>
                <version>2.0.1</version>
            </dependency>
            <dependency>
                <groupId>com.kinde</groupId>
                <artifactId>kinde-management</artifactId>
                <version>2.0.1</version>
            </dependency>
            <dependency>
                <groupId>com.kinde</groupId>
                <artifactId>kinde-j2ee</artifactId>
                <version>2.0.1</version>
            </dependency>
            <dependency>
                <groupId>com.kinde.spring</groupId>
                <artifactId>kinde-springboot-core</artifactId>
                <version>2.0.1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>kinde-core</module>
        <module>kinde-management</module>
        <module>kinde-j2ee</module>
        <module>kinde-springboot</module>
        <module>playground/kinde-core-example</module>
        <module>playground/kinde-management-example</module>
        <module>playground/kinde-j2ee-app</module>
        <module>playground/kinde-springboot-starter-example</module>
        <module>playground/springboot-pkce-client-example</module>
        <module>playground/springboot-thymeleaf-full-example</module>
        <module>kinde-report-aggregate</module>
    </modules>

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

    <build>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.7.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>false</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.18.34</version> <!-- Use the version you need -->
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <inherited>false</inherited>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>empty-javadoc-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>javadoc</classifier>
                            <classesDirectory>${basedir}/javadoc</classesDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- We must generate a -sources JAR file to publish on Maven Central -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.0</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-gpg-plugin</artifactId>
                <version>3.2.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <keyname>${gpg.keyname}</keyname>
                            <passphraseServerId>${gpg.keyname}</passphraseServerId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.12</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includes>
                        <include>com/kinde/**</include>
                    </includes>
                    <excludes>
                        <exclude>com/google/inject/**/*.class</exclude>
                        <exclude>javax/inject/**/*.class</exclude>
                        <exclude>org/springframework/**/*.class</exclude>
                        <exclude>**/generated/**</exclude>
                        <exclude>**/thirdparty/**</exclude>
                        <exclude>**/openapitools/**</exclude>
                        <!-- Add more excludes if necessary -->
                    </excludes>
                </configuration>
            </plugin>
        </plugins>


    </build>

</project>
