title: Unable to build docker image due to failed to process "${project.artifactId}": missing ':' in substitution
body: <p>I am trying to build a docker image for a maven project with the command: <code>mvn clean install -DskipTests -Pdocker</code></p>
  
  <p>I have the following <strong>Dockerfile</strong>:</p>
  
  <pre><code>FROM openjdk:8-jre
  
  ARG serviceuser=${project.artifactId}
  
  ##UPDATES AND INSTALL REQUIRED PACKAGES
  RUN apt-get update &amp;&amp; \
      apt-get install -y gettext-base sudo &amp;&amp; \
      apt-get install -y iptables sudo &amp;&amp; \
      adduser --shell /bin/bash ${serviceuser} &amp;&amp; \
      adduser ${serviceuser} sudo &amp;&amp; \
      echo "%sudo ALL=NOPASSWD: ALL" &gt;&gt; /etc/sudoers
  
  USER ${serviceuser}
  
  ##MOVE AND COPY PROJECT FILES INTO CONTAINER
  COPY ${project.build.finalName}.jar /home/${serviceuser}/
  
  WORKDIR /home/${serviceuser}
  </code></pre>
  
  <p>The <strong>pom.xml</strong> file has some of the following contents: (Have made it shorter just for explaination)</p>
  
  <pre><code>&lt;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"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.book.app&lt;/groupId&gt;
    &lt;artifactId&gt;book-app&lt;/artifactId&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;book-app&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
    &lt;profiles&gt;
      &lt;profile&gt;
        &lt;id&gt;docker&lt;/id&gt;
        &lt;build&gt;
          &lt;resources&gt;
            &lt;resource&gt;
              &lt;directory&gt;docker&lt;/directory&gt;
              &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;targetPath&gt;${project.build.directory}&lt;/targetPath&gt;
            &lt;/resource&gt;
          &lt;/resources&gt;
          &lt;plugins&gt;
            &lt;plugin&gt;
              &lt;groupId&gt;com.spotify&lt;/groupId&gt;
              &lt;artifactId&gt;dockerfile-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.3.3&lt;/version&gt;
              &lt;executions&gt;
                &lt;execution&gt;
                  &lt;id&gt;default&lt;/id&gt;
                  &lt;goals&gt;
                    &lt;goal&gt;build&lt;/goal&gt;
                    &lt;goal&gt;push&lt;/goal&gt;
                  &lt;/goals&gt;
                &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                &lt;contextDirectory&gt;${project.build.directory}&lt;/contextDirectory&gt;
                &lt;repository&gt;test-img:2000/v1/${project.artifactId}&lt;/repository&gt;
                &lt;tag&gt;${project.version}&lt;/tag&gt;
                &lt;tag&gt;latest&lt;/tag&gt;
              &lt;/configuration&gt;
            &lt;/plugin&gt;
          &lt;/plugins&gt;
        &lt;/build&gt;
      &lt;/profile&gt;
    &lt;/profiles&gt;
    &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.0.3.RELEASE&lt;/version&gt;
    &lt;/parent&gt;
    &lt;dependencies&gt;
      ...
    &lt;/dependencies&gt;
    &lt;build&gt;
      ...
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>When i build, it gives me the following error message...</p>
  
  <p>Caused by: com.spotify.docker.client.exceptions.DockerException: failed to process "${project.artifactId}": missing ':' in substitution</p>
  
  <p>[ERROR] failed to process <strong>"${project.artifactId}": missing ':' in substitution</strong></p>
  
  <p><strong>[INFO] BUILD FAILURE</strong></p>
  
  <p>I would appreciate any hints or help, thank you.</p>