<?xml version="1.0" encoding="UTF-8"?>
<!--
 - Copyright (C) 2022-2023 ConnectorIO Sp. z o.o.
 -
 - 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.
 -
 - SPDX-License-Identifier: Apache-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>org.connectorio</groupId>
    <artifactId>testcontainers</artifactId>
    <version>0.1.0</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <groupId>org.connectorio.testcontainers</groupId>
  <artifactId>parent</artifactId>
  <packaging>pom</packaging>

  <name>ConnectorIO - Test Containers - Parent</name>
  <description>Parent project for ConnectorIO testcontainers.</description>

  <properties>
    <compiler.source>11</compiler.source>
    <compiler.target>11</compiler.target>

    <slf4j.version>1.7.12</slf4j.version>
    <openapi-generator.version>5.4.0</openapi-generator.version>

    <testcontainers.version>1.17.6</testcontainers.version>
    <junit.version>5.9.2</junit.version>
    <log4j2.version>2.17.1</log4j2.version>
    <assertj.version>3.23.1</assertj.version>

    <openapi-generator.version>5.4.0</openapi-generator.version>
    <connectorio-openapi-generators.version>${openapi-generator.version}</connectorio-openapi-generators.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.connectorio.testcontainers</groupId>
        <artifactId>karaf</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.connectorio.testcontainers</groupId>
        <artifactId>openhab</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers</artifactId>
        <version>${testcontainers.version}</version>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>${testcontainers.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>${log4j2.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-slf4j-impl</artifactId>
        <version>${log4j2.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.1.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>

        <plugin>
          <groupId>org.openapitools</groupId>
          <artifactId>openapi-generator-maven-plugin</artifactId>
          <version>${openapi-generator.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>generate</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <generatorName>connectorio-java-basic-native</generatorName>
            <output>${project.build.directory}/openapi</output>
            <strictSpec>false</strictSpec>
            <skipValidateSpec>true</skipValidateSpec>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.connectorio.openapi.generators</groupId>
              <artifactId>java-basic-native</artifactId>
              <version>${connectorio-openapi-generators.version}</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>