Repository Management with Nexus

Abstract

Repository Management with Nexus is a book about Sonatype Nexus.


Copyright
Foreword: 2.0.2
1. Changes in Edition 2.0.1
2. Changes in Edition 2.0
1. Introducing Sonatype Nexus
1.1. Introduction
1.2. Nexus Open Source
1.2.1. Nexus Open Source Features
1.2.2. Nexus Open Source License
1.3. Nexus Professional
1.3.1. Nexus Professional Features
1.3.2. Nexus Professional License
1.4. Choosing a Nexus Edition
1.4.1. Use Nexus Open Source...
1.4.2. Use Nexus Professional...
1.4.3. Comparing Nexus Open Source and Nexus Professional Features
1.5. History of Nexus
2. Repository Management
2.1. Repository Management
2.1.1. Proxying Public Repositories
2.1.2. Managing Releases and Snapshots
2.1.3. Getting Control of Dependencies
2.1.4. A Nexus for Collaboration
2.2. What is a Repository?
2.2.1. Release and Snapshot Repositories
2.2.2. Repository Coordinates
2.2.3. Addressing Resources in a Repository
2.2.4. The Central Maven Repository
2.3. What is a Repository Manager
2.3.1. Core Capabilities of a Repository Manager
2.3.2. Additional Features of a Repository Manager
2.4. Reasons to Use a Repository Manager
2.4.1. Speed Up Your Builds
2.4.2. Save Bandwidth
2.4.3. Ease the Burden on Central
2.4.4. Gain Predictability and Scalability
2.4.5. Control and Audit Dependencies and Releases
2.4.6. Deploy 3rd Party Artifacts
2.4.7. Collaborate with Internal Repositories
2.4.8. Distribute with Public Repositories
2.5. Adopting a Repository Manager
2.5.1. Stage Zero: Before Using a Repository Manager
2.5.2. Stage One: Proxying Remote Repositories
2.5.3. Stage Two: Hosting a Repository Manager
2.5.4. Stage Three: Continuous Collaboration
2.5.5. Stage Four: Lifecycle Integration
3. Installing and Running Nexus
3.1. Downloading Nexus
3.1.1. Downloading Nexus Open Source
3.1.2. Downloading Nexus Professional
3.2. Installing Nexus
3.2.1. Nexus Prerequisites
3.2.2. Installing Nexus Open Source
3.2.3. Installing Nexus Professional
3.3. Upgrading Nexus
3.4. Running Nexus
3.5. Post-Install Checklist
3.6. Configuring Nexus as a Service
3.6.1. Startup Scripts for GNU/Linux
3.6.1.1. Add Nexus as a Service on Redhat, Fedora, and CentOS
3.6.1.2. Add Nexus as a Service on Ubuntu
3.7. Running Nexus Behind a Proxy
3.8. Installing the Nexus WAR
3.8.1. Running the Nexus WAR in Glassfish
3.9. Installing a Nexus Professional License
3.9.1. Evaluation Expiration
3.10. Sonatype Nexus Directories
3.10.1. Sonatype Nexus Work Directory
3.10.2. Nexus Configuration Directory
4. Configuring Maven to Use Nexus
4.1. Introduction
4.2. Configuring Maven to Use a Single Nexus Group
4.3. Adding Custom Repositories for Missing Dependencies
4.4. Adding a New Repository
4.5. Adding a Repository to a Group
5. Using Nexus
5.1. Introduction
5.2. Browsing Repositories
5.2.1. Viewing Artifact Metadata
5.2.2. Editing Artifact Metadata
5.3. Browsing Groups
5.4. Searching for Artifacts
5.4.1. Nexus OpenSearch Integration
5.4.2. Searching Artifact Metadata
5.5. Uploading Artifacts
5.6. Browsing System Feeds
5.7. Log Files and Configuration
5.8. Changing Your Password
6. Configuring Nexus
6.1. Configuring Nexus
6.2. Customizing Server Configuration
6.3. Configuring Automated Error Reporting Settings
6.4. New Version Notification
6.5. Managing Repositories
6.5.1. Selecting Mirrors for Proxy Repositories
6.5.2. Adding a Mirror Entry for a Hosted Repository
6.5.3. Viewing Repository Summary Panel
6.6. Managing Groups
6.7. Managing Routes
6.8. Managing Scheduled Services
6.8.1. Managing Configuration Backups with a Scheduled Service
6.9. Managing Security
6.9.1. Managing Privileges
6.9.2. Managing Repository Targets
6.9.3. Managing Security Roles
6.9.4. Managing Users
6.10. Network Configuration
6.10.1. Nexus Logging Configuration
6.11. Managing Nexus Plugins
7. Nexus Plugins
7.1. Introduction
7.2. Installing Plugins
7.3. Available Plugins
7.3.1. Nexus Staging Suite
7.3.2. Nexus Procurement Suite
7.3.3. LDAP Authentication
7.3.4. Google Analytics Plugin
8. Nexus LDAP Integration
8.1. Enabling the LDAP Authentication Realm
8.2. Configuring Nexus LDAP Integration
8.3. Connection and Authentication
8.4. User and Group Mapping
8.4.1. Mapping Users and Groups with Active Directory
8.4.2. Mapping Users and Groups with posixAccount
8.5. Mapping Roles to LDAP Users
8.5.1. Mapping Nexus Roles for External Users
8.5.2. Mapping External Roles to Nexus Roles
9. Nexus Procurement Suite
9.1. Introduction
9.1.1. The Stages of Procurement
9.1.2. Two Approaches to Procurement
9.1.2.1. Procured Release Repository
9.1.2.2. Procured Development Repository
9.2. Installing the Procurement Suite
9.3. Setting up a Procured Repository
9.3.1. Enable Remote Index Downloads
9.3.2. Create a Hosted Repository
9.3.3. Configuring Procurement for Hosted Repository
9.4. Procured Repository Administration
9.4.1. Viewing the Procurement Management Interface
9.4.. Configuring a Procurement Rule
9.4.3. Managing Procurement Rules
9.4.4. Stopping Procurement
10. Nexus Staging Suite
10.1. Introduction
10.1.1. How the Staging Suite Works
10.2. Installing the Nexus Staging Suite
10.3. Configuring Staging Profiles
10.3.1. Adding the Staging Deployer Role
10.3.2. Configuring a Staging Target
10.3.3. Configuring Staging Profiles
10.4. Performing a Staged Deployment with Maven
10.4.1. Creating a New Project
10.4.2. Update the POM: Deployment Configuration
10.4.3. Update settings.xml with Deployment Credentials
10.4.4. Deploying to a Staged Repository
10.5. Uploading a Staged Deployment in Nexus
10.6. Managing Staging Rulesets
10.6.1. Managing Staging Rulesets
10.6.2. Defining Rulesets for Promotion
10.7. Managing Staging Repositories in Nexus
10.7.1. Closing an Open Repository
10.7.2. Using the Staging Repository
10.7.3. Promoting a Repository
10.8. Managing Staging Repositories with the Nexus Maven Plugin
10.8.1. Running the Nexus Maven Plugin
10.8.2. Configuring Nexus Maven Plugin for Staging
10.8.3. Listing Your Open Staging Repositories
10.8.4. Finishing an Open Staging Repository for Your Project
10.8.5. Dropping a Closed Staging Repository
10.8.6. Promoting a Closed Staging Repository
11. Managing Maven Settings
11.1. Introduction
11.2. Manage Maven Settings Templates
11.3. Downloading Maven Settings with the Nexus Maven Plugin
11.3.1. Running the Nexus Maven Plugin
11.3.2. Configuring Nexus Maven Plugin for Settings Management
11.3.3. Downloading Maven Settings
12. OSGi Bundle Repositories
12.1. Introduction
12.2. Managing OSGi Bundle Repositories
12.2.1. Proxy OSGi Bundle Repositories
12.2.2. Hosted OSGi Bundle Repositories
12.2.3. Virtual OSGi Bundle Repositories
12.3. Grouping OSGi Bundle Repositories
13. P2 Repositories
13.1. Introduction
13.2. Managing P2 Repositories
13.2.1. Proxy P2 Repositories
13.3. Grouping P2 Repositories
14. Deploying Sites to Nexus
14.1. Introduction
14.2. Creating a New Maven Project
14.3. Configuring Maven for Site Deployment
14.4. Adding Credentials to Your Maven Settings
14.5. Creating a Maven Site Repository
14.6. Add the Site Deployment Role
14.7. Publishing a Maven Site to Nexus
15. User Account Plugin
15.1. Installing the User Account Plugin
15.2. Configuring the User Account Plugin
15.3. Signing Up for an Account
15.4. Manual Activation of New Users
15.. Modifying Default User Permissions
16. Nexus Atlassian Crowd Plugin
16.1. Installing the Crowd Plugin
16.2. Configuring the Crowd Plugin
16.2.1. Crowd Access Settings
16.2.2. Crowd HTTP Settings
16.2.3. Crowd HTTP Proxy Settings
16.2.4. Miscellaneous Settings
16.3. Adding the Crowd Authentication Realm
16.4. Configuring a Nexus Application in Crowd
16.5. Mapping Crowd Groups to Nexus Roles
16.6. Adding a Crowd Role to a Nexus User
17. Artifact Bundles
17.1. Creating an Artifact Bundle from a Maven Project
17.2. Uploading an Artifact Bundle to Nexus
18. Nexus Best Practices
18.1. Introduction
18.2. Repositories per Project/Team
18.3. Partition Shared Repositories
18.4. Selecting an Approach
19. Developing Nexus Plugins
19.1. Nexus Plugins
19.1.1. Nexus Plugin API
19.1.2. Nexus Extension Points
19.1.3. Nexus Plugin Extension Points
19.1.3.1. Nexus Plugin Extension
19.1.3.2. Nexus Index HTML Customizer
19.1.3.3. Static Plugin Resources
19.1.3.4. Plugin Templates
19.1.3.5. Event Inspectors
19.1.3.6. Content Generators
19.1.3.7. Content Classes
19.1.3.8. Storage Implementations
19.1.3.9. Repository Customization
19.1.3.10. Item and File Inspectors
19.1.3.11. Nexus Feeds
19.1.3.12. Nexus Tasks and Task Configuration
19.1.3.13. Application Customization
19.1.3.14. Request Processing
19.2. Using the Nexus Plugin Archetype
19.2.1. Set the Target Nexus Version
19.2.2. Building a Nexus Plugin Project
19.3. Creating a Complex Plugin
19.4. Nexus Plugin Descriptor Maven Plugin
19.4.1. The Nexus Plugin Descriptor
19.5. Defining Custom Repository Types
A. Migrating to Nexus from Artifactory
A.1. Introduction
A.2. Creating an Artifactory Backup
A.3. Installation of the Migration Plugin
A.4. Importing an Artifactory System Backup
A.5. Configuring the Artifactory Import
A.5.1. Configuring Artifactory Group Imports
A.5.2. Configuring Artifactory Repository Imports
A.5.3. Configuring Users and Privileges in the Artifactory Import
A.6. Performing the Artifactory Import
A.7. Configuring Artifactory Clients to Use Nexus
B. Migrating to Nexus from Archiva
B.1. Introduction
B.2. Migrating Archiva Repositories
B.2.1. Migrating an Archiva Managed Repository
B.2.2. Migrating an Archiva Proxy Connector
C. Configuring Nexus for SSL
C.1. Introduction
C.2. Importing a SSL Client Certificate
C.2.1. Downloading the SSL Import Tool
C.2.2. Importing a Client Certificate
C.2.2.1. Import the Server SSL Chain
C.2.2.2. Import the Client SSL Key/Certificate Pair
C.2.3. Configuring Nexus Startup
C.3. Configuring Nexus to Serve SSL
C.3.1. Configure the Java Keystore
C.3.2. Configure Nexus/Jetty to Use the New Keystore
C.3.3. Modify the application-port for SSL connections
C.4. Redirecting Non-SSL Connections to SSL
D. Creative Commons License
D.1. Creative Commons BY-NC-ND 3.0 US License
E. Books Revision History
E.1. Changes in Edition 2.0.1
E.2. Changes in Edition 2.0
E.3. Changes in Edition 1.9
E.4. Changes in Edition 1.8.2
E.5. Changes in Edition 1.8.1
E.6. Changes in Edition 1.8
E.7. Changes in Edition 1.7.1
E.8. Changes in Edition 1.7
E.9. Changes in Edition 1.6
E.10. Changes in Edition 1.5
E.11. Changes in Edition 1.4
E.12. Changes in Edition 1.3
E.13. Changes in Edition 1.2
E.14. Changes in Edition 1.1
E.15. Changes in Edition 1.0
E.16. Changes in Edition 0.9
E.17. Changes in Edition 0.8
E.18. Changes in Edition 0.7
E.19. Changes in Edition 0.6
E.20. Changes in Edition 0.5
Index

