You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
I have com.spotify:dockerfifle-maven-plugin:1.3.0 to build a docker container for this spring-boot app.
On mvn package, I get error indicating jar file is missing.
mvn package
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building spring-boot-embedded-tomcat 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ spring-boot-embedded-tomcat ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ spring-boot-embedded-tomcat ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /Users/sdas1/OneDrive/computer/next/depot/github/spring-boot-embedded-tomcat/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ spring-boot-embedded-tomcat ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/sdas1/OneDrive/computer/next/depot/github/spring-boot-embedded-tomcat/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ spring-boot-embedded-tomcat ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ spring-boot-embedded-tomcat ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ spring-boot-embedded-tomcat ---
[INFO] Building jar: /Users/sdas1/OneDrive/computer/next/depot/github/spring-boot-embedded-tomcat/target/spring-boot-embedded-tomcat-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.3.RELEASE:repackage (default) @ spring-boot-embedded-tomcat ---
[INFO]
[INFO] --- dockerfile-maven-plugin:1.3.0:build (default) @ spring-boot-embedded-tomcat ---
[INFO] Building Docker context /Users/sdas1/OneDrive/computer/next/depot/github/spring-boot-embedded-tomcat/docker
[INFO]
[INFO] Image will be built as com-san/spring-boot-embedded-tomcat:0.0.1-SNAPSHOT
[INFO]
[INFO] Step 1/5 : FROM frolvlad/alpine-oraclejdk8:slim
[INFO] Pulling from frolvlad/alpine-oraclejdk8
[INFO] Digest: sha256:49772b54d8ed36e060d3e20b704d586a1292b243054c968a494b0c3079605ba5
[INFO] Status: Image is up to date for frolvlad/alpine-oraclejdk8:slim
[INFO] ---> 354831d86a05
[INFO] Step 2/5 : ENV SERVER_PORT 38080
[INFO] ---> Using cache
[INFO] ---> ac6e30c94cb5
[INFO] Step 3/5 : EXPOSE $SERVER_PORT
[INFO] ---> Using cache
[INFO] ---> 0ade83cbc7ca
[INFO] Step 4/5 : COPY target/spring-boot-embedded-tomcat-0.0.1-SNAPSHOT.jar /
[ERROR] lstat target/spring-boot-embedded-tomcat-0.0.1-SNAPSHOT.jar: no such file or directory
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.414 s
[INFO] Finished at: 2017-06-07T14:07:29-07:00
[INFO] Final Memory: 43M/738M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.3.0:build (default) on project spring-boot-embedded-tomcat: Could not build image: lstat target/spring-boot-embedded-tomcat-0.0.1-SNAPSHOT.jar: no such file or directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
<contextDirectory>docker</contextDirectory> tells the plugin to send only that directory to docker for the build, it is the context that the build operates in. If you want to refer to things from target/ in your Dockerfile then you should probably have the Dockerfile as a file in the top-level of your project, so that your whole project is the build context.
Hello,
I have com.spotify:dockerfifle-maven-plugin:1.3.0 to build a docker container for this spring-boot app.
On mvn package, I get error indicating jar file is missing.
Project structure
build plugin inside pom.xml
Dockerfile
Project code - https://github.com/mesanjeeb/spring-boot-embedded-tomcat/tree/spotify-dockerfile-plugin
Thanks,
San
The text was updated successfully, but these errors were encountered: