<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <relativePath>../../pom.xml</relativePath>
        <artifactId>airsonic</artifactId>
        <version>11.0.0-SNAPSHOT</version>
        <groupId>org.airsonic.player</groupId>
    </parent>
    <packaging>pom</packaging>
    <artifactId>airsonic-docker</artifactId>
    <name>Airsonic Docker Image</name>

    <dependencies>
        <dependency>
            <groupId>org.airsonic.player</groupId>
            <artifactId>airsonic-main</artifactId>
            <version>11.0.0-SNAPSHOT</version>
            <type>war</type>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.33.0</version>
                <executions>
                    <execution>
                        <id>build-image</id>
                        <phase>package</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                        <configuration>
                            <showLogs>true</showLogs>
                            <images>
                                <image>
                                    <name>${docker.container.repo}</name>
                                    <build>
                                        <dockerFile>${project.basedir}/Dockerfile</dockerFile>
                                        <tags>latest</tags>
                                    </build>
                                </image>
                            </images>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
                <configuration>
                    <stripClassifier>true</stripClassifier>
                    <stripVersion>true</stripVersion>
                </configuration>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
