<?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>
    <parent>
        <groupId>ai.wanaku</groupId>
        <artifactId>core</artifactId>
        <version>0.1.1-SNAPSHOT</version>
    </parent>

    <artifactId>core-exchange</artifactId>
    <name>Wanaku :: Core :: Exchange</name>

    <dependencies>
        <dependency>
            <groupId>ai.wanaku</groupId>
            <artifactId>core-util</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-grpc</artifactId>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/proto</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven-dependency-plugin.version}</version>
                <executions>
                    <execution>
                        <id>unpack-source-jar</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>ai.wanaku.sdk</groupId>
                                    <artifactId>capabilities-exchange</artifactId>
                                    <version>${wanaku-capabilities-sdk.version}</version>
                                    <classifier>sources</classifier>
                                    <outputDirectory>${project.basedir}/src/main/proto</outputDirectory>
                                    <includes>**/*.proto</includes>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>${quarkus.platform.group-id}</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <sourcepath>${project.basedir}/src/main/java:${project.build.directory}/generated-sources/grpc</sourcepath>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>