<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>xyz.swamedia</groupId>
        <artifactId>swamedia-library-parent</artifactId>
        <version>1.3.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>dbexec-spring-boot-starter</artifactId>
    <packaging>jar</packaging>
    <name>Swamedia DBExec Spring Boot Starter</name>
    <description>Spring Boot starter for cross-vendor DB routine execution (Oracle/Postgres).</description>

    <dependencies>
        <!-- Core library -->
        <dependency>
            <groupId>xyz.swamedia</groupId>
            <artifactId>dbexec-core</artifactId>
        </dependency>

        <!-- Spring Boot autoconfiguration APIs -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>

        <!-- Spring JDBC (DataSource/JdbcTemplate/Tx utilities) -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>

        <!-- Optional: JPA annotations & EntityManager for the JPA helper auto-config.
             Marked optional so non-JPA apps don't pull it in transitively. -->
        <dependency>
            <groupId>jakarta.persistence</groupId>
            <artifactId>jakarta.persistence-api</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- Optional: helpful for tests/IDEs; not required at runtime. -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- Configuration properties metadata (compile-time only) -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- Drivers remain optional; applications choose what they need -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.oracle.database.jdbc</groupId>
            <artifactId>ojdbc11</artifactId>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>xyz.swamedia.dbexec.starter</Automatic-Module-Name>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