List of Figures

1.1. Sonatype Nexus Feature Matrix
3.1. Downloading Nexus Open Source from http://nexus.sonatype.org
3.2. Selecting the Nexus Open Source Distribution Download
3.3. Downloading Nexus Professional from http://www.sonaype.com/products/download
3.4. Default Nexus Administrative Credentials (admin/admin123)
3.5. Nexus Application Window (default login/password is admin/admin123)
3.6. Script Directory for 32-bit GNU/Linux in ${NEXUS_HOME}/bin/jsw
3.7. Nexus Professional Licensing Panel
3.8. Nexus Professional End-user License Agreement
3.9. License Upload Finished Dialog
3.10. Uninstall License Confirmation Dialog
3.11. License Uninstall Completed Dialog
3.12. The Sonatype Nexus Work Directory
3.13. Nexus Professional Configuration Directory
4.1. Creating a New Nexus Proxy Repository
4.2. Adding a Nexus Repository
4.3. Adding New Repositories to a Nexus Group
5.1. Nexus Interface for Anonymous Users
5.2. Browsing a Nexus Repository
5.3. Browsing a Nexus Repository Index
5.4. Viewing Artifact Metadata
5.5. Editing Artifact Metadata
5.6. Browsing a Nexus Group
5.7. Browsing a Nexus Group Index
5.8. Results of an Artifact Search for "maven"
5.9. Configuring Nexus as an OpenSearch Provider
5.10. OpenSearch Search Results in Nexus
5.11. Nexus Available as an Option in the Firefox OpenSearch Provider List
5.12. Searching Artifact Metadata
5.13. Metadata Search Results for Custom Metadata
5.14. Metadata Search Results for Custom Metadata
5.15. Artifact Upload Form
5.16. Browsing Nexus System Feeds
5.17. Browsing Nexus Logs and Configuration
5.18. Selecting the Update Frequency when Tailing a Log File
5.19. Changing Your Nexus Password
6.1. Nexus Server Configuration (File, SMTP, and HTTP Config)
6.2. Nexus Server Configuration (Security Settings, Anonymous Access)
6.3. Nexus Server Configuration (App Server and HTTP Proxy Config)
6.4. Configuring PGP Keyserver Preferences
6.5. Configuring the Automated Error Reporting
6.6. The Sonatype Issue Tracker
6.7. Signing Up for a Sonatype Issue Tracker Account
6.8. New Version Notification Settings
6.9. Repository Configuration Screen for a Proxy Repository
6.10. Repository Configuration Screen for a Proxy Repository
6.11. Proxy Configuration Access Settings for a Hosted Repository
6.12. Configuring Mirrors for Proxy Repositories
6.13. Configuring Mirrors for a Hosted Repository
6.14. Repository Summary Panel for a Hosted Repository
6.15. Repository Summary Panel for a Proxy Repository
6.16. Repository Summary Panel for a Virtual Repository
6.17. Group Configuration Screen in Nexus
6.18. Routes Configuration Screen in Nexus
6.19. Managing Nexus Scheduled Services
6.20. Configuring a Scheduled Backup of Nexus Configuration
6.21. Managing Security Privileges
6.22. Managing Security Privileges
6.23. Create, Delete, Read, and Update Privileges Created
6.24. Managing Repository Targets
6.25. Managing Repository Targets
6.26. Managing Security Roles
6.27. Managing Security Roles
6.28. Managing Security Roles
6.29. Managing Security Roles
6.30. Managing Users
6.31. Nexus User Role Tree
6.32. Nexus User Privilege Trace
6.33. The Log Configuration Panel
6.34. Administrative Menu Link for the Plugin Console
6.35. Nexus Plugin Console
6.36. Nexus Plugin Console Displaying REST endpoints for a Plugin
8.1. Adding the LDAP Authentication Realm to Available Realms
8.2. Move the LDAP Authentication Realm to the Top of Selected Realms
8.3. LDAP Configuration Option in the Nexus Menu
8.4. Connection and Authentication Configuration for LDAP Integration
8.5. Configuring User Mapping for LDAP Integration
8.6. Group Element Mapping with Dynamic Groups Selected
8.7. Configuring Nexus LDAP for Active Directory
8.8. Checking the User and Group Mapping in LDAP Configuration
8.9. Viewing All Configured Users
8.10. All Default Realm Users
8.11. All LDAP Users
8.12. Search LDAP Users
8.13. Mapping the Deployment Role to an External User
8.14. Selecting External Role Mapping in the Role Management Panel
8.15. Selecting an Externally Managed Role to Map to a Nexus Role
8.16. Mapping an External Role to a Nexus Role
9.1. Procurement to a Certified Release Repository
9.2. Procurement to a Certified Development Repository
9.3. Artifact Procurement in the Nexus Menu
9.4. Enabling Remote Index Downloads for a Proxy Repository
9.5. Verification that the Remote Index has been Downloaded
9.6. Adding a Hosted Repository
9.7. Adding the "Secured" Hosted Repository
9.8. Adding a Procured Repository
9.9. Configuring Procurement for a Hosted Repository
9.10. Hosted Repository is a Proxy Repository while Procurement is Active
9.11. Viewing a Repository in the Artifact Procurement Interface
9.12. Denying Procurement for Everything Under a Group
9.13. Allowing Access to a Single Artifact in a Denied Group
9.14. Viewing the Effect of Composite Procurement Rules on the Tree
9.15. Effective Procurement Rules for a Particular Node
9.16. Stopping Procurement for a Procured Repository
9.17. Stop Procurement Confirmation Dialog
10.1. Without the Nexus Staging Suite
10.2. With Nexus Staging Suite
10.3. .*Enterprise Menu after Staging Suite Installation
10.4. Assigning the Staging Deployer Role to the deployment user
10.5. Adding a Repository Target for com.sonatype.sample
10.6. Editing a Staging Profile
10.7. Uploading a Staged Deployment in Nexus
10.8. Creating a Staging Ruleset
10.9. Associating a Staging Ruleset with a Staging Profile
10.10. Listing Repositories Associated with a Staging Profile
10.11. Confirmation and Description Dialog for Closing a Staging Repository
10.12. Closed Repository After Selecting Finish
10.13. Staging Repository Added to the End of a Repository Group
10.14. Viewing Nexus Managed Repositories
10.15. Browsing a Staging Repository
10.16. Browsing Repository via Staging Profiles
10.17. Promoting a Staging Repository
10.18. Selecting the Destination Repository for Staged Repository Promotion
10.19. Confirmation Dialog for Repository Promotion
11.1. The Maven Settings Panel
12.1. Creating an OSGi Bundle Proxy Repository
12.2. Creating a Hosted OSGi Bundle Repository
12.3. Creating a Virtual OSGi Bundle Repository from a Maven Repository
12.4. Creating a new OSGi Bundle Repository Group
13.1. Creating a P2 Proxy Repository
13.2. Creating a new P2 Repository Group
14.1. Adding a Hosted Repository
14.2. Creating a New Maven Site Repository
14.3. Newly Created Maven Site Repository
14.4. Adding the Site Deployment Role to the Deployment User
14.5. Sample Site Maven Project Web Site
15.1. Configuring the User Account Plugin
15.2. Sign Up Link Available for All Nexus Users
15.3. Nexus Sign Up Form
15.4. Nexus Sign Up Confirmation
15.5. Nexus Activation Email
15.6. Nexus Activation Email
15.7. User Interface with only the Base UI Privileges
15.8. Selecting Default Roles for New Users
16.1. Crowd Menu Link under the Security Section of the Nexus Menu
16.2. Crowd Configuration Panel
16.3. Crowd Access Settings
16.4. Crowd HTTP Settings
16.5. Crowd HTTP Proxy Settings
16.6. Crowd Miscellaneous Settings
16.7. Configuring the Crowd Authentication Realm
16.8. Creating a Nexus Crowd Application
16.9. Creating a Nexus Crowd Application Connection
16.10. Creating a Nexus Crowd Application Directories
16.11. Creating a Nexus Crowd Application Authorization
16.12. Adding an External Role Mapping
16.13. Mapping an External Crowd Group to a Nexus Role
16.14. Two Crowd Groups Mapped to Nexus Roles
16.15. Crowd Groups for User "brian"
16.16. Adding an External User Role Mapping
16.17. Locating a Crowd User in the User Role Mapping Dialog
16.18. Adding a Nexus Role to a Crowd User
Bundles Menu Link under the Security Section of the Nexus Menu
Bundles Menu Link under the Security Section of the Nexus Menu
Bundles Menu Link under the Security Section of the Nexus Menu
Bundles Menu Link under the Security Section of the Nexus Menu
Bundles Menu Link under the Security Section of the Nexus Menu
19.1. Layout of a Nexus Plugin Project
A.1. Creating an Artifactory System Export
A.2. Artifactory Import Panel from the Nexus Migration Plugin
A.3. Specifying the Artifactory System Backup Path
A.4. Configuring the Artifactory Import
A.5. Configuring Artifactory Group Imports
A.6. Configuring Repositories for Artifactory Import
A.7. Merging a Proxy Repository During Artifactory Import
A.8. Configuring Users During Artifactory Import
A.9. Loading Artifactory Configuration Warning
A.10. Artifactory Import Scheduled Dialog
A.11. Viewing the Migration Logs
B.1. Archiva Managed Repositories
B.2. Editing an Archiva Managed Repository
B.3. Creating a Nexus Hosted Respository
B.4. Rebuilding the Index of a Nexus Hosted Repository
B.5. Browsing Archiva Remote Repositories
B.6. Archiva Proxy Connectors
B.7. Archiva Proxy Connector Settings
B.8. Creating a Nexus Proxy Repository
B.9. Adding a Proxy Repository to a Repository Group
B.10. Defining Nexus Repository Groups