<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  wcm.io
  %%
  Copyright (C) 2021 wcm.io
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.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.
  #L%
  -->

<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.wcm.caravan</groupId>
    <artifactId>io.wcm.caravan.rhyme.parent</artifactId>
    <version>1.1.0</version>
    <relativePath>../tooling/parent/pom.xml</relativePath>
  </parent>

  <artifactId>io.wcm.caravan.rhyme.testing</artifactId>
  <version>1.0.0</version>
  <packaging>bundle</packaging>

  <name>Rhyme - Testing Support</name>
  <description>Additional classes for unit / integration tests (but are only meant to be used as test scoped dependencies)</description>

  <scm>
    <connection>scm:git:https://github.com/wcm-io-caravan/caravan-rhyme.git</connection>
    <developerConnection>scm:git:https://github.com/wcm-io-caravan/caravan-rhyme.git</developerConnection>
    <url>https://github.com/wcm-io-caravan/caravan-rhyme</url>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <site.url.module.prefix>rhyme/testing</site.url.module.prefix>
    <spring-boot.version>2.5.8</spring-boot.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <!-- Import dependency management from Spring Boot -->
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>provided</scope>
      <version>4.0.1</version>
    </dependency>
    <!-- wcm.io -->
    <dependency>
      <groupId>io.wcm.caravan</groupId>
      <artifactId>io.wcm.caravan.rhyme.core</artifactId>
      <version>1.1.0</version>
      <scope>compile</scope>
    </dependency>
    <!-- AssertJ for fluent assertions -->
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
    </dependency>
    <!-- Spring Dependencies - marked as optional to not pollute the classpath for non-spring modules -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <optional>true</optional>
      <exclusions>
        <exclusion>
          <groupId>org.junit.vintage</groupId>
          <artifactId>junit-vintage-engine</artifactId>
        </exclusion>
        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- Wiremock for testing HalResource loader implementations -->
    <dependency>
      <groupId>com.github.tomakehurst</groupId>
      <artifactId>wiremock-jre8-standalone</artifactId>
      <version>2.27.2</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
    </dependency>
    <!-- Apache HTTP clients for integration tests -->
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient-osgi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore-osgi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpasyncclient-osgi</artifactId>
    </dependency>
  </dependencies>

  <distributionManagement>
    <site>
      <id>${site.deploy.id}</id>
      <url>${site.deploy.url}/${site.url.module.prefix}</url>
    </site>
  </distributionManagement>

</project>
