<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2017 Red Hat, Inc. and/or its affiliates.
  ~
  ~ Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
  -->
<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.thorntail</groupId>
    <artifactId>build-parent</artifactId>
    <version>2.7.0.Final</version>
    <relativePath>../../../build-parent/pom.xml</relativePath>
  </parent>

  <artifactId>microprofile-openapi</artifactId>

  <name>MicroProfile OpenAPI</name>
  <description>An implementation of the MP-OpenAPI specification first introduced in MP 1.3</description>

  <packaging>jar</packaging>

  <properties>
    <swarm.fraction.stability>stable</swarm.fraction.stability>
    <swarm.fraction.tags>MicroProfile,OpenAPI,JaxRs,Web</swarm.fraction.tags>
  </properties>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit47</artifactId>
            <version>${version.surefire.plugin}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <!-- Fraction Dependencies -->
    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>jaxrs</artifactId>
    </dependency>

    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>microprofile-config</artifactId>
    </dependency>

    <!-- SmallRye OpenAPI -->
    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-open-api</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.osgi</groupId>
          <artifactId>org.osgi.annotation.versioning</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Provided APIs -->
    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>spi</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>meta-spi</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.wildfly.core</groupId>
      <artifactId>wildfly-core-feature-pack</artifactId>
      <type>zip</type>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.wildfly</groupId>
      <artifactId>wildfly-servlet-feature-pack</artifactId>
      <type>zip</type>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.wildfly</groupId>
      <artifactId>wildfly-feature-pack</artifactId>
      <type>zip</type>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- needs to come _after_ WildFly feature packs, because in case of conflicts, the last one wins -->
    <dependency>
      <groupId>io.thorntail</groupId>
      <artifactId>microprofile-config-wildfly-feature-pack</artifactId>
      <type>zip</type>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Test Only -->
    <dependency>
      <groupId>org.skyscreamer</groupId>
      <artifactId>jsonassert</artifactId>
      <version>${version.org.skyscreamer.jsonassert}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.eclipse.microprofile.openapi</groupId>
      <artifactId>microprofile-openapi-tck</artifactId>
      <version>${version.microprofile-openapi}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>javax.servlet-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.ws.rs</groupId>
          <artifactId>javax.ws.rs-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.jboss.shrinkwrap.resolver</groupId>
      <artifactId>shrinkwrap-resolver-depchain</artifactId>
      <scope>test</scope>
      <type>pom</type>
      <exclusions>
        <exclusion>
          <groupId>javax.enterprise</groupId>
          <artifactId>cdi-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-settings</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-interpolation</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.sonatype.plexus</groupId>
          <artifactId>plexus-sec-dispatcher</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>

