<?xml version="1.0"?>
<!--
  ~ Copyright (c) 2011-2014 The original author or authors
  ~
  ~  All rights reserved. This program and the accompanying materials
  ~  are made available under the terms of the Eclipse Public License v1.0
  ~  and Apache License v2.0 which accompanies this distribution.
  ~
  ~      The Eclipse Public License is available at
  ~      http://www.eclipse.org/legal/epl-v10.html
  ~
  ~      The Apache License v2.0 is available at
  ~      http://www.opensource.org/licenses/apache2.0.php
  ~
  ~  You may elect to redistribute this code under either of these licenses.
  -->
<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>io.vertx</groupId>
    <artifactId>vertx-grpc-aggregator</artifactId>
    <version>5.1.3</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <name>vertx-grpc-docs</name>
  <artifactId>vertx-grpc-docs</artifactId>

  <dependencies>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-grpcio-server</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-grpc-reflection</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-grpc-transcoding</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-grpc-health</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-grpcio-client</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-grpc-eventbus</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-stub</artifactId>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <configuration>
            <skip>true</skip>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-compile</id>
            <configuration>
              <annotationProcessorPaths>
                <annotationProcessorPath>
                  <groupId>io.vertx</groupId>
                  <artifactId>vertx-docgen-processor</artifactId>
                  <classifier>processor</classifier>
                </annotationProcessorPath>
              </annotationProcessorPaths>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.github.ascopes</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <configuration>
          <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
          <cleanOutputDirectories>false</cleanOutputDirectories>
          <jvmMavenPlugins>
            <jvmMavenPlugin>
              <groupId>io.vertx</groupId>
              <artifactId>vertx-grpc-protoc-plugin2</artifactId>
              <version>${project.version}</version>
              <mainClass>io.vertx.grpc.plugin.VertxGrpcGenerator</mainClass>
              <options>grpc-client=true,grpc-service=true,grpc-io=true</options>
            </jvmMavenPlugin>
          </jvmMavenPlugins>
          <!--jvmMavenPlugins>
            <jvmMavenPlugin>
              <groupId>io.vertx</groupId>
              <artifactId>vertx-grpc-protoc-plugin2</artifactId>
              <version>${project.version}</version>
              <mainClass>io.vertx.grpc.plugin.VertxGrpcGenerator</mainClass>
              <jvmArgs>
                <jvmArg>-grpc-client</jvmArg>
                <jvmArg>-grpc-service</jvmArg>
                <jvmArg>-grpc-io</jvmArg>
              </jvmArgs>
            </jvmMavenPlugin>
          </jvmMavenPlugins-->
        </configuration>
        <executions>
          <execution>
            <id>compile</id>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
          <execution>
            <id>test-compile</id>
            <goals>
              <goal>generate-test</goal>
            </goals>
            <configuration>
              <sourceDirectories>${project.basedir}/src/main/proto</sourceDirectories>
              <javaEnabled>false</javaEnabled>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>package-docs</id>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
