Skip to content

Use of local Maven repository #827

@rbennett10

Description

@rbennett10

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions