<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>fr.bankwiz.server</groupId>
    <artifactId>parent</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>Bankwiz Server - Parent</name>
    <modules>
        <module>domain</module>
        <module>application</module>
    </modules>
    <scm>
        <connection>scm:git:ssh://git@git-ssh.wittnerlab.com:4222/jbwittner/bankwiz_server.git</connection>
        <developerConnection>scm:git:ssh://git@git-ssh.wittnerlab.com:4222/jbwittner/bankwiz_server.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <distributionManagement>
        <repository>
            <id>gitea</id>
            <url>https://forgejo.wittnerlab.com/api/packages/jbwittner/maven</url>
        </repository>
        <snapshotRepository>
            <id>gitea</id>
            <url>https://forgejo.wittnerlab.com/api/packages/jbwittner/maven</url>
        </snapshotRepository>
    </distributionManagement>
    <properties>
        <java.version>25</java.version>
        <lombok.version>1.18.46</lombok.version>
        <maven.compiler.release>25</maven.compiler.release>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>gitea</id>
            <url>https://forgejo.wittnerlab.com/api/packages/jbwittner/maven</url>
        </repository>
    </repositories>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.15.0</version>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${lombok.version}</version>
                            <version>1.18.46</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>3.6.0</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>
                            <excludes>
                                <exclude>**/generated-sources/**</exclude>
                            </excludes>
                            <!-- define the steps to apply to those files -->
                            <trimTrailingWhitespace />
                            <endWithNewline />
                            <indent>
                                <tabs>false</tabs>
                                <spaces>true</spaces>
                                <spacesPerTab>4</spacesPerTab>
                            </indent>
                        </format>
                    </formats>
                    <markdown>
                        <includes>
                            <!-- You have to set the target manually -->
                            <include>**/*.md</include>
                        </includes>
                        <excludes>
                            <exclude>**/bruno/iam-authentication-flows-bruno/*</exclude>
                            <exclude>**/generated-sources/**</exclude>
                            <exclude>**/.direnv/**</exclude>
                        </excludes>
                        <flexmark />
                        <!-- has its own section below -->
                    </markdown>
                    <!-- optional: limit format enforcement to just the files changed by this feature branch -->
                    <java>
                        <!-- These are the defaults, you can override if you want -->
                        <includes>
                            <include>src/main/java/**/*.java</include>
                            <include>src/test/java/**/*.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/generated-sources/**</exclude>
                        </excludes>
                        <!-- Cleanthat will refactor your code, but it may break your style: apply it before your formatter -->
                        <cleanthat />
                        <!-- has its own section below -->
                        <googleJavaFormat />
                        <palantirJavaFormat />
                        <!-- has its own section below -->
                        <importOrder />
                        <!-- standard import order -->
                        <importOrder>
                            <!-- or a custom ordering -->
                            <wildcardsLast>false</wildcardsLast>
                            <!-- Optional, default false. Sort wildcard import after specific imports -->
                            <order>java|javax,org,com,com.diffplug,,\#com.diffplug,\#</order>
                            <!-- or use <file>${project.basedir}/eclipse.importorder</file> -->
                            <!-- you can use an empty string for all the imports you didn't specify explicitly, '|' to join group without blank line, and '\#` prefix for static imports. -->
                        </importOrder>
                        <removeUnusedImports />
                        <!-- self-explanatory -->
                        <formatAnnotations />
                        <!-- fixes formatting of type annotations, see below -->
                    </java>
                    <pom>
                        <!-- These are the defaults, you can override if you want -->
                        <includes>
                            <include>pom.xml</include>
                        </includes>
                        <sortPom>
                            <encoding>UTF-8</encoding>
                            <!-- The encoding of the pom files -->
                            <lineSeparator>${line.separator}</lineSeparator>
                            <!-- line separator to use -->
                            <expandEmptyElements>false</expandEmptyElements>
                            <!-- Should empty elements be expanded-->
                            <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
                            <!-- Should a space be added inside self-closing elements-->
                            <keepBlankLines>false</keepBlankLines>
                            <!-- Keep empty lines -->
                            <nrOfIndentSpace>4</nrOfIndentSpace>
                            <!-- Indentation -->
                            <indentBlankLines>false</indentBlankLines>
                            <!-- Should empty lines be indented -->
                            <indentSchemaLocation>false</indentSchemaLocation>
                            <!-- Should schema locations be indended -->
                            <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
                            <!-- Sort order of elements: https://github.com/Ekryd/sortpom/wiki/PredefinedSortOrderProfiles-->
                            <sortOrderFile />
                            <!-- Custom sort order of elements: https://raw.githubusercontent.com/Ekryd/sortpom/master/sorter/src/main/resources/custom_1.xml -->
                            <sortDependencies />
                            <!-- Sort dependencies: https://github.com/Ekryd/sortpom/wiki/SortDependencies-->
                            <sortDependencyExclusions />
                            <!-- Sort dependency exclusions: https://github.com/Ekryd/sortpom/wiki/SortDependencies-->
                            <sortPlugins />
                            <!-- Sort plugins: https://github.com/Ekryd/sortpom/wiki/SortPlugins -->
                            <sortProperties>true</sortProperties>
                            <!-- Sort properties -->
                            <sortModules>false</sortModules>
                            <!-- Sort modules -->
                            <sortExecutions>true</sortExecutions>
                            <!-- Sort plugin executions -->
                        </sortPom>
                        <!-- has its own section below -->
                    </pom>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
