{% set group_id = metadata['repo']['distribution_name'].split(':')|first -%}
{% set artifact_id = metadata['repo']['distribution_name'].split(':')|last -%}
<?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>com.google.cloud</groupId>
  <artifactId>{{metadata['repo']['name']}}-snippets</artifactId>
  <packaging>jar</packaging>
  <name>Google {{metadata['repo']['name_pretty']}} Snippets</name>
  <url>https://github.com/{{metadata['repo']['repo']}}</url>

  <!--
    The parent pom defines common style checks and testing strategies for our samples.
    Removing or replacing it should not affect the execution of the samples in any way.
  -->
  <parent>
    <groupId>com.google.cloud.samples</groupId>
    <artifactId>shared-configuration</artifactId>
    <version>1.2.0</version>
  </parent>

  <properties>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <!-- TODO: switch to libraries-bom after this artifact is included -->
    <dependency>
      <groupId>{{ group_id }}</groupId>
      <artifactId>{{ artifact_id }}</artifactId>
      <version>{{ metadata['latest_version'] }}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <version>1.1.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
