Five different ways to upload JAR files to JFrog Artifactory |Video upload date:  · Duration: PT3M52S  · Language: EN

Learn five practical ways to upload JAR files to JFrog Artifactory using common tools and commands for CI and manual use

Quick summary for people who skipped the manual

You need JAR upload options for JFrog Artifactory that actually work with your build system and sleep schedule. Here are five real world ways to push JAR files into an Artifactory repository while keeping your CI happy and your teammates slightly less annoyed.

Methods at a glance

  • Web UI for one offs and visual reassurance
  • Maven deploy plugin for classic Java builds
  • Gradle publish for modern Gradle pipelines
  • curl using the REST API for quick scripts and debugging
  • JFrog CLI for CI friendly, fast uploads and checksums

Web UI

Open the Artifactory browser, navigate to the target repository and drag and drop your JAR. This is great when you have one file and a coffee break to spare. It is manual but foolproof when you need a sanity check or a demo for less technical stakeholders.

Maven deploy plugin

If your project already uses Maven then letting Maven handle coordinates is the sane path. Add distributionManagement in your pom.xml and run the standard deploy goal. Maven reads credentials from your settings.xml and calculates group id, artifact id and version for you.

Typical command

mvn deploy

This is ideal when the build pipeline is Maven centric and you want artifact coordinates to be consistent and reproducible.

Gradle publish

For Gradle projects apply the maven publish plugin, declare a publication and a repository block, then run gradle publish. Gradle will build the JAR and publish the artifact using the group and version you configured.

Typical command

gradle publish

Use this when your build logic is in Gradle and you want integration with tasks and versioning in the same toolchain.

curl and the REST API

Want the simplest scripting route without installing a new tool In a pinch curl plus Artifactory REST works. Use an HTTP PUT against the repository path to upload a JAR from any machine that can reach Artifactory.

Example

curl -u USER -X PUT https//example.com/artifactory/my-repo/path/app.jar -T build/libs/app.jar

This is handy for quick tests, one off uploads and ad hoc automation. It is also the least glamorous option when you need robustness like checksum optimization or parallelism though it still gets the job done.

JFrog CLI

Install the JFrog CLI, configure the server once with your credentials, then use a single upload command. The CLI adds useful features like checksum optimization and parallel uploads which matter in CI pipelines.

Example

jfrog rt u 'build/libs/*.jar' my-repo/path/

Use the CLI when you want fast uploads, resume friendly behavior and better integration with automation. This is the recommended choice for CI and repeatable builds.

Trade offs and quick tips

  • Web UI for manual checks and quick fixes when you need visual confirmation
  • Maven or Gradle when the build tool should be the source of truth for artifacts
  • curl when you need ad hoc scripts or a tiny debugging hammer
  • JFrog CLI when you want performance and CI friendliness

Security and repeatability

Store credentials in a secure config file or credential store. For Maven use settings.xml with server entries. For JFrog CLI use the jfrog rt config flow so tokens or credentials are preserved without copy pasting secrets in scripts. Avoid embedding plain text passwords in pipeline steps.

Final note for the lazy and the thorough

If you want automation and speed choose JFrog CLI. If you want to keep things inside your existing build choose the Maven or Gradle route. If you want to test something fast use curl or the Web UI and then graduate to the proper tool when the feature leaves beta and your boss notices.

I know how you can get Azure Certified, Google Cloud Certified and AWS Certified. It's a cool certification exam simulator site called certificationexams.pro. Check it out, and tell them Cameron sent ya!

This is a dedicated watch page for a single video.