How to install Nexus using docker-compose and connect with Jenkins.

  1. Check my another blog to install Docker and Docker-Compose & Jenkins.
  2. Add Nexus configuration into docker-compose.yml file
Docker-Compose.yml

3. Install Nexus: ​docker-compose up Nexus

4. Once successfully installed Nexus. visit http://<Your ipAddresss>:<Port>

5. Login with Admin and Temp Password which is located at Nexus → admin.txt

6. After login with temp password. Change your password

7. Now to go Settings → Users → Create New User

8. Add username and password for server inside Settings.xml located at: (Jenkins → Tools → maven → config → settings.xml)

9. Login Jenkins and Add Post build actions

  1. Add Nexus configuration
  • Maven version: default
  • Goals: -DaltDeploymentRepository=deploymentRepo::default ::http://nexus:8081/repository/maven-snapshotsclean deploy
  • Click Advanced and add in POM: ​add pom.xml path (eg: Testvishal/pom.xml)

2. Build your project from Jenkins and it will deploy repository into Nexus.

3. Check your maven-snapshots into Nexus.

4. Thank you

Software Engineer -> Swift | Objective C | Objective C++ | Java Spring | Python. Contact me at: vishalkalola196@gmail.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store