<?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>com.condation.cms</groupId>
        <artifactId>cms-parent</artifactId>
        <version>8.2.0</version>
    </parent>
    <artifactId>cms-server</artifactId>
    <packaging>jar</packaging>
    <name>CMS Server</name>
    <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.cli.CMSCli</exec.mainClass>
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-filesystem</artifactId>
        </dependency>
        <dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-media</artifactId>
        </dependency>
        <dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-content</artifactId>
        </dependency>
        <dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-extensions</artifactId>
        </dependency>
        <dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-hooksystem</artifactId>
        </dependency>
		<dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-auth</artifactId>
        </dependency>
		
        <dependency>
            <groupId>com.condation.cms.modules</groupId>
            <artifactId>cms-system-modules</artifactId>
        </dependency>
        <dependency>
            <groupId>com.condation.cms.modules</groupId>
            <artifactId>api-module</artifactId>
        </dependency>
        <dependency>
            <groupId>com.condation.cms.modules</groupId>
            <artifactId>ui-module</artifactId>
        </dependency>
		
        <dependency>
            <groupId>com.condation.cms</groupId>
            <artifactId>cms-test</artifactId>
            <scope>test</scope>
        </dependency>
		
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.http2</groupId>
            <artifactId>jetty-http2-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.compression</groupId>
            <artifactId>jetty-compression-server</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.compression</groupId>
            <artifactId>jetty-compression-brotli</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.compression</groupId>
            <artifactId>jetty-compression-gzip</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.compression</groupId>
            <artifactId>jetty-compression-zstandard</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j2-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.condation.modules.framework</groupId>
            <artifactId>modules-manager</artifactId>
        </dependency>
        
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-jmx</artifactId>
            <version>1.17.0</version>
        </dependency>

		
        <dependency>
            <groupId>info.picocli</groupId>
            <artifactId>picocli</artifactId>
        </dependency>
        <dependency>
            <groupId>org.semver4j</groupId>
            <artifactId>semver4j</artifactId>
        </dependency>
		
        <dependency>
            <groupId>com.github.chrisvest</groupId>
            <artifactId>stormpot</artifactId>
        </dependency>
		
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources-filtered</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>--enable-preview</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
        </plugins>
    </build>
	
    <profiles>
        <profile>
            <id>dist</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <archive>
                                <manifest>
                                    <addClasspath>true</addClasspath>
                                    <classpathPrefix>lib/</classpathPrefix>
                                    <mainClass>${exec.mainClass}</mainClass>
                                </manifest>
                            </archive>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <descriptors>
                                <descriptor>src/assembly/executable.xml</descriptor>
                            </descriptors>
                            <archive>
                                <manifest>
                                    <addClasspath>true</addClasspath>
                                    <classpathPrefix>lib/</classpathPrefix>
                                    <mainClass>${exec.mainClass}</mainClass>
                                </manifest>
                            </archive>
                            <appendAssemblyId>false</appendAssemblyId>
                        </configuration>
                        <executions>
                            <execution>
                                <id>make-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
