I would like to download a latest artifact from artifactory with extension ".war". so I am trying to curl artifactory to download latest version of artifact.
curl command that I am trying , curl "https://artifactory.xxx.com/artifactory/api/search/pattern?pattern=bds-snapshot:com/test/sample/mobile-project-api/0.0.1-SNAPSHOT/*.war"
But the output of this curl is fetching all the artifacts as below
files: [
"com/test/sample/mobile-project-api/1.0.0-SNAPSHOT/mobile-project-api-0.0.1-20170818.13548-103.war",
"com/test/sample/mobile-project-api/1.0.0-SNAPSHOT/mobile-project-api-0.0.1-20171005.214754-171.war",
"com/test/sample/mobile-project-api/1.0.0-SNAPSHOT/mobile-project-api-0.0.1-20171120.213458-241.war",
"com/test/sample/mobile-project-api/1.0.0-SNAPSHOT/mobile-project-api-0.0.1-20170426.162605-4.war",
"com/test/sample/mobile-project-api/1.0.0-SNAPSHOT/mobile-project-api-0.0.1-20170907.193242-118.war",
"com/test/sample/mobile-project-api/1.0.0-SNAPSHOT/mobile-project-api-0.0.1-20170616.143453-34.war",
"com/test/sample/mobile-project-api/1.0.0-SNAPSHOT/mobile-project-api-0.0.1-20170803.221511-77.war",
]
}
can someone help me for downloading latest artifact using curl command in artifactory. Thanks!
答案 0 :(得分:0)