<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.mlecode</groupId>
        <artifactId>mlecode-libs-parent</artifactId>
        <version>1.0.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>mlecode-common-spring-boot-starter</artifactId>
    <version>1.1.1</version>
    <packaging>jar</packaging>
    <description>Shared common infrastructure starter for all mlecode Spring Boot projects (error handling, API response wrappers, pagination)</description>

    <!-- The GitLab Package Registry hosts mlecode-jpa-spring-boot-starter, referenced
         (optional, compile-only) by MlecodeJpaExceptionHandler. common-starter is the
         lowest-level lib so it has no parent-supplied repository; declare it here. CI auth
         is supplied via the `gitlab` server (Job-Token) in /tmp/ci-settings.xml (build job);
         local installs resolve it from the developer's ~/.m2. -->
    <repositories>
        <repository>
            <id>gitlab</id>
            <url>https://gitlab.mlecode.com/api/v4/projects/11/packages/maven</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-commons</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- Spring Security for AccessDeniedException and BadCredentialsException handling -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- AOP for @Monitored performance monitoring -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aspectj</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- Micrometer for performance metrics -->
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- OpenAPI / SpringDoc (optional — only if springdoc is on the classpath) -->
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
            <version>2.8.9</version>
            <optional>true</optional>
        </dependency>
        <!-- Apache Commons CSV for CsvExportService -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.14.1</version>
            <optional>true</optional>
        </dependency>
        <!-- Spring Data JPA for SearchSpec (Specification API) -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- mlecode-jpa-starter — compile-only, so MlecodeJpaExceptionHandler can reference
             com.mlecode.jpa.exception.ResourceNotFoundException. optional=true keeps it
             non-transitive; the handler bean is gated @ConditionalOnClass so apps that do
             not use the JPA starter (e.g. tracking) never load it. -->
        <dependency>
            <groupId>com.mlecode</groupId>
            <artifactId>mlecode-jpa-spring-boot-starter</artifactId>
            <version>1.2.0</version>
            <optional>true</optional>
        </dependency>
        <!-- Test -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>
