<?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>io.smallrye</groupId>
        <artifactId>smallrye-open-api-parent</artifactId>
        <version>3.3.4</version>
    </parent>

    <artifactId>smallrye-open-api-jaxrs</artifactId>
    <name>SmallRye: OpenAPI extension - JAX-RS</name>

    <properties>
      <version.parsson.json>1.1.1</version.parsson.json>
    </properties>

    <dependencies>
        <!-- SmallRye core implementation -->
        <dependency>
            <groupId>io.smallrye</groupId>
            <artifactId>smallrye-open-api-core</artifactId>
        </dependency>

        <!-- Third Party Libraries -->
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-processor</artifactId>
        </dependency>

        <!-- Test Only Dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-core-spi</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-multipart-provider</artifactId>
          <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus.resteasy.reactive</groupId>
            <artifactId>resteasy-reactive-common</artifactId>
            <version>${version.quarkus}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.microprofile.openapi</groupId>
            <artifactId>microprofile-openapi-tck</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-kotlin</artifactId>
            <version>${version.quarkus}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.parsson</groupId>
            <artifactId>parsson</artifactId>
            <version>${version.parsson.json}</version>
            <scope>test</scope>
        </dependency>

        <!-- Depend on core tests and testsuite data classes -->
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>smallrye-open-api-core</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye</groupId>
            <artifactId>smallrye-open-api-testsuite-data</artifactId>
            <classifier>indexed</classifier>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <environmentVariables>
                        <!-- Used by EnvConfigSourceTestCase -->
                        <SMALLRYE_MP_CONFIG_PROP>1234</SMALLRYE_MP_CONFIG_PROP>
                    </environmentVariables>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                </configuration>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <excludes>
                                <exclude>**/CustomExtensionParsingTests.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>jackson-exclusion-tests</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <include>**/CustomExtensionParsingTests.java</include>
                            </includes>
                            <systemProperties>
                                <classpath.jackson.excluded>true</classpath.jackson.excluded>
                            </systemProperties>
                            <classpathDependencyExcludes>
                                <classpathDependencyExclude>com.fasterxml.jackson.core:jackson-core</classpathDependencyExclude>
                                <classpathDependencyExclude>com.fasterxml.jackson.core:jackson-databind</classpathDependencyExclude>
                                <classpathDependencyExclude>com.fasterxml.jackson.dataformat:jackson-dataformat-yaml</classpathDependencyExclude>
                            </classpathDependencyExcludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>coverage</id>
            <properties>
                <argLine>@{jacocoArgLine}</argLine>
            </properties>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
