<?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>
  <groupId>{{module.group_id}}</groupId>
  <artifactId>{{module.artifact_id}}</artifactId>
  <version>{{module.version}}</version><!-- {x-version-update:{{module.artifact_id}}:current} -->
  <packaging>jar</packaging>
  <name>Google {{name}}</name>
  {%- if not monorepo %}
  <url>https://github.com/{{repo}}</url>
  {%- endif %}
  <description>{{name}} {{description}}</description>
  <parent>
    <groupId>{{parent_module.group_id}}</groupId>
    <artifactId>{{parent_module.artifact_id}}</artifactId>
    <version>{{parent_module.version}}</version><!-- {x-version-update:{{module.artifact_id}}:current} -->
  </parent>
  <properties>
    <site.installationModule>{{module.artifact_id}}</site.installationModule>
  </properties>
  <dependencies>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-stub</artifactId>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-protobuf</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>api-common</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>proto-google-common-protos</artifactId>
    </dependency>
{% for module in proto_modules %}
    <dependency>
      <groupId>{{module.group_id}}</groupId>
      <artifactId>{{module.artifact_id}}</artifactId>
    </dependency>{% endfor %}
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>gax</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>gax-grpc</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>gax-httpjson</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>proto-google-iam-v1</artifactId>
    </dependency>
{%- if not monorepo %}
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>grpc-google-common-protos</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>grpc-google-iam-v1</artifactId>
    </dependency>
{%- endif %}
    <dependency>
      <groupId>org.threeten</groupId>
      <artifactId>threetenbp</artifactId>
    </dependency>

    <!-- Test dependencies -->
{%- if monorepo %}
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>grpc-google-common-protos</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>grpc-google-iam-v1</artifactId>
      <scope>test</scope>
    </dependency>
{%- endif %}
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
{% for module in grpc_modules %}
    <dependency>
      <groupId>{{module.group_id}}</groupId>
      <artifactId>{{module.artifact_id}}</artifactId>
      <scope>test</scope>
    </dependency>{% endfor %}
    <!-- Need testing utility classes for generated gRPC clients tests -->
    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>gax</artifactId>
      <classifier>testlib</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>gax-grpc</artifactId>
      <classifier>testlib</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>gax-httpjson</artifactId>
      <classifier>testlib</classifier>
      <scope>test</scope>
    </dependency>
  </dependencies>

  {%- if not monorepo %}
  <profiles>
    <profile>
      <id>java9</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <dependencies>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
        </plugin>
    </plugins>
  </build>
  {%- endif %}
</project>
