<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springaicommunity</groupId>
        <artifactId>spring-ai-community-parent</artifactId>
        <version>1.0.1</version>
        <relativePath/>
    </parent>

    <artifactId>agent-sandbox-parent</artifactId>
    <version>0.9.1</version>
    <packaging>pom</packaging>

    <name>Agent Sandbox Parent</name>
    <description>Agent Sandbox - Process Execution and Workspace Management for AI Agents</description>
    <url>https://github.com/spring-ai-community/agent-sandbox</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/spring-ai-community/agent-sandbox</url>
        <connection>scm:git:git://github.com/spring-ai-community/agent-sandbox.git</connection>
        <developerConnection>scm:git:git@github.com:spring-ai-community/agent-sandbox.git</developerConnection>
    </scm>

    <developers>
        <developer>
            <id>markpollack</id>
            <name>Mark Pollack</name>
            <email>mark@springframework.org</email>
            <roles>
                <role>lead</role>
            </roles>
        </developer>
    </developers>

    <modules>
        <module>agent-sandbox-core</module>
        <module>agent-sandbox-docker</module>
        <module>agent-sandbox-e2b</module>
        <!-- <module>agent-sandbox-bom</module> -->
    </modules>

    <profiles>
        <!-- Release profile inherited from community-parent -->
        <profile>
            <id>docker</id>
            <activation>
                <property>
                    <name>sandbox.infrastructure.test</name>
                    <value>true</value>
                </property>
            </activation>
        </profile>
    </profiles>

    <properties>
        <!-- Agent Sandbox project version -->
        <agent-sandbox.version>${project.version}</agent-sandbox.version>

        <!-- Core dependency versions -->
        <slf4j.version>2.0.9</slf4j.version>

        <!-- Process execution -->
        <zt-exec.version>1.12</zt-exec.version>

        <!-- Docker support -->
        <testcontainers.version>1.20.4</testcontainers.version>

        <!-- JSON processing -->
        <jackson.version>2.17.0</jackson.version>

        <!-- Test dependency versions -->
        <junit-jupiter.version>5.10.1</junit-jupiter.version>
        <mockito.version>5.7.0</mockito.version>
        <assertj.version>3.24.2</assertj.version>
        <awaitility.version>4.2.0</awaitility.version>
        <logback.version>1.4.14</logback.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Process execution -->
            <dependency>
                <groupId>org.zeroturnaround</groupId>
                <artifactId>zt-exec</artifactId>
                <version>${zt-exec.version}</version>
            </dependency>

            <!-- Testcontainers for Docker support -->
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${testcontainers.version}</version>
            </dependency>

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

            <!-- Slf4j API -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <!-- Project modules -->
            <dependency>
                <groupId>org.springaicommunity</groupId>
                <artifactId>agent-sandbox-core</artifactId>
                <version>${agent-sandbox.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springaicommunity</groupId>
                <artifactId>agent-sandbox-core</artifactId>
                <version>${agent-sandbox.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springaicommunity</groupId>
                <artifactId>agent-sandbox-docker</artifactId>
                <version>${agent-sandbox.version}</version>
            </dependency>

            <!-- Testing dependencies -->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit-jupiter.version}</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.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${awaitility.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <!-- Most plugin configuration inherited from community-parent -->
        <pluginManagement>
            <plugins>
                <!-- Override to auto-apply formatting instead of just validating -->
                <plugin>
                    <groupId>io.spring.javaformat</groupId>
                    <artifactId>spring-javaformat-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>process-sources</phase>
                            <goals>
                                <goal>apply</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>io.spring.javaformat</groupId>
                <artifactId>spring-javaformat-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <!-- distributionManagement inherited from community-parent -->

    <repositories>
        <repository>
            <id>central-snapshots</id>
            <name>Maven Central Snapshots</name>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
</project>
