<!-- 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.6.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
    <relativePath>../../../pom.client.xml</relativePath>
  </parent>

  <groupId>com.azure</groupId>
  <artifactId>azure-core-test</artifactId>
  <packaging>jar</packaging>
  <version>1.0.0</version> <!-- {x-version-update;com.azure:azure-core-test;current} -->

  <name>Microsoft Azure Java Core Test Library</name>
  <description>This package contains core test types for Azure Java clients.</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>
    <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.automatic.module.name>com.azure.core.test</project.automatic.module.name>
  </properties>

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

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

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.tomakehurst</groupId>
      <artifactId>wiremock-standalone</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-http</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!--The plugin may outdated with WireWork. TODO: Move to WireWork.
      Issue: https://github.com/Azure/azure-sdk-for-java/issues/3255-->
      <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <configuration>
          <httpConnector>
            <port>11081</port>
          </httpConnector>
          <webApp>
            <contextPath>/javasdktest/upload</contextPath>
          </webApp>
          <webAppSourceDirectory>temp/</webAppSourceDirectory>
        </configuration>
      </plugin>

      <!--The plugin may outdated with WireWork. TODO: Move to WireWork.
      Issue: https://github.com/Azure/azure-sdk-for-java/issues/3255-->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals><goal>java</goal></goals>
          </execution>
        </executions>
        <configuration>
          <mainClass>com.azure.core.MockServer</mainClass>
          <classpathScope>test</classpathScope>
        </configuration>
      </plugin>

      <!-- RestProxyTests is inherited by tests in azure-core-http-netty -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
        <executions>
          <execution>
            <id>test-jar</id>
            <phase>test-compile</phase>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
