Use of local Maven repository
I am attempting to create a build container image with a cached .m2 local repository of common project dependencies.
I am using the same jfrog config in both processes.
I am using jfrog mvn-config and jfrog mvn on the container and artifacts are stored in .m2/repository.
However, in the project build process using this image as the container, again using jfrog mvn-config and jfrog mvn the project dependencies are downloaded again with the following warning.
Artifact XYZ is present in the local repository, but cached from a remote repository ID that is unavailable in current build context
I've checked and the contents of the _remote.repositories is using artifactory-release as the repo Id. In spite of setting a different server id and JF_REPO.
I've since confirmed that the build-info-extraction overrides this repo id to artifactory-release, in ArtifactoryPluginResolution.java.
Both process have the same contents for ~./.jfrog/projects/maven.yaml.
I've also tried using -DbuildInfoConfig.artifactoryResolutionEnabled=false, but this is overridden by the build-info-extractor when jfrog mvn is called.
How can I use cached dependencies in .m2/repository?