how to upload artifacts to Nexus repository using Jenkins1 min read

Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

Hi All, this document deals with how to upload artifacts to Nexus repository using Jenkins.
Here we have a sample java application and the objective of the document is to upload all the artifacts to Nexus repository using Jenkins.
Nexus support of various kinds of application repository, maven, docker, yum, etc.


* Java application if you don’t have you can fork my repository

* Running Jenkins server if you don’t have, follow this link Setup Jenkins in ubuntu server
* Running Nexus repository management system, if you don’t have, follow this link. how to install nexus repository in Linux machine
* If you don’t have any idea about to build a java application using Jenkins refer this link. how to build a maven application using Jenkins


Step 0. Install Nexus Artifact uploader from manage plugins.
Step 1. Create a Jenkins job.

Step 2. Configure Jenkins to build the job.
Step 3. Configure your Git repository or SVN.

Step 4. Configure the build as given below.

Step 5. Select Nexus artifact uploader from Post steps drop down and configure as follows

Nexus Version 
Nexus URL localhost:8081
Credentials add the nexus user credentials to upload the artifacts
Version ${POM_VERSION}
Repository maven-snapshots

The values for the above variables are retrieved from the pom.xml file

Step 6: Now save the job and start building. See the console output to see the job live status.

Step 7: Now you can see from the Console output artifacts are uploaded. Check the Nexus repository to see the artifacts.

© 2019, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points

Related posts

Leave a Reply