<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://maven.apache.org/POM/4.0.0"
  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>
  <groupId>com.github.imrafaelmerino</groupId>
  <artifactId>avro-spec</artifactId>
  <packaging>jar</packaging>
  <version>1.0.0</version>
  <name>avro-spec</name>
  <description>The library offers a set of builders and utilities to construct Avro schemas from
    specs and provides serializers
    and deserializers tailored to these schemas to transmit the immutable and persistent JSON from
    json-values.
  </description>
  <url>https://github.com/imrafaelmerino/avro-spec</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>imrafaelmerino</id>
      <name>Rafael Merino García</name>
      <email>imrafael.merino@gmail.com</email>
    </developer>
  </developers>
  <scm>
    <url>https://github.com/imrafaelmerino/avro-spec.git</url>
  </scm>
  <properties>
    <error-prone.version>2.36.0</error-prone.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <NEXUS-STAGING-MAVEN-PLUGIN.VERSION>1.6.12</NEXUS-STAGING-MAVEN-PLUGIN.VERSION>
    <MAVEN-GPG-PLUGIN.VERSION>1.6</MAVEN-GPG-PLUGIN.VERSION>
    <MAVEN-SOURCE-PLUGIN.VERSION>3.0.1</MAVEN-SOURCE-PLUGIN.VERSION>
    <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
    <MAVEN-COMPILER-PLUGIN.VERSION>3.13.0</MAVEN-COMPILER-PLUGIN.VERSION>
    <MAVEN-SUREFIRE-PLUGIN.VERSION>3.5.2</MAVEN-SUREFIRE-PLUGIN.VERSION>
    <MAVEN-JAR-PLUGIN.VERSION>3.4.2</MAVEN-JAR-PLUGIN.VERSION>
    <JUNIT-JUPITER-API.VERSION>5.8.2</JUNIT-JUPITER-API.VERSION>
    <JSON-VALUES.VERSION>14.0.0-RC3</JSON-VALUES.VERSION>
    <MAVEN-JAVADOC-PLUGIN.VERSION>3.11.1</MAVEN-JAVADOC-PLUGIN.VERSION>
    <MAVEN-COMPILER-PLUGIN.SOURCE>21</MAVEN-COMPILER-PLUGIN.SOURCE>
    <MAVEN-COMPILER-PLUGIN.TARGET>21</MAVEN-COMPILER-PLUGIN.TARGET>
    <AVRO-VERSION>1.12.0</AVRO-VERSION>
    <KAFKA-AVRO-SERIALIZER.VERSION>7.7.1</KAFKA-AVRO-SERIALIZER.VERSION>
    <JIO-TEST.VERSION>3.0.0-RC2</JIO-TEST.VERSION>
    <LOGBACK-CLASSIC.VERSION>1.5.12</LOGBACK-CLASSIC.VERSION>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.github.imrafaelmerino</groupId>
      <artifactId>json-values</artifactId>
      <version>${JSON-VALUES.VERSION}</version>
    </dependency>

    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>kafka-avro-serializer</artifactId>
      <version>${KAFKA-AVRO-SERIALIZER.VERSION}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
      <version>${AVRO-VERSION}</version>
    </dependency>

    <dependency>
      <groupId>com.github.imrafaelmerino</groupId>
      <artifactId>jio-test</artifactId>
      <version>${JIO-TEST.VERSION}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${LOGBACK-CLASSIC.VERSION}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>3.1.2</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${MAVEN-COMPILER-PLUGIN.VERSION}</version>
        <configuration>
          <source>${MAVEN-COMPILER-PLUGIN.SOURCE}</source>
          <target>${MAVEN-COMPILER-PLUGIN.TARGET}</target>
          <showWarnings>true</showWarnings>
          <encoding>${project.build.sourceEncoding}</encoding>
          <compilerArgs>
            <arg>-XDcompilePolicy=simple</arg>
            <arg>--should-stop=ifError=FLOW</arg>
            <arg>-Xplugin:ErrorProne -Xep:DeadException:WARN -Xep:GuardedBy:OFF</arg>
            <arg>-Xlint:all</arg>
          </compilerArgs>
          <annotationProcessorPaths>
            <path>
              <groupId>com.google.errorprone</groupId>
              <artifactId>error_prone_core</artifactId>
              <version>${error-prone.version}</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
        <executions>
          <execution>
            <id>default-testCompile</id>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <compilerArgs>
                <arg>--enable-preview</arg>
              </compilerArgs>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${MAVEN-SUREFIRE-PLUGIN.VERSION}</version>
        <configuration>
          <argLine>--enable-preview</argLine>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${MAVEN-JAR-PLUGIN.VERSION}</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>avro_spec</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${MAVEN-JAVADOC-PLUGIN.VERSION}</version>
        <configuration>
          <source>${MAVEN-COMPILER-PLUGIN.SOURCE}</source>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>local</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <distributionManagement>
        <repository>
          <id>releases</id>
          <name>Repositorio de releases</name>
          <url>http://127.0.0.1:8081/repository/maven-releases/</url>
        </repository>
        <snapshotRepository>
          <id>snapshots</id>
          <name>Repositorio de snapshots</name>
          <url>http://127.0.0.1:8081/repository/maven-snapshots/</url>
        </snapshotRepository>
      </distributionManagement>
    </profile>
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <distributionManagement>
        <snapshotRepository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${NEXUS-STAGING-MAVEN-PLUGIN.VERSION}</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${MAVEN-GPG-PLUGIN.VERSION}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${MAVEN-SOURCE-PLUGIN.VERSION}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <repositories>
    <repository>
      <id>confluent</id>
      <url>https://packages.confluent.io/maven/</url>
    </repository>
  </repositories>
</project>
