<?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>com.io7m.idstore</artifactId>
    <groupId>com.io7m.idstore</groupId>
    <version>1.2.1</version>
  </parent>

  <artifactId>com.io7m.idstore.model</artifactId>

  <name>com.io7m.idstore.model</name>
  <description>Identity server (Model)</description>
  <url>https://www.io7m.com/software/idstore</url>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.io7m.idstore.error_codes</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.annotation.bundle</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.annotation.versioning</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.sanctionco.jmail</groupId>
      <artifactId>jmail</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.io7m.stmp</groupId>
        <artifactId>string-template-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-version</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>render</goal>
            </goals>
            <configuration>
              <templates>
                <template>
                  <directory>src/main/string-template</directory>
                  <name>IdVersion</name>
                  <target>
                    ${project.build.directory}/generated-sources/string-template/com/io7m/idstore/model/IdVersion.java
                  </target>
                  <properties>
                    <appVersion>${project.version}</appVersion>
                    <appBuild>${buildNumber}</appBuild>
                  </properties>
                </template>
              </templates>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
