<?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>org.r10r</groupId>
    <artifactId>ninjax</artifactId>
    <version>0.6.2</version>
    <name>ninjax</name>
    
    <packaging>pom</packaging>
    
    <url>https://github.com/raphaelbauer/ninjax</url>
    <description>NinjaX is a full stack web framework for Java. Simple. Immutable. Fast and dev friendly.</description>
    
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    
    <scm>
        <url>https://github.com/raphaelbauer/ninjax</url>
        <connection>scm:git://github.com/raphaelbauer/ninjax.git</connection>
        <developerConnection>scm:git:git@github.com:raphaelbauer/ninjax.git</developerConnection>
        <tag>ninjax-0.6.2</tag>
    </scm>
    
    <developers>
        <developer>
            <name>Raphael A. Bauer</name>
            <email>ra@raphaelbauer.com</email>
            <url>http://www.raphaelbauer.com</url>
            <roles>
                <role>Lead Architect</role>
            </roles>
        </developer>
    </developers>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <slf4j.version>2.0.17</slf4j.version>
        <jdbi.version>3.51.0</jdbi.version>
        <jackson.version>2.21.0</jackson.version>
        <junit.version>5.11.0</junit.version>
        <hikari.version>7.0.2</hikari.version>
        <flyway.version>11.12.0</flyway.version>
        <h2.version>2.3.232</h2.version>
        <testcontainers.version>1.20.4</testcontainers.version>
    </properties>
    
    <!-- Optional: common dependencyManagement (shared versions) -->
    <dependencyManagement>
        <dependencies>
            <!-- Put all your versioned deps here if you want children to inherit versions -->
            <!-- Core framework dependencies -->
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>12.1.5</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty.ee10</groupId>
                <artifactId>jetty-ee10-servlet</artifactId>
                <version>12.1.5</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>33.3.0-jre</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <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>2.21</version>
            </dependency>
            
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${jackson.version}</version>
            </dependency>
        
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jdk8</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-jetty</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-db-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-db-hikari</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-db-flyway</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-db-jdbi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-template</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-json-jackson</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-maven-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.r10r</groupId>
                <artifactId>ninjax-test-utils</artifactId>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- External database libraries -->
            <dependency>
                <groupId>com.zaxxer</groupId>
                <artifactId>HikariCP</artifactId>
                <version>${hikari.version}</version>
            </dependency>
            <dependency>
                <groupId>org.flywaydb</groupId>
                <artifactId>flyway-core</artifactId>
                <version>${flyway.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-core</artifactId>
                <version>${jdbi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jdbi</groupId>
                <artifactId>jdbi3-sqlobject</artifactId>
                <version>${jdbi.version}</version>
            </dependency>
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${h2.version}</version>
            </dependency>

            <!-- Logging for ninjax-jetty-demo-todo -->
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.5.18</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>log4j-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            
            <!-- Testing dependencies -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-params</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.google.truth</groupId>
                <artifactId>truth</artifactId>
                <version>1.4.4</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${testcontainers.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>postgresql</artifactId>
                <version>${testcontainers.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>42.7.9</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>5.21.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>

    </dependencyManagement>
    
    <!-- Common build config for all modules -->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.14.1</version>
                    <configuration>
                        <source>25</source>
                        <target>25</target>
                    </configuration>
                </plugin>
                <!-- Release plugin -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.3.1</version>
                    <configuration>
                        <!-- Use Git -->
                        <scmCommentPrefix>[maven-release-plugin] </scmCommentPrefix>
                        <!-- Deploy with the "release" profile active so signing+central kick in -->
                        <arguments>-Prelease</arguments>
                        <!-- Optional: disable auto versioning of submodules (default is true) -->
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <!-- Use the standard release goals -->
                        <goals>deploy</goals>
                    </configuration>
                </plugin>
            </plugins>

        </pluginManagement>
    </build>
    
    <!-- Release profile stays on the parent so it applies to all modules -->
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <autoPublish>true</autoPublish>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <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>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.4.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.12.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
    <!-- List of child modules (directories under this pom) -->
    <modules>
        <module>ninjax-core</module>
        <module>ninjax-json-jackson</module>
        <module>ninjax-db-common</module>
        <module>ninjax-db-hikari</module>
        <module>ninjax-db-flyway</module>
        <module>ninjax-db-jdbi</module>
        <module>ninjax-template</module>
        <module>ninjax-maven-plugin</module>
        <module>ninjax-test-utils</module>
        <module>ninjax-demo-todo</module>
        <!-- Could ne removed later as Ninja now works without Jetty -->
        <module>ninjax-jetty</module>
        <module>ninjax-jetty-demo-todo</module>
    </modules>
</project>