<?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">
    <parent>
        <artifactId>quarkus-mongodb-panache-parent</artifactId>
        <groupId>io.quarkus</groupId>
        <version>1.2.1.Final</version>
        <relativePath>../</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>quarkus-mongodb-panache</artifactId>
    <name>Quarkus - MongoDB with Panache - Runtime</name>
    <description>Use an active record or repository pattern with MongoDB</description>
    <dependencies>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-panache-common</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-panacheql</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-mongodb-client</artifactId>
        </dependency>
        <!-- This is optional to avoid pulling libraries if jax-rs/jsonb is not on the path-->
        <!-- But needed to provides default serializer/deserializer for JsonB -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-jsonb</artifactId>
            <optional>true</optional>
        </dependency>
        <!-- This is optional to avoid pulling libraries if jackson is not on the path-->
        <!-- But needed to provides default serializer/deserializer for Jackson -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-jackson</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
            </plugin>
            <!-- The entity classes needs to be indexed -->
            <plugin>
                <groupId>org.jboss.jandex</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>make-index</id>
                        <goals>
                            <goal>jandex</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <fileSets>
                        <fileSet>
                            <directory>${project.build.directory}/classes</directory>
                            <excludes>
                                <!-- We avoid indexing it as it needs to be included in the apps only if jaxrs and jsonb are. -->
                                <exclude>**/PanacheMongoJsonbContextResolver.class</exclude>
                                <!-- We avoid indexing it as it needs to be included in the apps only if jackson is. -->
                                <exclude>**/ObjectMapperProducer.class</exclude>
                            </excludes>
                        </fileSet>
                    </fileSets>
                </configuration>
            </plugin>
        </plugins>
    </build>


</project>