<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2015-2017 Oracle and/or its affiliates. All rights reserved.
  -->
<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>io.helidon.demo.todos</groupId>
    <artifactId>helidon-todos-cassandra</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>Helidon Examples TODOs Demo Cassandra database image</name>

    <properties>
        <docker.image.name>${docker.registry}/io/helidon/demo/${project.artifactId}</docker.image.name>
        <docker.server.id>helidon-docker-registry</docker.server.id>
        <docker.registry>helidon.demos</docker.registry>
        <docker.registry.url>https://${docker.registry}/</docker.registry.url>
        <docker.image.version>${project.version}</docker.image.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.7</version>
                <executions>
                    <execution>
                        <id>copy-docker-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/distribution/container</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/docker</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.4.11</version>
                <configuration>
                    <serverId>${docker.server.id}</serverId>
                    <registryUrl>${docker.registry.url}</registryUrl>
                    <imageName>${docker.image.name}</imageName>
                    <dockerDirectory>${project.build.directory}/distribution/container</dockerDirectory>
                    <imageTags>
                        <imageTag>${docker.image.version}</imageTag>
                        <imageTag>latest</imageTag>
                    </imageTags>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
