<?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.apiman.plugins</groupId>
    <artifactId>apiman-plugins</artifactId>
    <version>2.1.1.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>apiman-plugins-keycloak-oauth-policy</artifactId>
  <packaging>war</packaging>
  <name>apiman-plugins-keycloak-oauth-policy</name>

  <dependencies>
    <!-- Non apiman deps -->

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-adapter-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-core</artifactId>
    </dependency>

    <!-- apiman dependencies (must be excluded from the WAR) -->
    <dependency>
      <groupId>io.apiman</groupId>
      <artifactId>apiman-gateway-engine-beans</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.apiman</groupId>
      <artifactId>apiman-gateway-engine-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.apiman</groupId>
      <artifactId>apiman-gateway-engine-policies</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- Testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
      <!-- <scope>test</scope> -->
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-all</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- mockserver -->
    <dependency>
      <groupId>org.mock-server</groupId>
      <artifactId>mockserver-netty</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mock-server</groupId>
      <artifactId>mockserver-junit-rule</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <filtering>false</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
          <webResources>
            <resource>
              <directory>src/main/apiman</directory>
              <targetPath>META-INF/apiman</targetPath>
              <filtering>true</filtering>
            </resource>
          </webResources>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
