100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

Artifact Repositories (Nexus/Artifactory) Cheat Sheet

Artifact Repositories (Nexus/Artifactory) Cheat Sheet

Configuring and using binary repository managers like Nexus and Artifactory to store, version, and proxy build artifacts.

2 PagesIntermediateFeb 15, 2026

Repository Types

Common repository classifications in Nexus/Artifactory.

  • Hosted repository- Stores artifacts you publish yourself, e.g. internal releases
  • Proxy repository- Caches artifacts fetched from a remote source like Maven Central or npm registry
  • Group/virtual repository- Aggregates multiple hosted/proxy repos behind a single URL
  • Snapshot vs release repo- Separates mutable pre-release builds from immutable versioned releases

Maven settings.xml for Nexus

Point Maven at a Nexus-hosted repository with authentication.

xml
<settings>  <servers>    <server>      <id>nexus-releases</id>      <username>${env.NEXUS_USER}</username>      <password>${env.NEXUS_PASS}</password>    </server>  </servers>  <mirrors>    <mirror>      <id>nexus</id>      <mirrorOf>*</mirrorOf>      <url>https://nexus.example.com/repository/maven-public/</url>    </mirror>  </mirrors></settings>

Publish to Artifactory (npm)

Configure npm to publish packages to a private Artifactory registry.

bash
# Set registry for the scopenpm config set @myorg:registry https://artifactory.example.com/api/npm/npm-local/# Authenticate (writes token to .npmrc)npm login --registry=https://artifactory.example.com/api/npm/npm-local/# Publishnpm publish --registry=https://artifactory.example.com/api/npm/npm-local/

Docker Push to Artifactory Registry

Tag and push a Docker image to an Artifactory Docker repository.

bash
docker login artifactory.example.comdocker tag myapp:1.2.0 artifactory.example.com/docker-local/myapp:1.2.0docker push artifactory.example.com/docker-local/myapp:1.2.0

Best Practices

Common conventions for keeping artifact repos maintainable.

  • Immutable releases- Never overwrite a published release version; bump the version instead
  • Retention policies- Auto-purge old snapshots and unused proxy cache entries to save storage
  • Vulnerability scanning- Integrate Xray/Nexus IQ to block artifacts with known CVEs
  • Access control by repo- Scope read/write permissions per team or environment
Pro Tip

Route all external dependency downloads through a proxy repository, not directly to the public internet — it gives you a build cache, an outage buffer if the upstream registry goes down, and a single point to enforce vulnerability policy.

Was this cheat sheet helpful?

Explore Topics

#ArtifactRepositoriesNexusArtifactory#ArtifactRepositoriesNexusArtifactoryCheatSheet#DevOps#Intermediate#RepositoryTypes#Maven#Settings#Xml#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech

Professional Web Designing Services

  • Responsive Websites
  • E-commerce Solutions
  • SEO Friendly Design
  • Fast & Secure
  • Support & Maintenance
Get a Free Quote

Share this Cheat Sheet