<?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>cloud.piranha.server</groupId>
        <artifactId>project</artifactId>
        <version>22.1.0</version>
    </parent>

    <artifactId>piranha-server-lite</artifactId>
    <packaging>jar</packaging>

    <name>Piranha - Server - Lite</name>
    <description>
        The Lite Server version of Piranha.
    </description>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>cloud.piranha</groupId>
                <artifactId>bom</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <!-- compile -->
        <dependency>
            <groupId>cloud.piranha.core</groupId>
            <artifactId>piranha-core-impl</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>        
        <dependency>
            <groupId>cloud.piranha.extension</groupId>
            <artifactId>piranha-extension-lite</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>cloud.piranha.http</groupId>
            <artifactId>piranha-http-webapp</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>cloud.piranha.resource</groupId>
            <artifactId>piranha-resource-impl</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>cloud.piranha.server</groupId>
            <artifactId>piranha-server-core</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <!-- runtime -->
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- test -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>piranha-server-lite</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/zip.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>cloud.piranha.server.lite.LiteServerBootstrap</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>grizzly</id>
            <dependencies>
                <dependency>
                    <groupId>cloud.piranha.http</groupId>
                    <artifactId>piranha-http-grizzly</artifactId>
                    <version>${project.version}</version>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>impl</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>cloud.piranha.http</groupId>
                    <artifactId>piranha-http-impl</artifactId>
                    <version>${project.version}</version>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>jdk</id>
            <dependencies>
                <dependency>
                    <groupId>cloud.piranha.http</groupId>
                    <artifactId>piranha-http-jdk</artifactId>
                    <version>${project.version}</version>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>netty</id>
            <dependencies>
                <dependency>
                    <groupId>cloud.piranha.http</groupId>
                    <artifactId>piranha-http-netty</artifactId>
                    <version>${project.version}</version>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>undertow</id>
            <dependencies>
                <dependency>
                    <groupId>cloud.piranha.http</groupId>
                    <artifactId>piranha-http-undertow</artifactId>
                    <version>${project.version}</version>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>
