<!--
  ~ Copyright (c) Microsoft Corporation. All rights reserved.
  ~ Licensed under the MIT License.
  -->
<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>com.azure</groupId>
    <artifactId>azure-client-sdk-parent</artifactId>
    <version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
    <relativePath>../../parents/azure-client-sdk-parent</relativePath>
  </parent>

  <groupId>com.azure</groupId>
  <artifactId>azure-core-serializer-avro-apache</artifactId>
  <packaging>jar</packaging>
  <version>1.0.0-beta.55</version> <!-- {x-version-update;com.azure:azure-core-serializer-avro-apache;current} -->

  <name>Microsoft Azure Apache Avro Serializer Library</name>
  <description>This package contains the Apache Avro serializer client plugin for azure-core.</description>
  <url>https://github.com/Azure/azure-sdk-for-java</url>

  <licenses>
    <license>
      <name>The MIT License (MIT)</name>
      <url>http://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <distributionManagement>
    <site>
      <id>azure-java-build-docs</id>
      <url>${site.url}/site/${project.artifactId}</url>
    </site>
  </distributionManagement>

  <scm>
    <url>https://github.com/Azure/azure-sdk-for-java</url>
    <connection>scm:git:https://github.com/Azure/azure-sdk-for-java.git</connection>
    <developerConnection>scm:git:https://github.com/Azure/azure-sdk-for-java.git</developerConnection>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <legal><![CDATA[[INFO] Any downloads listed may be third party software.  Microsoft grants you no rights for third party software.]]></legal>
    <javaModulesSurefireArgLine>
      --add-exports com.azure.core.serializer.avro.apache/com.azure.core.serializer.avro.apache.generatedtestsources=org.apache.avro
      --add-opens com.azure.core.serializer.avro.apache/com.azure.core.serializer.avro.apache=ALL-UNNAMED
    </javaModulesSurefireArgLine>
    <checkstyle.excludes>**/generatedtestsources/**/*.java</checkstyle.excludes>

    <!-- Enables fail on deprecated API usage. -->
    <compiler.failondeprecatedstatus/>

    <javadoc.excludePackageNames>com.azure.json,com.azure.core.implementation*,com.azure.core.util,com.azure.core.util*,com.azure.core.models,
      com.azure.core.http,com.azure.core.http.policy,com.azure.core.http.rest,com.azure.core.exception,com.azure.core.cryptography, com.azure.core.credential,
      com.azure.core.client.traits,com.azure.core.annotation
    </javadoc.excludePackageNames>

    <checkstyle.suppressionsLocation>checkstyle-suppressions.xml</checkstyle.suppressionsLocation>

    <spotbugs.skip>false</spotbugs.skip>
    <spotbugs.excludeFilterFile>spotbugs-exclude.xml</spotbugs.excludeFilterFile>
    <animal.sniffer.skip>false</animal.sniffer.skip>
  </properties>

  <developers>
    <developer>
      <id>microsoft</id>
      <name>Microsoft</name>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core</artifactId>
      <version>1.55.2</version> <!-- {x-version-update;com.azure:azure-core;current} -->
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core-experimental</artifactId>
      <version>1.0.0-beta.59</version> <!-- {x-version-update;com.azure:azure-core-experimental;current} -->
    </dependency>

    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
      <version>1.11.4</version> <!-- {x-version-update;org.apache.avro:avro;external_dependency} -->
    </dependency>

    <dependency>
      <groupId>io.projectreactor</groupId>
      <artifactId>reactor-test</artifactId>
      <version>3.4.41</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.11.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.11.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>5.11.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.5.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
        <configuration>
          <rules>
            <bannedDependencies>
              <includes>
                <include>org.apache.avro:avro:[1.11.4]</include> <!-- {x-include-update;org.apache.avro:avro;external_dependency} -->
              </includes>
            </bannedDependencies>
          </rules>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>generate-avro</id>
      <activation>
        <property>
          <name>generate-avro</name>
        </property>
      </activation>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro-maven-plugin</artifactId>
            <version>1.11.4</version> <!-- {x-version-update;org.apache.avro:avro-maven-plugin;external_dependency} -->
            <executions>
              <execution>
                <phase>generate-sources</phase>
                <goals>
                  <goal>schema</goal>
                </goals>
                <configuration>
                  <testSourceDirectory>src/test/resources/avro/</testSourceDirectory>
                  <testOutputDirectory>${project.basedir}/src/test/java/</testOutputDirectory>
                  <testIncludes>
                    <testInclude>**/*.avro</testInclude>
                  </testIncludes>
                  <stringType>String</stringType>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
