If you want a place to store your Java babies and stop emailing JARs to colleagues like it is 2003 this guide walks you through downloading, running and using JFrog Artifactory to host a local Maven repository. It covers installing with Docker or a service package, creating a repository, configuring Maven and actually pushing a JAR so your CI pipeline will stop crying.
You can grab the Artifactory distribution from the vendor site or use the official Docker image for a fast lab. Docker is the little black belt move here because it avoids system dependency drama and makes cleanup pleasant when you inevitably try a new idea that fails spectacularly.
For a quick local test run the Docker image. A minimal example looks like this.
docker pull jfrog/artifactory-oss:latest
docker run -d --name artifactory -p 8081:8081 jfrog/artifactory-oss:latest
If you installed the service package follow the installer prompts, start the service and open the web console at http://localhost:8081. Create an admin user and do the basic health check. No, the wizard will not judge your commit history.
In the web console create a new repository of type Maven local. Pick a sensible name like my-maven-local
. Naming things is 90 percent of good DevOps so do not name it "repo1" unless you enjoy chaos.
Edit your ~/.m2/settings.xml
to add server credentials for a dedicated deploy user. Then point your project POM distribution management to the new repo. Example snippets.
<settings>
<servers>
<server>
<id>artifactory-repo</id>
<username>deploy-user</username>
<password>REPLACE_ME</password>
</server>
</servers>
</settings>
<distributionManagement>
<repository>
<id>artifactory-repo</id>
<url>http://localhost:8081/artifactory/my-maven-local</url>
</repository>
</distributionManagement>
Use a dedicated deploy user so your CI jobs do not run with admin permissions. That is how accidents become incidents.
Two main options. For automated pipelines use the Maven deploy goal. For manual testing use the web UI upload.
mvn clean deploy
after making sure the POM distribution management id matches the server id in settings.xml.Check the UI to confirm the JAR and its metadata are present. If you prefer REST calls use the Artifactory storage API to inspect the item and verify checksums. Example with curl.
curl -u deploy-user:REPLACE_ME \
"http://localhost:8081/artifactory/api/storage/my-maven-local/com/example/my-artifact/1.0/my-artifact-1.0.jar"
The response contains file info and checksums so you can script verification in CI or just flex your newfound power.
We covered downloading and running Artifactory, creating a Maven local repository, updating Maven to use that repository and deploying a JAR either by Maven or manual upload. You now have a basic artifact management workflow suitable for local testing or small CI pipelines.
Pro tip use the Docker image for local labs because you will probably tear it down and rebuild it several times while pretending you knew what you were doing all along.
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.