You are on page 1of 6

JMS Tech Home Madhu Sudhan Reddy Y.

B
+91-8884807341
Integrate Nexus with Jenkins in windows
In this topic we will learn how to install nexus in windows machine and integrate with
Jenkins to upload maven artifact to nexus repository.

First download the nexus manager form below link

https://help.sonatype.com/repomanager3/download

for windows

https://download.sonatype.com/nexus/3/latest-win64.zip

now extract the zip file and go to the path of extracted folder bin/nexus.exe

the run below command nexus.exe /run

once successfully running the nexus server open your favourite browser use below link to open
nexus dashboard.

http://localhost:8081/

Once successfully open the dashboard sign in the nexus repository. You will see the right corner sign
in button. Once click the sign in it will ask username and password enter the username and
password. By default username and password is admin/admin123.
JMS Tech Home Madhu Sudhan Reddy Y.B
+91-8884807341
Once login successfully as a admin create a new repository using setting button  repositories

And then click the repositories option and it will open a new page like below.

And click the new repository for create our new repository. once click the new repository it will
open below page and chose mave2(hosted) option for create our new repository it will open below
page and enter the proper values required to create our repository.

I entered the name of the repository as spring3 and click the create repository button end of the
page and remaining option as it is default as of now.
JMS Tech Home Madhu Sudhan Reddy Y.B
+91-8884807341

Once successfully create a repository we will get a notification like below.


JMS Tech Home Madhu Sudhan Reddy Y.B
+91-8884807341

Now see the screen below our repository is creates successfully.

Done our nexus configuration now open the Jenkins server and follow the below steps.

1. Open the Jenkins dashboard using your Jenkins url.


2. Once open the Jenkins dashboard go to Jenkins home Manage Jenkins Manage Plugins
 available tab  search for Nexus Platform plugin and click the install without restart.

Note : check the maven configured or not if not you must configure maven before you build
maven project.

3. Once upload is done now configure the nexus server to upload your build artifacts. Then
goto Jenkins home manage Jenkins  Configure system  Sonatype Nexus

4. And click the Nexus repository manager 3.x server and filled the required columns.
JMS Tech Home Madhu Sudhan Reddy Y.B
+91-8884807341

And add the credentials of nexus server in Jenkins. nexus server default credentials is
admin/admin123.Once add the credentials test the connection using test connection button.
If it is successful go ahead for further steps.

5. Now publish our brand new artifact to nexus server trough Jenkins. go to your job
configuration in build stage select nexus repository manager publisher and give required
parameters.
Note: nexus oss version tag option won’t work its available in pro version only.

6. If is successfully upload into nexus repository you will get below log in build console output.

7. Lets verify the our artefact in nexus repository.


JMS Tech Home Madhu Sudhan Reddy Y.B
+91-8884807341

Yes it’s successfully uploaded that’s it you’re done.

Agenda:
1. Install nexus server in windows machine
2. How to run nexus server
3. How to create a repository in nexus server
4. How to install nexus plugin (nexus platform plugin)
5. How to configure nexus server in Jenkins
6. How to test the nexus server is configure is fine or not
7. How to configure nexus properties in Jenkins job
8. Check the console output for result of job the artifact is pushed success or not.
9. Confirm the artifact pushed in nexus server with different versions

You might also like