<?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>
    <artifactId>vertx-web-parent</artifactId>
    <groupId>io.vertx</groupId>
    <version>5.0.2</version>
  </parent>

  <artifactId>vertx-web-api-service</artifactId>

  <name>Vert.x Web API Service</name>

  <properties>
    <vertx.surefire.useModulePath>false</vertx.surefire.useModulePath>
    <junit5.version>5.7.0</junit5.version>
    <assertj.version>3.15.0</assertj.version>
    <truth.version>1.1.3</truth.version>
    <s>${path.separator}</s>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-service-proxy</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-validation</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-openapi-router</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- Testing dependencies -->
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-codegen-processor</artifactId>
      <type>test-jar</type>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-validation</artifactId>
      <type>test-jar</type>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-junit5</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-client</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit5.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-openapi-router</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <version>${truth.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <executions>
            <execution>
              <id>default-compile</id>
              <configuration>
                <annotationProcessorPaths>
                  <annotationProcessorPath>
                    <groupId>io.vertx</groupId>
                    <artifactId>vertx-codegen</artifactId>
                    <classifier>processor</classifier>
                  </annotationProcessorPath>
                  <annotationProcessorPath>
                    <groupId>io.vertx</groupId>
                    <artifactId>vertx-docgen-processor</artifactId>
                    <classifier>processor</classifier>
                  </annotationProcessorPath>
                </annotationProcessorPaths>
              </configuration>
            </execution>
            <execution>
              <id>default-testCompile</id>
              <configuration>
                <useModulePath>false</useModulePath>
                <annotationProcessors>
                  <annotationProcessor>io.vertx.codegen.processor.Processor</annotationProcessor>
                </annotationProcessors>
                <testCompilerArguments>
                  <processorpath>${project.build.directory}/classes${s}${io.vertx:vertx-codegen-api:jar}${s}${io.vertx:vertx-codegen-json:jar}${s}${io.vertx:vertx-codegen-processor:jar}${s}${io.vertx:vertx-service-proxy:jar}${s}${io.vertx:vertx-web-validation:jar}</processorpath>
                </testCompilerArguments>
                <testExcludes>
                  <exclude>**/Invalid*.java</exclude>
                </testExcludes>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <executions>
            <execution>
              <id>default-test</id>
              <configuration>
                <excludes>
                  <exclude>**/WebApiServiceHandlerTest.java</exclude>
                </excludes>
                <additionalClasspathElements>
                  <additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement>
                </additionalClasspathElements>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>initialize</phase>
            <goals>
              <goal>properties</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>


</project>
