<?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>com.condation.cms</groupId>
    <artifactId>cms-parent</artifactId>
    <name>CMS Parent</name>
    <version>8.2.0</version>
    <packaging>pom</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>25</maven.compiler.source>
        <maven.compiler.target>25</maven.compiler.target>
        <exec.mainClass>com.condation.cms.Startup</exec.mainClass>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
        <jetty.version>12.1.10</jetty.version>
        <lucene.version>10.4.0</lucene.version>
        <modules-framework.version>1.4.2</modules-framework.version>
        <mockito.version>5.23.0</mockito.version>
    </properties>
    <modules>
        <module>cms-api</module>
        <module>cms-server</module>
        <module>modules</module>
        <module>cms-filesystem</module>
        <module>cms-media</module>
        <module>cms-content</module>
        <module>cms-templates</module>
        <module>cms-extensions</module>
        <module>cms-auth</module>
        <module>integration-tests</module>
        <module>cms-core</module>
        <module>cms-test</module>
        <module>cms-test-server</module>
        <module>cms-hooksystem</module>
    </modules>
    <inceptionYear>2023</inceptionYear>
    <organization>
        <name>CondationCMS</name>
    </organization>
    <url>https://condation.com</url>
    <description>
        A lightweight, Java-based flat-file CMS designed for simplicity and speed. It allows easy content management without the need for a database.
    </description>

    <licenses>
        <license>
            <name>AGPL v3</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.html</url>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/CondationCMS/cms</url>
    </scm>
    <developers>
        <developer>
            <id>thmarx</id>
            <email>thorsten.marx1@gmail.com</email>
            <name>Thorsten Marx</name>
            <roles>
                <role>Lead</role>
            </roles>
        </developer>
    </developers>
	
    <dependencyManagement>
        <dependencies>
			
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-api</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-core</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-auth</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-filesystem</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-content</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-templates</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-extensions</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-media</artifactId>
                <version>${project.version}</version>            
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-test-server</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.condation.cms</groupId>
                <artifactId>cms-hooksystem</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.condation.modules.framework</groupId>
                <artifactId>modules-manager</artifactId>
                <version>${modules-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>com.condation.modules.framework</groupId>
                <artifactId>modules-api</artifactId>
                <version>${modules-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>com.condation.cms.modules</groupId>
                <artifactId>cms-system-modules</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.condation.cms.modules</groupId>
                <artifactId>api-module</artifactId>
                <version>${project.version}</version>
            </dependency>
			
            <dependency>
                <groupId>com.condation.cms.modules</groupId>
                <artifactId>ui-module</artifactId>
                <version>${project.version}</version>
            </dependency>
			
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-jexl3</artifactId>
                <version>3.6.2</version>
            </dependency>
			
            <dependency>
                <groupId>com.github.slugify</groupId>
                <artifactId>slugify</artifactId>
                <version>4.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.quartz-scheduler</groupId>
                <artifactId>quartz</artifactId>
                <version>2.5.2</version>
            </dependency>
            <dependency>
                <groupId>net.coobird</groupId>
                <artifactId>thumbnailator</artifactId>
                <version>0.4.21</version>
            </dependency>
            <dependency>
                <groupId>com.github.usefulness</groupId>
                <artifactId>webp-imageio</artifactId>
                <version>0.11.0</version>
            </dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>2.6</version>            
            </dependency>
            <dependency>
                <groupId>org.tomlj</groupId>
                <artifactId>tomlj</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty.http2</groupId>
                <artifactId>jetty-http2-server</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.18.46</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>3.2.4</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>33.6.0-jre</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>7.0.0</version>
                <classifier>classes</classifier>
            </dependency>

            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-core</artifactId>
                <version>${lucene.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-analysis-common</artifactId>
                <version>${lucene.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-backward-codecs</artifactId>
                <version>${lucene.version}</version>
            </dependency>
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2-mvstore</artifactId>
                <version>2.4.240</version>
            </dependency>

            <!--dependency>
                    <groupId>org.graalvm.polyglot</groupId>
                    <artifactId>polyglot</artifactId>
                    <version>24.1.1</version>
            </dependency>
            <dependency>
                    <groupId>org.graalvm.js</groupId>
                    <artifactId>js-language</artifactId>
                    <version>24.1.1</version>
            </dependency-->
            <dependency>
                <groupId>org.graalvm.polyglot</groupId>
                <artifactId>polyglot</artifactId> 
                <version>25.0.3</version>
            </dependency>
            <dependency>
                <groupId>org.graalvm.polyglot</groupId>
                <artifactId>js</artifactId>
                <version>25.0.3</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>2.26.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>2.26.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j2-impl</artifactId>
                <version>2.26.0</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>2.0.18</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>1.22.2</version>
            </dependency>
			
            <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-text -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>1.15.0</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.20.0</version>
            </dependency>
			
            <!-- object pool -->
            <dependency>
                <groupId>com.github.chrisvest</groupId>
                <artifactId>stormpot</artifactId>
                <version>4.2</version>
            </dependency>
               
            <!-- metrics -->
            <dependency>
                <groupId>io.micrometer</groupId>
                <artifactId>micrometer-registry-jmx</artifactId>
                <version>1.17.0</version>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.27.7</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>6.1.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>4.3.0</version>
            </dependency>
            <dependency>
                <groupId>info.picocli</groupId>
                <artifactId>picocli</artifactId>
                <version>4.7.7</version>
            </dependency>
            <dependency>
                <groupId>org.semver4j</groupId>
                <artifactId>semver4j</artifactId>
                <version>6.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.github.noconnor</groupId>
                <artifactId>junitperf-junit5</artifactId>
                <version>1.37.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.14.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
	
    <dependencies>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>
	
	
    <build>
        <pluginManagement>
            <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>1.18.46</version>
                            </path>
                            <path>
                                <groupId>com.google.auto.service</groupId>
                                <artifactId>auto-service</artifactId>
                                <version>1.1.1</version>
                            </path>
                            <path>
                                <groupId>com.condation.modules.framework</groupId>
                                <artifactId>modules-api</artifactId>
                                <version>${modules-framework.version}</version>
                            </path>
                        </annotationProcessorPaths>
                        <compilerArgs>
                            <arg>--enable-preview</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.8.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>2.7.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.11.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <verbose>false</verbose>
                    <licenseName>agpl_v3</licenseName>
                </configuration>
                <executions>
                    <execution>
                        <id>first</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <licenseName>agpl_v3</licenseName>
                            <roots>
                                <root>src/main/java</root>
                                <root>src/main/resources</root>
                                <root>src/main/ts/src</root>
                                <root>src/test/java</root>
                                <root>src/test/resources</root>
                            </roots>
                            <excludes>
                                <exclude>**/*.json</exclude>
                                <exclude>**/manager/bootstrap/*.js</exclude>
                                <exclude>**/manager/bootstrap/*.css</exclude>
                                <exclude>**/manager/bootstrap/*.map</exclude>
                                <exclude>**/manager/js/libs/*.js</exclude>
                                <exclude>**/manager/js/libs/*.css</exclude>
                                <exclude>**/manager/js/libs/*.map</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.15</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.12.0</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <additionalOptions>--enable-preview</additionalOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</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>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <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>1.18.46</version>
                        </path>
                        <path>
                            <groupId>com.google.auto.service</groupId>
                            <artifactId>auto-service</artifactId>
                            <version>1.1.1</version>
                        </path>
                        <path>
                            <groupId>com.condation.modules.framework</groupId>
                            <artifactId>modules-api</artifactId>
                            <version>1.4.2</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>
                        --enable-preview
                        -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar
                        -Xshare:off
                    </argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>
	
    <profiles>
        <profile>
            <id>dist</id>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.11.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </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>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>ci</id>
            <activation>
                <property>
                    <name>env.CI</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>
                                --enable-preview
                                -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar
                                -Xshare:off
                            </argLine>
                            <excludedGroups>performance</excludedGroups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
