<?xml version="1.0" encoding="UTF-8"?>
<!--

    This file is part of VoltSP.
    Copyright (C) 2024-2026 Volt Active Data Inc. All rights reserved.

-->
<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>org.voltdb</groupId>
        <artifactId>volt-stream</artifactId>
        <version>1.8.5</version>
    </parent>

    <artifactId>volt-stream-connectors-api</artifactId>
    <name>Volt Stream Connectors</name>

    <properties>
        <maven.deploy.skip>false</maven.deploy.skip>
        <maven.compiler.release>17</maven.compiler.release>
    </properties>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://github.com/git/git-scm.com/blob/main/MIT-LICENSE.txt</url>
            <distribution>repo</distribution>
            <comments>A short and simple permissive license</comments>
        </license>
    </licenses>

    <dependencies>
        <!-- Real dependency (not only an annotationProcessorPath) so the Maven reactor builds
             volt-stream-plugin-infrastructure BEFORE this module under -T. This is the single reactor
             ANCHOR for the plugin-infrastructure annotation processor: every other module that uses it as
             an annotationProcessorPath (volt-stream-core, -connectors-core, -network, -yaml-api, plugins/*,
             -e2e-tests) reaches it transitively through volt-stream-connectors-api, so they inherit the
             build-order edge WITHOUT putting this shaded uber-jar (it bundles copies of org.voltdb.stream.api.*
             and slf4j, which would break StreamApplicationClassLoaderTest's allowlist) on their classpath.
             Keep this dependency here. Provided + non-transitive: compile-time processor, not needed at runtime. -->
        <dependency>
            <groupId>org.voltdb</groupId>
            <artifactId>volt-stream-plugin-infrastructure</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.voltdb</groupId>
            <artifactId>volt-stream-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.voltdb</groupId>
            <artifactId>volt-stream-security</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.voltdb</groupId>
                            <artifactId>volt-stream-plugin-infrastructure</artifactId>
                            <version>${project.version}</version>
                        </path>
                    </annotationProcessorPaths>
                    <compilerArgs>
                        <arg>-Aproject.groupId=${project.groupId}</arg>
                        <arg>-Aproject.artifactId=${project.artifactId}</arg>
                        <arg>-Aproject.version=${project.version}</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/java/</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <configuration>
                    <skipSource>false</skipSource>
                    <attach>true</attach>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.4.2</version>
                <configuration>
                    <archive>
                        <manifestSections>
                            <manifestSection>
                                <name>Credits</name>
                                <manifestEntries>
                                    <Author>Volt Active Data, Inc.</Author>
                                </manifestEntries>
                            </manifestSection>
                            <manifestSection>
                                <name>Shared</name>
                                <manifestEntries>
                                    <Title>Volt Stream Processor Connectors Interfaces</Title>
                                    <Date>${maven.build.timestamp}</Date>
                                </manifestEntries>
                            </manifestSection>
                        </manifestSections>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
