I am working with Artifactory version 5.2, with a maven2 repository configured as a smart repository to http://repo1.maven.org 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 http://repo1.maven.org 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.