<?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>io.sip3.captain.ce</groupId>
    <artifactId>sip3-captain-ce</artifactId>
    <version>2026.1.1-SNAPSHOT</version>
    <packaging>jar</packaging>

    <parent>
        <groupId>io.sip3</groupId>
        <artifactId>sip3-parent</artifactId>
        <version>2026.1.1-SNAPSHOT</version>
    </parent>

    <dependencies>
        <!-- SIP3 -->
        <dependency>
            <groupId>io.sip3.commons</groupId>
            <artifactId>sip3-commons</artifactId>
            <version>2026.1.1-SNAPSHOT</version>
        </dependency>

        <!-- Pcap4j -->
        <dependency>
            <groupId>org.pcap4j</groupId>
            <artifactId>pcap4j-packetfactory-static</artifactId>
        </dependency>
        <dependency>
            <groupId>org.pcap4j</groupId>
            <artifactId>pcap4j-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Utils -->
        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>io.mockk</groupId>
            <artifactId>mockk-jvm</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>sip3-captain-ce</finalName>
        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>src/main/kotlin</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>src/test/kotlin</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>executable-jar</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>io.vertx</groupId>
                    <artifactId>vertx-launcher-legacy-cli</artifactId>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.reactiverse</groupId>
                        <artifactId>vertx-maven-plugin</artifactId>
                        <version>${vertx-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>vmp</id>
                                <goals>
                                    <goal>initialize</goal>
                                    <goal>package</goal>
                                </goals>
                            </execution>

                        </executions>
                        <configuration>
                            <verticle>io.sip3.captain.ce.Bootstrap</verticle>
                            <redeploy>true</redeploy>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
