cia-dist-docker/pom.xml
<?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>
<groupId>com.hack23.cia</groupId>
<artifactId>parent-web-pom</artifactId>
<version>2022.12.26</version>
<relativePath>../parent-web-pom/pom.xml</relativePath>
</parent>
<artifactId>cia.dist.docker</artifactId>
<packaging>docker</packaging>
<name>cia-dist-docker</name>
<scm>
<connection>scm:git:ssh://git@github.com/Hack23/cia.git</connection>
<developerConnection>scm:git:ssh://git@github.com/Hack23/cia.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/Hack23/cia/tree/master/cia-dist-docker</url>
</scm>
<dependencies>
<dependency>
<groupId>com.hack23.cia</groupId>
<artifactId>cia-dist-deb</artifactId>
<version>${project.version}</version>
<type>deb</type>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.40.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filter-resources</id>
<goals>
<goal>resources</goal>
</goals>
<phase>validate</phase>
<configuration>
<outputDirectory>${project.basedir}/target/dockerfile</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/docker</directory>
<filtering>false</filtering>
<excludes>
<exclude>Dockerfile</exclude>
</excludes>
</resource>
<resource>
<directory>${project.basedir}/src/main/docker/</directory>
<filtering>true</filtering>
<includes>
<include>Dockerfile</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<goals>
<goal>copy-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<copyPom>false</copyPom>
<outputDirectory>${project.basedir}/target/dockerfile/dependencies</outputDirectory>
<excludeTypes>pom</excludeTypes>
<prependGroupId>false</prependGroupId>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<images>
<image>
<name>hack23/cia:${project.version}</name>
<alias>application</alias>
<registry>registry.hub.docker.com</registry>
<build>
<contextDir>${project.basedir}/target/dockerfile</contextDir>
</build>
<run>
<ports>
<port>38443:8443</port>
</ports>
</run>
</image>
</images>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration combine.self="override">
<rules>
<requireMavenVersion>
<version>cia.project.versions.maven</version>
</requireMavenVersion>
<requireJavaVersion>
<version>${jdk.src.version}</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>push-docker</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<executions>
<execution>
<id>docker:push</id>
<goals>
<goal>push</goal>
</goals>
<phase>install</phase>
</execution>
</executions>
</plugin>
<!-- -Ddocker.username=username -Ddocker.password=password -->
</plugins>
</build>
</profile>
</profiles>
</project>