![]() If read-only and Maven requires a dependency not present, the build will fail. If you do not want this, you can make the mount read-only by changing :rw to :ro. This command makes the volume mount read-write, which allows Maven running inside the container to download and persist additional dependencies. This flag will volume mount your local Maven directory into the build container so it can be used there. To do this with pack, you need to add the flag -volume $HOME/.m2:/home/cnb/.m2:rw to your pack build command. You can speed up builds by sharing your local Maven or Gradle cache with the container. This means Maven and Gradle will helpfully download all of the dependencies they require again, slowing down your builds. However, if you perform a pack build of your application this runs in a new container and does not by default have access to your existing Maven or Gradle cache. If you have been developing your code on your computer, it’s very likely that Maven or Gradle have already downloaded all of the dependency JARs required to build your application.
0 Comments
Leave a Reply. |