title: Docker and Maven dependency offline
body: <p>i am trying to build a docker for my Java Spring MVC application and packages are managed by MAVEN.</p>
  
  <p>my project folder view:</p>
  
  <pre><code>1)wc-aws(JAR)
      -pom.xml
      -src
  2)wc-admin(spring project WAR)
      -pom.xml
      -src
  3)wc-dao(JAR)
      -pom.xml
      -src
  -pom.xml
  </code></pre>
  
  <p>my DockerFile</p>
  
  <pre><code>FROM maven:3.6.1-jdk-8 as maven_builder
  
  ENV HOME=/app
  
  RUN mkdir $HOME
  
  WORKDIR $HOME
  
  ADD . $HOME
  
  RUN mvn dependency:go-offline
  
  RUN mvn clean install -T 2C -DskipTests=true
  
  FROM tomcat:8.5.43-jdk8
  
  ENV HOME=/app
  
  FROM tomcat:8.5.43-jdk8
  
  COPY --from=maven_builder /app/wc-admin/target/wc-admin.war /usr/local/tomcat/webapps/ROOT
  </code></pre>
  
  <p><strong>i get the following error :</strong></p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary for wc-pom 1.0:
  [INFO]
  [INFO] wc-pom ............................................. SUCCESS [02:17 min]
  [INFO] wc-commons ......................................... SUCCESS [02:56 min]
  [INFO] wc-dao ............................................. FAILURE [ 13.308 s]
  [INFO] wc-aws ............................................. SKIPPED
  [INFO] wc-event ........................................... SKIPPED
  [INFO] wc-mqueue .......................................... SKIPPED
  [INFO] wc-admin ........................................... SKIPPED
  [INFO] wc-ftp-download .................................... SKIPPED
  [INFO] wc-content-transformation .......................... SKIPPED
  [INFO] wc-content-notification ............................ SKIPPED
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  05:59 min
  [INFO] Finished at: 2019-07-26T07:48:34Z
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal on project wc-dao: Could not resolve dependencies for project com.whitecoats:wc-dao:jar:1.0: Could not find artifact com.whitecoats:wc-commons:jar:1.0 in central (https://repo.maven.apache.org/maven2) -&gt; [Help 1]
  </code></pre>
  
  <p>As you can see, the error is saying that, maven is looking for wc-dao in central and cannot find it.</p>
  
  <p><strong>but wc-dao is local java project and its JAR file is created in runtime.</strong></p>
  
  <p>how do i resolve it?</p>