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

    Copyright 2022 N5 Technologies, Inc.

    This product includes software developed at N5 Technologies, Inc
    (http://www.n5corp.com/) and software licenced to N5 Technologies,
    Inc under one or more contributor license agreements.

    N5 Technologies, Inc licenses this file to you under the Polyform
    Internal Use License Version 1.1.0 (the "License"); you may not use
    this file except in compliance with the License.  You may obtain a
    copy of the License at:

        https://polyformproject.org/licenses/internal-use/1.0.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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">
    <name>Rumi DocChat API</name>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>nvx-rumi-docchat-api</artifactId>
    <packaging>jar</packaging>

    <parent>
        <groupId>com.neeve</groupId>
        <artifactId>nvx-rumi-docchat-parent</artifactId>
        <version>1.0.25</version>
    </parent>

    <dependencies>
        <!-- ROE module -->
        <dependency>
            <groupId>com.neeve</groupId>
            <artifactId>nvx-rumi-docchat-roe</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Jetty 12 -->
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.ee10</groupId>
            <artifactId>jetty-ee10-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.ee10</groupId>
            <artifactId>jetty-ee10-servlets</artifactId>
        </dependency>

        <!-- Jersey 3.1 (Jakarta EE 10) -->
        <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.inject</groupId>
            <artifactId>jersey-hk2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-sse</artifactId>
        </dependency>

        <!-- HTTP Client for Claude/GitBook APIs -->
        <dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
            <version>5.3.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Generate code from ADM models -->
            <plugin>
                <groupId>com.neeve</groupId>
                <artifactId>nvx-rumi-adm-maven-plugin</artifactId>
                <version>${nvx.rumi.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.neeve</groupId>
                        <artifactId>nvx-rumi</artifactId>
                        <version>${nvx.rumi.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>Generate-DocChat-State</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>adm-generate</goal>
                        </goals>
                        <configuration>
                            <modelFile>${basedir}/src/main/models/com/neeve/docchat/api/state/state.xml</modelFile>
                            <encodingType>Quark</encodingType>
                        </configuration>
                    </execution>
                    <execution>
                        <id>Generate-DocChat-Messages</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>adm-generate</goal>
                        </goals>
                        <configuration>
                            <modelFile>${basedir}/src/main/models/com/neeve/docchat/api/messages/messages.xml</modelFile>
                            <encodingType>Quark</encodingType>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Include models in resources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.1</version>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <includes>
                    <include>**</include>
                </includes>
            </resource>
            <resource>
                <directory>${basedir}/src/main/models</directory>
                <includes>
                    <include>**</include>
                </includes>
            </resource>
        </resources>
    </build>
</project>
