Search code examples
maven-2artifactory

Artifactory ignores artifacts deployed into libs-release-local


We are evaluating Artifactory to be used as our local/remote repository. Our application uses a custom cxf-2.6.6 jar. We've manually deployed the cxf jar into libs-release-local. But each time we do a local build, Artifactory downloads a version of cxf 2.6.6 from the remote maven repository into ext-release-local. As a result there will be two copies of cxf 2.6.6.jar and unfortunately our local build uses only the downloaded cxf instead of the one we deployed.

Both libs-release-local & ext-release-local are mapped to the same virtual repository libs-release, so this is strange. Even if I delete the cxf from ext-release-local it downloads again. How do I restrict this? I could probably deploy the cxf into ext-release-local (I haven't tried)?

But then isn't it a bug? Please advice.


Solution

  • You can control the resolution order of a virtual repository: Admin -> Repositories -> Edit (Virtual repository) -> Drag & drop repository names in the "Selected Repositories" box.
    The "Resolved Repositories" box will reflect the order in which the resolution is performed.
    Generaly speaking the search/resolution order when requesting artifacts from a virtual repository is always: local repositories, remote repository caches and finally remote repositories themselves.

    If you are using Artifactory 2.6.0 or newer, you can use the Trace Artifact Retrieval feature to emulate an artifact retrieval request from the specified location and returns verbose output about the resolution process.