How to install Nexus using docker-compose and connect with Jenkins.
- Check my another blog to install Docker and Docker-Compose & Jenkins.
- Add Nexus configuration into docker-compose.yml file

3. Install Nexus: docker-compose up Nexus

Note: If you got permission error. give the 777 permission to nexus folder. then re-run the step 3. (its not good to allow all user to access Nexus folder. *security reason*.)
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
- Add Nexus configuration
- Maven version: default
- Goals: -DaltDeploymentRepository=deploymentRepo::default ::http://nexus:8081/repository/maven-snapshots clean 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






