1
votes

I have been trying to upload my application specific JARs to the JFrog Artifactory using the rest API but couldn't find any methods to include the group id and the artifact id like maven does.

This command does deploy the jar to repository but without the groupId and artifactId;

curl -u username:password -X PUT "http://xx.xx.xxx.xx:8081/artifactory/libs-release-local/mail-1.4.3.jar" -T mail-1.4.3.jar

Are there any way that I could mention the Group id and Artifact Id while uploading the JARS to artifactory using Jfrog Rest API ?

1

1 Answers

1
votes

There is nothing that will do it automatically for you, but you can definitely specify a full path that includes the groupId, artifactId and version of your artifact exactly like Maven would, i.e:

curl -u username:password -T mail-1.4.3.jar "http://xx.xx.xxx.xx:8081/artifactory/libs-release-local/org/someOrg/mail/1.4.3/mail-1.4.3.jar"

(p.s - you don't need to specify -XPUT if you specify -T)

BTW - unlike the REST API, the Artifactory UI does actually have the ability to fill in the full maven coordinates for you during upload. Have a look here: https://www.jfrog.com/confluence/display/RTF/Deploying+Artifacts#DeployingArtifacts-DeployingMavenArtifacts