<?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>
    <parent>
        <groupId>au.gov.qld.services.kiteworks</groupId>
        <artifactId>kiteworks_integration</artifactId>
        <version>2.0.3</version>
    </parent>
    <name>Kiteworks Native Client for Qld Government</name>
    <artifactId>kiteworks-native-client</artifactId>


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

        <jackson-version>2.20.0</jackson-version>
        <jackson-annotation-version>2.20</jackson-annotation-version>
        <jackson-databind-nullable-version>0.2.7</jackson-databind-nullable-version>
        <jakarta-annotation-version>3.0.0</jakarta-annotation-version>
        <beanvalidation-version>3.0.2</beanvalidation-version>
        <httpmime-version>4.5.14</httpmime-version>
        <junit-version>5.13.4</junit-version>
        <spotless.version>3.0.0</spotless.version>
        <argLine />
    </properties>

    <distributionManagement>
        <repository>
            <id>github</id>
            <name>GitHub Packages</name>
            <url>https://maven.pkg.github.com/qld-gov-au/kiteworks-integration</url>
        </repository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.6.1</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>11</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.8.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.4</version>
                <configuration>
                    <argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
                    <parallel>methods</parallel>
                    <threadCount>10</threadCount>
                </configuration>
            </plugin>
            <plugin>
            <groupId>org.apache.maven.plugins </groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.5.4</version>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.1</version>
            </plugin>

            <!-- Use spotless plugin to automatically format code,remove unused import,etc
                 To apply changes directly to the file,run `mvn spotless:apply`
                 Ref: https://github.com/diffplug/spotless/tree/main/plugin-maven
            -->
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>${spotless.version}</version>
                <configuration>
                    <formats>
                        <!-- you can define as many formats as you want,each is independent -->
                        <format>
                            <!-- define the files to apply to -->
                            <includes>
                                <include>.gitignore</include>
                            </includes>
                            <!-- define the steps to apply to those files -->
                            <trimTrailingWhitespace />
                            <endWithNewline />
                            <indent>
                                <spaces>true</spaces> <!-- or <tabs>true</tabs> -->
                                <spacesPerTab>4</spacesPerTab> <!-- optional,default is 4 -->
                            </indent>
                        </format>
                    </formats>
                    <!-- define a language-specific format -->
                    <java>
                        <!-- no need to specify files,inferred automatically,but you can if you want -->

                        <!-- apply a specific flavor of google-java-format and reflow long strings -->
                        <googleJavaFormat>
                            <version>1.8</version>
                            <style>AOSP</style>
                            <reflowLongStrings>true</reflowLongStrings>
                        </googleJavaFormat>
                        <removeUnusedImports />
                        <importOrder />
                    </java>
                </configuration>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>sign-artifacts</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency><groupId>au.gov.qld.services.kiteworks</groupId><artifactId>kiteworks-swagger-gen</artifactId><version>2.0.3</version></dependency>

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

        <!-- JSON processing: 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-annotation-version}</version></dependency>
        <dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>${jackson-version}</version></dependency>
        <dependency><groupId>com.fasterxml.jackson.datatype</groupId><artifactId>jackson-datatype-jsr310</artifactId><version>${jackson-version}</version></dependency>
        <dependency><groupId>org.openapitools</groupId><artifactId>jackson-databind-nullable</artifactId><version>${jackson-databind-nullable-version}</version></dependency>

        <dependency><groupId>jakarta.annotation</groupId><artifactId>jakarta.annotation-api</artifactId><version>${jakarta-annotation-version}</version><scope>provided</scope></dependency>
        <dependency><groupId>org.apache.httpcomponents</groupId><artifactId>httpmime</artifactId><version>${httpmime-version}</version></dependency>

        <!-- ########## Test dependencies ########## -->
        <dependency><scope>test</scope><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-api</artifactId><version>${junit-version}</version></dependency>
        <dependency><scope>test</scope><groupId>org.hamcrest</groupId><artifactId>hamcrest</artifactId><version>3.0</version></dependency>
        <dependency><scope>test</scope><groupId>org.assertj</groupId><artifactId>assertj-core</artifactId><version>3.27.6</version></dependency>
        <dependency><scope>test</scope><groupId>org.mockito</groupId><artifactId>mockito-core</artifactId><version>5.20.0</version></dependency>
    </dependencies>

</project>
