openmrs-distro-referenceapplication
openmrs-distro-referenceapplication copied to clipboard
(chore) persist maven cache between builds
Mounting the /usr/share/maven/ref/repository directory as a cache means that the m2 cache is preserved between subsequent invocations of docker compose build, thus eliminating the need to re-download all the maven packages and openmrs modules. (SNAPSHOT versions of packages will still always be downloaded.)
In a development environment, this can greatly speed up docker builds when trying out changes to the distro.
Incidentally, applying the same mounts to both the mvn install and mvn clean commands, for consistency.
I'm in a third-world country with very slow internet connections, so this feature would be extremely helpful.