Nexus Repository Manager is the artifact hub for the CI/CD stack. It stores all build outputs — WAR files, JARs, and versioned configuration property tarballs. The Jenkins pipeline deploys artifacts to theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/infra-neo/CICD/llms.txt
Use this file to discover all available pages before exploring further.
maven-snapshots repository at the end of a successful pipeline run, immediately after the SonarQube Quality Gate passes. Every deployed artifact is versioned with a build number and timestamp, giving you a complete history of every build stored in one place.
Quick Reference
| Property | Value |
|---|---|
| Port | 8081 |
| Image | sonatype/nexus3 |
| Container Name | nexus |
| Default Credentials | admin / [generated password] |
| Data Volume | nexus_data |
Getting the Admin Password
Nexus generates a random admin password on first start and writes it to This file is automatically deleted after you complete the first-login setup wizard and change the password. If the file is already gone, the password was changed during a previous login — check your records or reset (see Troubleshooting).
/nexus-data/admin.password inside the container. Retrieve it with:Default Repositories
Nexus ships with a default set of repositories. The pipeline uses two hosted Maven repositories:maven-releases
Stores release-version artifacts (e.g.,
1.0.0). Redeploy policy is typically set to Disable to prevent accidental overwrites of released artifacts.maven-snapshots
Stores snapshot-version artifacts (e.g.,
1.0.0-SNAPSHOT). Redeploy is allowed, which is required for the mvn deploy step to succeed on repeated pipeline runs.Pipeline Integration
The JenkinsfileDeploy to Nexus stage uses mvn deploy with an alternate deployment repository pointing to the maven-snapshots hosted repository. Credentials are injected from the nexus-credentials Jenkins credential configured by 03-configure-credentials.groovy.
main, master, or develop branches, preventing snapshot uploads from feature branches.
Properties Version Storage
The enhanced Jenkinsfile (Jenkinsfile.enhanced) also uploads versioned environment configuration tarballs to Nexus via curl. This lets you retrieve the exact configuration properties that were active at the time of any build:
{BUILD_NUMBER}-{TIMESTAMP} (e.g., 42-20251025-143022), making it easy to correlate a deployed WAR with its corresponding properties bundle.
Maven settings.xml Configuration
Formvn deploy to authenticate against Nexus, Maven must resolve the server credentials from settings.xml. The <server> block ID must match the <id> used in your pom.xml <distributionManagement> section.
Memory Tuning
Nexus runs on a Java-based application server and requires adequate heap allocation. The default settings indocker-compose.yml are suitable for development:
Troubleshooting
Nexus takes too long to start — still not accessible after 5+ minutes
Nexus takes too long to start — still not accessible after 5+ minutes
Nexus initialization can take 5–10 minutes on first boot, especially on machines with limited I/O throughput. Check current status:If memory is insufficient, reduce the heap temporarily while diagnosing:Restart after adjusting:
Can't get the admin password — admin.password file not found
Can't get the admin password — admin.password file not found
- The file may not exist yet — Nexus may still be initializing. Wait 5–10 minutes, then retry:
- If the file is truly missing, it was already deleted after a previous first-login. Check pipeline logs or team records for the password that was set.
- If no one has the password, the classic fallback is to try
admin123— this was the default for older Nexus versions and occasionally applies: - As a last resort, reset the entire Nexus volume (this loses all stored artifacts):
Maven deploy fails with 401 Unauthorized
Maven deploy fails with 401 Unauthorized
Repositories not created — maven-releases or maven-snapshots missing
Repositories not created — maven-releases or maven-snapshots missing
Nexus does not auto-create these repositories from the base image. If they are missing, create them manually via the UI:
- Log in to
http://localhost:8081with admin credentials. - Click the gear icon → Repositories → Create repository.
- Select maven2 (hosted).
- Create
maven-releaseswith Version policy: Release. - Create
maven-snapshotswith Version policy: Snapshot and Deployment policy: Allow redeploy.
nexus/nexus-config.groovy.