jfrog-cli icon indicating copy to clipboard operation
jfrog-cli copied to clipboard

Enable Jfrog CLI to download the latest Maven snapshot just like curl

Open arrow0108 opened this issue 6 years ago • 2 comments

Today, when using a simple curl the a Maven repo path with -SNAPSHORT suffix we can download the latest deployed artifact.

example: curl <artifactory_url>/libs-snapshot-local/com/search/foo/1.0/foo-1.0-SNAPSHOT

Jfrog CLI / SPEC does not support this and we are required to develop special workarounds / wrappers around this...

Would appreciate matching those behaviors so we can use the CLI properly

Thanks

arrow0108 avatar Jan 24 '20 15:01 arrow0108

+1

Appears this is still an issue in 2.70.0 for downloading unique snapshots.

This works:

wget <artifactory_url>/artifactory/libs-snapshot/com/foobar/modules/foo-client/1.0.0-SNAPSHOT/foo-client-1.0.0-SNAPSHOT.jar

Yet this fails:

jfrog rt download libs-snapshot/com/foobar/modules/foo-client/1.0.0-SNAPSHOT/foo-client-1.0.0-SNAPSHOT.jar --fail-no-op
{
  "status": "success",
  "totals": {
    "success": 0,
    "failure": 0
  },
  "files": []
}
[🚨Error] No errors, but also no files affected (fail-no-op flag).

Searching returns nothing / fails to resolve the latest snapshot stamp from the maven-metadata:

jfrog rt search libs-snapshot/com/foobar/modules/foo-client/1.0.0-SNAPSHOT/foo-client-1.0.0-SNAPSHOT.jar
[🔵Info] Searching artifacts...
[🔵Info] Found 0 artifacts.
[]

Only workaround I've found is to download the maven-metadata.xml and parse it manually with ugly scripting, or just not use jfrog-cli...

tyler-adams-kr avatar Oct 01 '24 16:10 tyler-adams-kr

This issue has been marked as stale due to 6 months of inactivity. As part of our effort to address every issue properly, please feel free to remove the stale label or keep this issue active by leaving a comment. Otherwise, it will be closed in 7 days

github-actions[bot] avatar Mar 31 '25 00:03 github-actions[bot]

This issue was closed due to 7 days of inactivity after being marked as stale. Feel free to reopen it if it remains relevant.

github-actions[bot] avatar Apr 15 '25 00:04 github-actions[bot]