weav797 / Module06-nexus-artifact-repo

Training demos for Module 6 in Techworld with Nana bootcamp. Focusing on artifact repositories with Nexus.

Repository from Github https://github.comweav797/Module06-nexus-artifact-repoRepository from Github https://github.comweav797/Module06-nexus-artifact-repo

Nexus Artifact Publisher

This project demonstrates setting up a private Nexus repository and publishing Java artifacts using both Gradle and Maven.

Source: Techworld with Nana bootcamp

πŸ”§ Technologies Used

  • Nexus
  • DigitalOcean Droplet (Ubuntu)
  • Java 17
  • Gradle
  • Maven
  • Linux Shell Scripting

πŸ“¦ Project Structure

  • nexus-setup/ - Scripts and notes for installing/configuring Nexus
  • gradle-project/ - Simple Java project built with Gradle, published to Nexus
  • maven-project/ - Simple Java project built with Maven, published to Nexus

πŸš€ Steps Performed

1. Provisioned a DigitalOcean Droplet

  • Ubuntu 24.10
  • Opened necessary firewall ports:
    • 8081 for Nexus
    • 22 for SSH (only from specific IPs for security)

2. Installed and Configured Nexus

  • Installed Nexus using commands listed in ( install-nexus.sh )
    • Commands were performed manually, although there is opportunity to automate if needed.
  • Created a new user with proper permissions
    • System user named nexus was created for nexus tasks only
    • More details listed in ( configure-nexus.md )
  • Used sample repository in Nexus (maven-snapshots)
  • Note: This kind of repo is best for capturing builds for lower environments like Development/Test.

3. Created and Built Sample Java Projects

4. Published Artifacts to Nexus

  • Configured build.gradle and pom.xml to use Nexus as the repository
  • Built JARs and pushed them using gradle publish and mvn deploy

5. Verified Uploads

  • Logged into Nexus web UI
  • Verified artifacts appeared in the correct repository

πŸ” Notes

  • Credentials are generally configured in ~/[insert_project_directory]/gradle.properties and ~/.m2/settings.xml (example templates included. see here for gradle and here for maven templates.)

πŸ“Έ Screenshots

See /screenshots folder for proof of Nexus setup and successful artifact uploads.

🧠 Lessons Learned

  • Nexus setup reinforced my knowledge about Linux permissions
  • Understood how build tools publish to private artifact repositories
  • Gained hands-on experience in setting up internal developer infrastructure

About

Training demos for Module 6 in Techworld with Nana bootcamp. Focusing on artifact repositories with Nexus.


Languages

Language:HTML 98.2%Language:Java 0.9%Language:Shell 0.8%Language:Dockerfile 0.1%