<!-- 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/maven-v4_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-communication-chat</artifactId>
  <version>1.0.1</version> <!-- {x-version-update;com.azure:azure-communication-chat;current} -->

  <name>Microsoft Azure client library for chat application</name>
  <description>
    This package contains a Java SDK for Chat Azure Communication Service.
    For this release, see notes - https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-chat/README.md and https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/communication/azure-communication-chat/CHANGELOG.md.
    Microsoft Azure Communication Chat quickstart - https://docs.microsoft.com/azure/communication-services/quickstarts/chat/get-started?pivots=programming-language-java
  </description>
  <url>https://github.com/Azure/azure-sdk-for-java</url>

  <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>
  </scm>

  <properties>
    <jacoco.min.linecoverage>0.70</jacoco.min.linecoverage>
    <jacoco.min.branchcoverage>0.45</jacoco.min.branchcoverage>
    <jacoco.skip.coverage.check>false</jacoco.skip.coverage.check>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core</artifactId>
      <version>1.16.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-communication-common</artifactId>
      <version>1.0.1</version> <!-- {x-version-update;com.azure:azure-communication-common;current} -->
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-communication-identity</artifactId>
      <version>1.1.0</version> <!-- {x-version-update;com.azure:azure-communication-identity;current} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core-test</artifactId>
      <version>1.6.2</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.nimbusds</groupId>
      <artifactId>nimbus-jose-jwt</artifactId>
      <version>9.8.1</version> <!-- {x-version-update;com.nimbusds:nimbus-jose-jwt;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.7.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.7.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.7.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core-http-okhttp</artifactId>
      <version>1.6.2</version> <!-- {x-version-update;com.azure:azure-core-http-okhttp;dependency} -->
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
        <configuration>
          <includes>
            <include>com/azure/communication/chat/*.class</include>
          </includes>
        </configuration>
        <executions>
          <execution>
            <id>coverage-report</id>
            <phase>verify</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
        <configuration>
          <rules>
            <bannedDependencies>
              <includes>
                <include>com.azure:*</include>
              </includes>
            </bannedDependencies>
          </rules>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <version>0.11.2</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
        <configuration>
          <analysisConfiguration>
            <revapi.ignore>
              <item>
                <code>java.method.added</code>
                <class>com.azure.core.http.rest.PagedFlux</class>
                <justification>Transitive from Core. Not our problem</justification>
              </item>
            </revapi.ignore>
          </analysisConfiguration>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>java-lts</id>
      <activation>
        <jdk>[11,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
            <configuration>
              <argLine>
                --add-opens com.azure.communication.common/com.azure.communication.common.implementation=ALL-UNNAMED
              </argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>disable-coverage-if-identity</id>
      <activation>
        <property>
          <name>env.TEST_PACKAGES_ENABLED</name>
          <value>identity</value>
        </property>
      </activation>
      <properties>
        <src.dir>src/main</src.dir>
        <test.dir>src/test</test.dir>
        <jacoco.skip.coverage.check>true</jacoco.skip.coverage.check>
      </properties>
    </profile>
     <profile>
      <id>disable-coverage-if-phonenumbers</id>
      <activation>
        <property>
          <name>env.TEST_PACKAGES_ENABLED</name>
          <value>phonenumbers</value>
        </property>
      </activation>
      <properties>
        <src.dir>src/main</src.dir>
        <test.dir>src/test</test.dir>
        <jacoco.skip.coverage.check>true</jacoco.skip.coverage.check>
      </properties>
    </profile>
    <profile>
      <id>disable-coverage-if-sms</id>
      <activation>
        <property>
          <name>env.TEST_PACKAGES_ENABLED</name>
          <value>sms</value>
        </property>
      </activation>
      <properties>
        <src.dir>src/main</src.dir>
        <test.dir>src/test</test.dir>
        <jacoco.skip.coverage.check>true</jacoco.skip.coverage.check>
      </properties>
    </profile>
  </profiles>
</project>
