Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensures that /root/.m2 is pre-populated
If the local maven repository, the `/root/.m2` directory in this case, is empty, then the first time that `mvn` runs a plugin, such as `org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom` or `com.corgibytes:versions-maven-plugin:resolve-ranges-historical`, then the `mvn` process downloads all of the dependencies and stores them in the local repository. This can create problems if there are two instances of `mvn` running at the same time, both attempting to download the same files, but at different times. By forcing the two plugins that are run by `freshli-agent-java` to run on a minimal `pom.xml` file while the container is being built, this change ensures that the `/root/.m2` directory is populated. Hopefully, this means that the `mvn` process won't need to download those files, and instead will just run using the copies that are already stored locally. This will avoid issues with having two instances of `mvn` running at the same time.
- Loading branch information