<?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>systems.courant</groupId>
    <artifactId>dynamics</artifactId>
    <version>1.0-Beta-0</version>
    <packaging>pom</packaging>

    <name>Courant</name>
    <description>System Dynamics simulation engine and visual modeling environment for Java</description>
    <url>https://github.com/Courant-Systems/Courant</url>

    <licenses>
        <license>
            <name>GNU Affero General Public License v3.0</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Larry White</name>
            <email>lwhite1@users.noreply.github.com</email>
            <organization>Courant Systems</organization>
            <organizationUrl>https://github.com/Courant-Systems</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/Courant-Systems/Courant.git</connection>
        <developerConnection>scm:git:ssh://github.com:Courant-Systems/Courant.git</developerConnection>
        <url>https://github.com/Courant-Systems/Courant</url>
    </scm>

    <modules>
        <module>courant-engine</module>
        <module>courant-ui</module>
        <module>courant-demos</module>
        <module>courant-app</module>
        <module>courant-tools</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>25</maven.compiler.release>
        <javafx.version>25.0.1</javafx.version>
        <junit.version>5.11.4</junit.version>
        <assertj.version>3.26.3</assertj.version>
        <guava.version>33.4.0-jre</guava.version>
        <commons-math3.version>3.6.1</commons-math3.version>
        <opencsv.version>5.9</opencsv.version>
        <hppc.version>0.10.0</hppc.version>

        <jackson.version>2.17.0</jackson.version>
        <logback.version>1.5.16</logback.version>
        <slf4j.version>2.0.16</slf4j.version>
        <testfx.version>4.0.17</testfx.version>
        <monocle.version>21.0.2</monocle.version>
        <elk.version>0.9.1</elk.version>
        <spotbugs.version>4.9.8</spotbugs.version>
        <spotbugs-maven.version>4.9.8.2</spotbugs-maven.version>
        <jacoco.version>0.8.14</jacoco.version>
        <lz4.version>1.8.0</lz4.version>
        <richtextfx.version>0.11.7</richtextfx.version>
        <flying-saucer.version>9.4.0</flying-saucer.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Project modules -->
            <dependency>
                <groupId>systems.courant</groupId>
                <artifactId>courant-engine</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>systems.courant</groupId>
                <artifactId>courant-ui</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>systems.courant</groupId>
                <artifactId>courant-app</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- JavaFX -->
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-controls</artifactId>
                <version>${javafx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-graphics</artifactId>
                <version>${javafx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-swing</artifactId>
                <version>${javafx.version}</version>
            </dependency>

            <!-- Core -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-math3</artifactId>
                <version>${commons-math3.version}</version>
            </dependency>
            <dependency>
                <groupId>com.opencsv</groupId>
                <artifactId>opencsv</artifactId>
                <version>${opencsv.version}</version>
            </dependency>
            <dependency>
                <groupId>com.carrotsearch</groupId>
                <artifactId>hppc</artifactId>
                <version>${hppc.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <!-- Rich text editing -->
            <dependency>
                <groupId>org.fxmisc.richtext</groupId>
                <artifactId>richtextfx</artifactId>
                <version>${richtextfx.version}</version>
            </dependency>

            <!-- PDF generation (Flying Saucer + OpenPDF) -->
            <dependency>
                <groupId>org.xhtmlrenderer</groupId>
                <artifactId>flying-saucer-pdf-openpdf</artifactId>
                <version>${flying-saucer.version}</version>
            </dependency>

            <!-- Compression -->
            <dependency>
                <groupId>org.lz4</groupId>
                <artifactId>lz4-java</artifactId>
                <version>${lz4.version}</version>
            </dependency>

            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>

            <!-- ELK (Eclipse Layout Kernel) -->
            <dependency>
                <groupId>org.eclipse.elk</groupId>
                <artifactId>org.eclipse.elk.core</artifactId>
                <version>${elk.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.elk</groupId>
                <artifactId>org.eclipse.elk.graph</artifactId>
                <version>${elk.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.elk</groupId>
                <artifactId>org.eclipse.elk.alg.layered</artifactId>
                <version>${elk.version}</version>
            </dependency>

            <!-- Test -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testfx</groupId>
                <artifactId>testfx-core</artifactId>
                <version>${testfx.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testfx</groupId>
                <artifactId>testfx-junit5</artifactId>
                <version>${testfx.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testfx</groupId>
                <artifactId>openjfx-monocle</artifactId>
                <version>${monocle.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <repository>
            <id>central</id>
            <name>Maven Central</name>
            <url>https://central.sonatype.com</url>
        </repository>
        <snapshotRepository>
            <id>central</id>
            <name>Maven Central Snapshots</name>
            <url>https://central.sonatype.com</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.15.0</version>
                    <configuration>
                        <release>25</release>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${jacoco.version}</version>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${spotbugs-maven.version}</version>
                    <configuration>
                        <effort>Max</effort>
                        <threshold>Medium</threshold>
                        <failOnError>true</failOnError>
                        <excludeFilterFile>${maven.multiModuleProjectDirectory}/spotbugs-exclude.xml</excludeFilterFile>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.github.spotbugs</groupId>
                            <artifactId>spotbugs</artifactId>
                            <version>${spotbugs.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.6.0</version>
                    <configuration>
                        <configLocation>${maven.multiModuleProjectDirectory}/checkstyle.xml</configLocation>
                        <consoleOutput>true</consoleOutput>
                        <failOnViolation>true</failOnViolation>
                        <violationSeverity>warning</violationSeverity>
                        <sourceDirectories>${project.build.sourceDirectory}</sourceDirectories>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>10.25.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>github</id>
            <distributionManagement>
                <repository>
                    <id>github</id>
                    <name>GitHub Packages</name>
                    <url>https://maven.pkg.github.com/Courant-Systems/Courant</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</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-javadoc-plugin</artifactId>
                        <version>3.11.2</version>
                        <configuration>
                            <doclint>all,-missing</doclint>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <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>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
