Hasan Birol
Hasan Birol

Reputation: 166

How can I upload jar files with directory on JFROG?

I would like to create local repository on Jfrog. I have already created. But, want to upload files
I could download files with zip extension. Howevet, i want to upload files like this way

com/xxx/bb/1.0.0/.jar like this way.

Thanks for helping..

Upvotes: 1

Views: 4341

Answers (2)

error404
error404

Reputation: 2823

cli can be used but I wouldn't suggest to use it. REST api is the best way to upload artifacts. An example below on the usage would be.

Deploy Artifact Description: Deploy an artifact to the specified destination. Notes: You can also attach properties as part of deploying artifacts. Security: Requires a user with 'deploy' permissions (can be anonymous) Usage: PUT /repo-key/path/to/artifact.ext Produces: application/json (application/vnd.org.jfrog.artifactory.storage.ItemCreated+json)

Sample Usage:

curl -X PUT -u <username>:<password> -T <artifact_name> "http://localhost:8081/artifactory/<repo_name>/<artifact_name>"

The above will upload to artifactory a single jar.

What is your use case for deploying jar/files ? Are the files part of the build process ? If yes it should be done using the plugin of artifactory for the respective CI tool.

For eg. if the CI tool is Jenkins than there is a plugin of aritfactory in jenkins that will upload post the build is success

Upvotes: 0

Ortsigat
Ortsigat

Reputation: 1309

Using the JFrog CLI is probably your best option. see here: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-UploadingFiles

Upvotes: 1

Related Questions