</execution>
</executions>
</plugin>
+ <!--fabric8.io docker-maven-plugin does not support ARG usage in the FROM statement of Dockerfile
+ even though docker supports it: https://github.com/fabric8io/docker-maven-plugin/issues/859.
+ As a workaround we shall use maven-antrun-plugin to copy the Dockerfile and apply filters to
+ replace the parameterized base-image version. The fabric8.io docker-maven-plugin shall use this filtered file
+ to build the image. After the image is built we perform a cleanup to remove the filtered file.-->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>update-parameterized-dockerfile</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <copy file="src/main/docker/Dockerfile" toFile="src/main/docker/antrun/Dockerfile">
+ <filterset>
+ <filter token="version.policy.drools-pdp" value="${version.policy.drools-pdp}"/>
+ </filterset>
+ </copy>
+ </tasks>
+ </configuration>
+ </execution>
+ <execution>
+ <id>cleanup-filtered-dockerfile</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <delete dir="src/main/docker/antrun"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<name>onap/policy-pdpd-cl</name>
<build>
<cleanup>try</cleanup>
+ <contextDir>antrun</contextDir>
<dockerFile>Dockerfile</dockerFile>
<tags>
<tag>${project.version}</tag>