9419

Using JFrogCLI to download artifacts from a smart repo on Artifactory

Question:

I am working with Artifactory version 5.2, with a maven2 repository configured as a smart repository to <a href="http://repo1.maven.org" rel="nofollow noreferrer">http://repo1.maven.org</a> As such, any build launched by maven or gradle will request dependencies on the Artifactory server, and if the artifact has not been cached already, the smart repo will download the file from <a href="http://repo1.maven.org" rel="nofollow noreferrer">http://repo1.maven.org</a> first, and then provide the content to the maven / gradle script. This works as intended, I cannot complain here.

However, I also need to download dependencies directly using jfrogcli, with a command looking like

jfrog rt dl maven2/com/google/guava/guava-parent/10.0.1/guava-parent-10.0.1.pom

And this doesn't work on a smart repository as far as I can tell.

[Info] Searching items to download... [Info] Downloaded 0 artifacts.

The only workaround I found was to first request the artifact from the maven2 repository using direct download, and then use jfrog cli to download it from the maven2-cache repository

curl -H ... -X GET <server>/artifactory/maven2/com/google/guava/guava-parent/10.0.1/guava-parent-10.0.1.pom jfrog rt dl maven2-cache/com/google/guava/guava-parent/10.0.1/guava-parent-10.0.1.pom

I am fairly sure I am missing something simple wrt. smart repositories and jfrog cli, but I couldn't find an easy answer. Any feedback is welcome.

Answer1:

This is a known limitation of the JFrog CLI related to the way the download command was implemented.<br /> Currently the CLI is first querying Artifactory using AQL (Artifactory Query Language) for a list of artifacts which should be downloaded. This is highly useful when you are downloading multiple artifacts using patterns.<br /> However AQL currently does not support querying for artifacts which are not cached yet. This means that the CLI will not try to download files which are not cached.<br />

Recommend

  • How can I attach an orphan branch to master “as-is”?
  • Is it always a good idea to import very specifically in Python?
  • CSV and MS-DOS CSV Formats
  • HALF_PTR Windows data type
  • Is it safe to accept URL parameters for populating the `url_for` method?
  • Backward compatibility of Python 3.5 for external modules
  • Appium MobileElement swipe returns unknown server error
  • retrieving data from url in iphone
  • Why can't UI components be accessed from a backgroundworker?
  • Swift Initialization Rule Confusion
  • can variables be set randomly when declaring them again?
  • In C what exactly happens if i use () to initialize a double dimension array instead of the {}?
  • Synchronize windows folders
  • Access user's phone number on iOS 7
  • Servlet stops working on Tomcat server after some hits or time
  • Salesforce Different WSDL files and when to use
  • Silverlight DependencyProperty.SetCurrentValue Equivalent
  • Zurb Foundation _global.scss meta styles for js?
  • Content-Length header not returned from Pylons response
  • Python urlparse: small issue
  • DomPDF {PAGE_NUM} not on first page
  • Cannot connect to cassandra from Spark
  • Javascript simulate pressing enter in input box
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • How to recover from a Spring Social ExpiredAuthorizationException
  • Cross-Platform Protobuf Serialization
  • ILMerge & Keep Assembly Name
  • Join two tables and save into third-sql
  • Can I make an Android app that runs a web view in Chrome 39?
  • Importing jscolor library in angular 2
  • How to make Safari send if-modified-since header?
  • Large data - storage and query
  • Alternatives to the OPTIONAL fallback SPARQL pattern?
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • WOWZA + RTMP + HTML5 Playback?
  • A cron job substitute?
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Free memory of cv::Mat loaded using FileStorage API
  • coudnt use logback because of log4j