<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.wcm.caravan</groupId>
    <artifactId>io.wcm.caravan.parent_toplevel</artifactId>
    <version>1.5.0</version>
    <relativePath />
  </parent>

  <groupId>io.wcm.caravan</groupId>
  <artifactId>io.wcm.caravan.rhyme.parent</artifactId>
  <version>1.2.2</version>
  <packaging>pom</packaging>

  <name>Rhyme - Parent</name>
  <description>Common parent POM for the Caravan Rhyme bundles</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>

  <ciManagement>
    <system>GitHub Actions</system>
    <url>https://github.com/wcm-io-caravan/caravan-rhyme/actions</url>
  </ciManagement>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/wcm-io-caravan/caravan-rhyme/issues/</url>
  </issueManagement>

  <properties>
    <site.url.module.prefix>rhyme</site.url.module.prefix>
    <sonar.coverage.jacoco.xmlReportPaths>${maven.multiModuleProjectDirectory}/tooling/coverage/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- Jackson -->
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>2.11.4</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>2.11.4</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.11.4</version>
      </dependency>
      <!-- RxJava 1 -->
      <dependency>
        <groupId>io.reactivex</groupId>
        <artifactId>rxjava</artifactId>
        <version>1.3.8</version>
      </dependency>
      <dependency>
        <groupId>io.wcm.osgi.wrapper</groupId>
        <artifactId>io.wcm.osgi.wrapper.rxjava</artifactId>
        <version>1.3.8-0000</version>
      </dependency>
      <!-- RxJava 3  -->
      <dependency>
        <groupId>org.reactivestreams</groupId>
        <artifactId>reactive-streams</artifactId>
        <version>1.0.3</version>
      </dependency>
      <dependency>
        <groupId>io.reactivex.rxjava3</groupId>
        <artifactId>rxjava</artifactId>
        <version>3.1.3</version>
      </dependency>
      <dependency>
        <groupId>com.github.akarnokd</groupId>
        <artifactId>rxjava3-interop</artifactId>
        <version>3.1.1</version>
      </dependency>

      <!-- Byte Buddy for creating dynamic proxies of classes -->
      <dependency>
        <groupId>net.bytebuddy</groupId>
        <artifactId>byte-buddy</artifactId>
        <version>1.12.6</version>
      </dependency>

      <!-- OSGI/JAX-RS integration -->
      <dependency>
        <groupId>org.apache.aries.spec</groupId>
        <artifactId>org.apache.aries.javax.jax.rs-api</artifactId>
        <version>1.0.4</version>
      </dependency>
      <dependency>
        <groupId>org.osgi</groupId>
        <artifactId>org.osgi.service.jaxrs</artifactId>
        <version>1.0.0</version>
      </dependency>

      <!-- Use lastest Mockito version as we are using JUnit 5 -->
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>4.11.0</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>4.11.0</version>
      </dependency>

    </dependencies>

  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
            <topSiteURL>${site.deploy.url}</topSiteURL>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemPropertyVariables>
              <org.slf4j.simpleLogger.logFile>target/surefire-slf4j.log</org.slf4j.simpleLogger.logFile>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <configuration>
           <!-- only instrument wcm.io Caravan classes -->
            <includes>
              <include>io/wcm/caravan/**/*</include>
            </includes>
          </configuration>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
       <plugin>
         <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      io.wcm.caravan.maven.plugins
                    </groupId>
                    <artifactId>
                      rhyme-docs-maven-plugin
                    </artifactId>
                    <versionRange>
                      [1.0.0,)
                    </versionRange>
                    <goals>
                      <goal>generate-rhyme-docs</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

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

</project>
