title: Docker build error: target/pw04-backend-0.0.1-SNAPSHOT.jar: file does not exist
body: <p>i have problem with docker build, when i building says that .jar file does not exist. Docker have latest version and working fine. Also when i using <em>mvn clean install</em> i'm getting only one .jar file in target folder. Might be problem in pom.xml i don't know, because all set good in my opinion</p>
  <p><code>Error response from daemon: COPY failed: file not found in build context or excluded by .dockerignore: stat target/pw04-backend-0.0.1-SNAPSHOT.jar: file does not exist  </code></p>
  <p>Dockerfile:</p>
  <pre><code>FROM maven:3.8.4-jdk-11
  
  WORKDIR /usr/local/app
  
  COPY target/pw04-backend-0.0.1-SNAPSHOT.jar app-exec.jar
  
  COPY src/main/resources/application.properties application.properties
  
  CMD [ &quot;java&quot;, &quot;-jar&quot;, &quot;app-exec.jar&quot; ]
  </code></pre>
  <p>.jar file location set correct target folder</p>
  <p>pom.xml file :</p>
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&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.5.5&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;com.example&lt;/groupId&gt;
      &lt;artifactId&gt;pw04-backend&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;demo&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
      &lt;properties&gt;
          &lt;java.version&gt;11&lt;/java.version&gt;
          &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                 &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
             &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
              &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
              &lt;version&gt;2.9.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
              &lt;version&gt;2.9.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
                  &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
                  &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
                  &lt;scope&gt;runtime&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
  
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;repackage&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;mainClass&gt;lt.kvk.ppj.DemoApplication.java&lt;/mainClass&gt;
                              &lt;classifier&gt;exec&lt;/classifier&gt;
                          &lt;/configuration&gt;
  
                      &lt;/execution&gt;
  
                  &lt;/executions&gt;
  
              &lt;/plugin&gt;
          &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  
  
  
      &lt;/project&gt;
  </code></pre>