<?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.holixon.avro._</groupId>
    <artifactId>extension</artifactId>
    <version>0.1.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

  <groupId>io.holixon.avro</groupId>
  <artifactId>avro-registry-adapter-axon</artifactId>
  <description>Registry saving schemas into Axon Event Store.</description>

  <properties>
    <jacoco.skip>false</jacoco.skip>
    <axon.version>4.5.8</axon.version>
    <axon-testcontainer.version>0.0.2</axon-testcontainer.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>io.holixon.avro</groupId>
      <artifactId>avro-registry-adapter-default</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.axonframework</groupId>
      <artifactId>axon-spring-boot-starter</artifactId>
      <version>${axon.version}</version>
    </dependency>

    <dependency>
      <groupId>io.projectreactor</groupId>
      <artifactId>reactor-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.holixon.axon.testing</groupId>
      <artifactId>axon-server-testcontainer</artifactId>
      <version>${axon-testcontainer.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
        <configuration>
          <compilerPlugins>
            <plugin>spring</plugin>
            <plugin>no-arg</plugin>
            <plugin>all-open</plugin>
            <plugin>jpa</plugin>
          </compilerPlugins>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>schema</goal>
            </goals>
            <configuration>
              <sourceDirectory>${project.basedir}/src/main/avro/</sourceDirectory>
              <outputDirectory>${project.build.directory}/generated-sources/avro/</outputDirectory>
              <stringType>String</stringType>

            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
