Repository Management with Nexus
Table of Contents

If you are developing software without a repository manager you are likely missing a number of opportunities to reduce some pretty obvious ineffeciencies. If everyone on your team has to hit Central to download artifacts you are missing out on some simple gains in speed and efficiency. If you don't have a local place to deploy artifacts you are forced to share binary artifacts using half-measures and compromises such as storing binaries in source control. Stop developing in the Dark Ages, read this book, and start using a repository manager. Trust us, once you start using Nexus, you'll wonder how you ever functioned without it.
- Preface
- 1. Introducing Sonatype Nexus
- 2. Component Lifecycle and Repository Management
-
- 2.1. Introduction
- 2.2. Component Lifecycle Management
- 2.3. Repository Management
- 2.4. What is a Repository?
- 2.5. What is a Repository Manager
- 2.6. Reasons to Use a Repository Manager
-
- 2.6.1. Speed Up Your Builds
- 2.6.2. Save Bandwidth
- 2.6.3. Ease the Burden on Central
- 2.6.4. Gain Predictability and Scalability
- 2.6.5. Control and Audit Dependencies and Releases
- 2.6.6. Deploy 3rd Party Artifacts
- 2.6.7. Collaborate with Internal Repositories
- 2.6.8. Distribute with Public Repositories
- 2.7. Adopting a Repository Manager
- 3. Installing and Running Nexus
-
- 3.1. Nexus Prerequisites
- 3.2. Downloading Nexus
- 3.3. Installing Nexus
- 3.4. Upgrading Nexus
- 3.5. Running Nexus
- 3.6. Post-Install Checklist
-
- 3.6.1. Step 1: Change the Administrative Password and Email Address
- 3.6.2. Step 2: Configure the SMTP Settings
- 3.6.3. Step 3: Configure Default HTTP Proxy Setting
- 3.6.4. Step 4: Enable Remote Index Downloads
- 3.6.5. Step 5: Change the Deployment Password
- 3.6.6. Step 6: If necessary, set the LANG Environment Variable
- 3.6.7. Step 7: Configure Routes
- 3.7. Configuring Nexus as a Service
- 3.8. Running Nexus Behind a Proxy
- 3.9. Installing the Nexus WAR
- 3.10. Installing a Nexus Professional License
- 3.11. Nexus Directories
- 4. Configuring Maven to Use Nexus
- 5. Using the Nexus User Interface
- 6. Configuring Nexus
-
- 6.1. Customizing Server Configuration
- 6.2. Managing Repositories
-
- 6.2.1. Proxy Repository
- 6.2.2. Hosted Repository
- 6.2.3. Virtual Repository
- 6.2.4. Configuring Repositories
- 6.2.5. Selecting Mirrors for Proxy Repositories
- 6.2.6. Adding a Mirror Entry for a Hosted Repository
- 6.2.7. Viewing Repository Summary Panel
- 6.2.8. Accessing The Central Repository Securely
- 6.2.9. Auto Block/Unblock of Remote Repositories
- 6.3. Managing Groups
- 6.4. Managing Routing
- 6.5. Managing Scheduled Tasks
- 6.6. Accessing and Configuring Capabilities
- 6.7. Managing Security
- 6.8. Managing Privileges
- 6.9. Managing Repository Targets
- 6.10. Managing Roles
- 6.11. Managing Users
- 6.12. Network Configuration
- 6.13. Nexus Logging Configuration
- 6.14. Nexus Plugins and REST Interfaces
- 6.15. Security Setup with User Tokens
- 7. Nexus Smart Proxy
- 8. Nexus LDAP Integration
-
- 8.1. Introduction
- 8.2. Enabling the LDAP Authentication Realm
- 8.3. Configuring Nexus LDAP Integration
- 8.4. Connection and Authentication
- 8.5. User and Group Mapping
- 8.6. Mapping Users and Groups with Active Directory
- 8.7. Mapping Users and Groups with posixAccount
- 8.8. Mapping Roles to LDAP Users
- 8.9. Mapping Nexus Roles for External Users
- 8.10. Mapping External Roles to Nexus Roles
- 8.11. Enterprise LDAP Support
- 9. Nexus Procurement Suite
- 10. Build Promotion with the Nexus Staging Suite
- 11. Repository Health Check
- 12. Sonatype CLM Integration
- 13. Managing Maven Settings
- 14. OSGi Bundle Repositories
- 15. P2 Repositories
- 16. .NET Package Repositories
-
- 16.1. Introduction
- 16.2. NuGet Proxy Repositories
- 16.3. NuGet Hosted Repositories
- 16.4. NuGet Virtual Repositories
- 16.5. NuGet Group Repositories
- 16.6. Accessing Packages in Repositories and Groups
- 16.7. Deploying Packages to NuGet Hosted Repositories
- 16.8. Integration of Nexus NuGet Repositories in Visual Studio
- 17. Deploying Sites to Nexus
- 18. Artifact Bundles
- 19. Nexus Best Practises
- 20. Using Nexus Plugins
-
- 20.1. Installing Additional Plugins
- 20.2. Nexus Outreach Plugin
- 20.3. Custom Metadata Plugin
- 20.4. User Account Plugin
- 20.5. Nexus Atlassian Crowd Plugin
- 20.6. Nexus Branding Plugin
- 21. Developing Nexus Plugins
-
- 21.1. Nexus Plugins
- 21.2. Nexus Extension Points
- 21.3. Nexus Plugin Extension Points
-
- 21.3.1. Nexus Plugin Extension
- 21.3.2. Nexus Index HTML Customizer
- 21.3.3. Static Plugin Resources
- 21.3.4. Plugin Templates
- 21.3.5. Event Inspectors
- 21.3.6. Content Generators
- 21.3.7. Content Classes
- 21.3.8. Storage Implementations
- 21.3.9. Repository Customization
- 21.3.10. Item and File Inspectors
- 21.3.11. Nexus Feeds
- 21.3.12. Nexus Tasks and Task Configuration
- 21.3.13. Application Customization
- 21.3.14. Request Processing
- 21.4. Using the Nexus Plugin Archetype
- 21.5. Set the Target Nexus Version
- 21.6. Building a Nexus Plugin Project
- 21.7. Creating a Complex Plugin
- 21.8. Nexus Plugin Descriptor Maven Plugin
- 21.9. The Nexus Plugin Descriptor
- 21.10. Defining Custom Repository Types
- 22. Migrating to Nexus
- 23. Configuring Nexus for SSL
- 24. Evaluating Nexus Step by Step
- A. Contributing to the Nexus Book
- B. Copyright
- C. Creative Commons License
List of Figures
- 3.1. Downloading Nexus Open Source
- 3.2. Selecting a Specific Version of Nexus Open Source to Download
- 3.3. Nexus Trial Activation Form
- 3.4. Nexus License Activation
- 3.5. Nexus Professional Evaluation Welcome Screen
- 3.6. Nexus Login Dialog (default login/password is admin/admin123)
- 3.7. Nexus Application Window
- 3.8. Nexus Professional Licensing Panel
- 3.9. Nexus Professional End-user License Agreement
- 3.10. License Upload Finished Dialog
- 3.11. Uninstall License Confirmation Dialog
- 3.12. License Uninstall Completed Dialog
- 3.13. The Sonatype Work Directory
- 4.1. Creating a New Proxy Repository
- 4.2. Configuring a Proxy Repository
- 4.3. Adding New Repositories to a Nexus Group
- 5.1. Nexus Interface for Anonymous Users
- 5.2. Browsing a Repository Storage
- 5.3. Browsing a Repository Index
- 5.4. Viewing the Artifact Information
- 5.5. Viewing the Maven Information
- 5.6. Using the Archive Browser
- 5.7. View an Artifact’s Dependencies
- 5.8. Insight Data Displaying Security Vulnerabilities for an Old Version of Jetty
- 5.9. Common Vulnerabilities and Exposures CVE Entry for a Jetty Security Issue
- 5.10. Open Source Vulnerability DataBase OSVDB Entry for a Jetty Security Issue
- 5.11. Browsing a Nexus Group
- 5.12. Browsing a Nexus Group Index
- 5.13. Results of an Artifact Search for "junit"
- 5.14. Sort and Column Options in the Search Results Table
- 5.15. Advanced Search Results for a GAV Search Activated by the Show All Versions Link
- 5.16. Configuring Nexus as an OpenSearch Provider
- 5.17. OpenSearch Search Results in Nexus
- 5.18. Nexus Available as an Option in the Firefox OpenSearch Provider List
- 5.19. Artifact Upload Form
- 5.20. Browsing Nexus System Feeds
- 5.21. Browsing Nexus Logs and Configuration
- 5.22. Selecting the Update Frequency when Tailing a Log File
- 5.23. Drop Down on User Name with Logout and Profile Options
- 5.24. Summary Section of the Profile Tab
- 5.25. Changing Your Nexus Password
- 5.26. Generating a Nexus Problem Report
- 6.1. Administration Menu in the Left Hand Panel
- 6.2. Administration SMTP Settings
- 6.3. Administration HTTP Request Settings
- 6.4. Administration Security Settings
- 6.5. Administration Error Reporting Settings
- 6.6. Sonatype Issue Tracker
- 6.7. Signing Up for a Sonatype Issue Tracker Account
- 6.8. Administration Application Server Settings
- 6.9. Administration Default HTTP Proxy Settings
- 6.10. Administration System Notification Settings
- 6.11. Administration PGP Key Server Information
- 6.12. Administration New Version Availability
- 6.13. Repository Configuration Screen for a Proxy Repository
- 6.14. Repository Configuration Screen for a Proxy Repository
- 6.15. Repository Configuration Access Settings for a Hosted Repository
- 6.16. Configuring Mirrors for Proxy Repositories
- 6.17. Repository Summary Panel for a Hosted Repository
- 6.18. Repository Summary Panel for a Proxy Repository
- 6.19. Repository Summary Panel for a Virtual Repository
- 6.20. Default Configuration for the Central Repository Using HTTPS
- 6.21. Secure Central Capability
- 6.22. Configuring Remote Repository Auto Block/Unblock
- 6.23. Group Configuration Screen in Nexus
- 6.24. Automatic Routing for a Hosted Repository
- 6.25. Automatic Routing for a Proxy Repository
- 6.26. Routing Configuration Screen in Nexus
- 6.27. Managing Nexus Scheduled Tasks
- 6.28. Capabilities Management Interface with the Outreach Management Details Visible
- 6.29. Managing Security Privileges
- 6.30. Managing Security Privileges
- 6.31. Create, Delete, Read, and Update Privileges Created
- 6.32. Managing Repository Targets
- 6.33. Excluding Source Artifacts from a Repository Targets
- 6.34. Viewing the List of Defined Roles
- 6.35. Creating a New Role
- 6.36. Viewing an Internal Role
- 6.37. Managing Security Roles
- 6.38. Managing Users
- 6.39. Adding Roles to a User
- 6.40. Nexus User Role Tree
- 6.41. Nexus User Privilege Trace
- 6.42. The Log Configuration Panel
- 6.43. Plugin Console
- 6.44. Documentation Website for the Core API
- 6.45. User Token Administration Tab Panel
- 6.46. Selected Realms Server Security Settings with User Token Realm activated
- 6.47. User Token Reset for Specific User in Security Users Administration
- 6.48. User Token Panel for the Logged in Users in the Profile Section
- 6.49. Accessing the User Token Information
- 7.1. Global Configuration for Smart Proxy
- 7.2. Copying a Certificate
- 7.3. Adding a Trusted Certificate
- 7.4. Smart Proxy Settings for a Hosted Repository
- 7.5. Smart Proxy Settings for a Proxy Repository
- 7.6. Subscription with Smart Proxy Connected
- 7.7. Deployment Scenario for a Smart Proxy Use Case
- 8.1. Adding the LDAP Authentication Realm to Available Realms
- 8.2. Move the LDAP Authentication Realm after the XML Realms
- 8.3. Enterprise LDAP Option in the Security Menu
- 8.4. A Simple LDAP Connection and Authentication Setup
- 8.5. User & Group Templates Selection Drop Down
- 8.6. User Element Mapping
- 8.7. Dynamic Group Element Mapping
- 8.8. Static Group Element Mapping
- 8.9. Checking the User and Group Mapping in LDAP Configuration
- 8.10. Viewing All Configured Users
- 8.11. All Default Realm Users
- 8.12. All LDAP Users
- 8.13. Search LDAP Users
- 8.14. Mapping the Deployment Role to an External User
- 8.15. Selecting External Role Mapping in the Role Management Panel
- 8.16. Selecting an Externally Managed Role to Map to a Nexus Role
- 8.17. Mapping an External Role to a Nexus Role
- 8.18. Defining Multiple LDAP Servers in Nexus Professional
- 8.19. Use Multiple LDAP Servers in a Fail-over Scenario
- 8.20. Supporting Multiple LDAP Schemas with Nexus Professional
- 8.21. Setting the LDAP Query Cache Duration (in Seconds)
- 8.22. Setting the LDAP Connection Timeout (in Seconds)
- 8.23. Using User & Group Mapping Templates
- 8.24. Testing a User Login
- 8.25. Supply a User’s Login Credentials
- 9.1. Procurement to a Certified Release Repository
- 9.2. Procurement to a Certified Development Repository
- 9.3. Enabling Remote Index Downloads for a Proxy Repository
- 9.4. Verification that the Remote Index has been Downloaded
- 9.5. Adding the "Approved From Central" Hosted Repository
- 9.6. Adding a Procured Repository
- 9.7. Configuring Procurement for a Hosted Repository
- 9.8. Hosted Repository is a Nexus Managed Proxy Repository while Procurement is Active
- 9.9. Viewing a Repository in the Artifact Procurement Interface
- 9.10. Applying a Rule to a Component Folder for
org/elipse/aether - 9.11. Approving
org.eclipse.aetherComponents - 9.12. Accessing the Global Repository Configuration
- 9.13. Procurement Configurations Options for a Specific Component Version
- 9.14. Procurement Repository Tree View with Rule Visualization
- 9.15. Applied Rules for the Complete Procurement Repository
- 9.16. Adding a Freeform Rule
- 9.17. Stopping Procurement for a Procured Repository
- 10.1. Release Deployment Without the Nexus Staging Suite
- 10.2. Release Deployment with the Nexus Staging Suite
- 10.3. The Stages of a Staging Repository starting with Deployment and Ending with a Release or a Drop of the Repository
- 10.4. Adding a Staging Profile
- 10.5. Creating a New Staging Profile
- 10.6. Multi-level Staging and Build Promotion
- 10.7. Configuring a Build Promotion Profile
- 10.8. Adding a Role to a User
- 10.9. Available Roles for Staging with a Test Staging Profile
- 10.10. Uploading a Staged Deployment in Nexus
- 10.11. Staging Repositories List Panel
- 10.12. List of Activities Performed on a Promoted Staging Repository
- 10.13. Details of an Open Staging Repository as Displayed under the List of Staging Repositories
- 10.14. Confirmation and Description Dialog for Closing a Staging Repository
- 10.15. Viewing Nexus Managed Repositories
- 10.16. Confirmation Dialog for Releasing a Staging Repository
- 10.17. Confirmation Dialog for Promoting a Staging Repository
- 10.18. A Build Promotion Repository and its Members Panel
- 10.19. Releasing, Promoting, and Dropping Build Promotion Profiles
- 10.20. Promoting Multiple Repositories to the Same Build Promotion Profile
- 10.21. Multi-level Staging and Build Promotion
- 10.22. Creating a Staging Ruleset
- 10.23. Associating a Staging Ruleset with a Staging Profile
- 11.1. The Repositories List with Different Quality Status Indicators and Result Counts
- 11.2. A Result Summary Window for a Repository Health Check
- 11.3. Summary of the Detailed Repository Health Check Panel
- 11.4. The Security Data in the Detailed Repository Health Check Report
- 11.5. The License Data in the Detailed Repository Health Check Report
- 11.6. Insight tab for org.springframework:spring-beans:2.5.4
- 11.7. Viewing Multiple Versions of org.springframework:spring-beans:x
- 11.8. Viewing License Analysis Results for Hibernate
- 12.1. CLM configuration tab in Nexus
- 12.2. Staging and Release Configuration for a Policy in the CLM Server
- 12.3. Staging Profile with a CLM Application Configured
- 12.4. Staging Repository Activity with a CLM Evaluation Failure and Details
- 13.1. The Maven Settings Panel
- 14.1. Creating an OSGi Bundle Proxy Repository
- 14.2. Creating a Hosted OSGi Bundle Repository
- 14.3. Creating a Virtual OSGi Bundle Repository from a Maven Repository
- 14.4. Creating a new OSGi Bundle Repository Group
- 15.1. Creating a P2 Proxy Repository
- 15.2. Creating a new P2 Repository Group
- 16.1. NuGet Proxy Repository Configuration for nuget.org
- 16.2. NuGet Gallery with Package Source URL
- 16.3. NuGet Proxy Repository Scheduled Task
- 16.4. Example Configuration for a NuGet Hosted Repository for Release Packages
- 16.5. The NuPkg Upload Panel for a Hosted NuGet Repository
- 16.6. A Virtual NuGet Repository for the Releases Repository
- 16.7. A Public Nuget Group Combining a Proxy and Two Hosted Repositories
- 16.8. Viewing and Resetting the NuGet API Key in the NuGet Configuration Tab
- 16.9. Package Source Configuration for the Package Manager in Visual Studio to Access A Nexus NuGet Repository Group
- 17.1. Adding a Hosted Repository
- 17.2. Creating a New Maven Site Repository
- 17.3. Newly Created Site Repository
- 17.4. Adding the Site Deployment Role to the Deployment User
- 17.5. Sample Site Maven Project Web Site
- 18.1. Build Promotion Menu
- 18.2. Uploading an Artifact Bundle
- 18.3. Staging Repository Created from Artifact Bundle Upload
- 20.1. Viewing Artifact Metadata
- 20.2. Editing Artifact Metadata
- 20.3. Searching Artifact Metadata
- 20.4. Metadata Search Results for Custom Metadata
- 20.5. Metadata Search Results for Custom Metadata
- 20.6. Configuring the User Account Plugin
- 20.7. Nexus Sign Up Form
- 20.8. Nexus Sign Up Confirmation
- 20.9. Nexus Activation Email
- 20.10. Manually Activating a Signed Up User
- 20.11. User Interface with only the Base UI Privileges
- 20.12. Selecting Default Roles for New Users
- 20.13. Crowd Menu Link in the Security Section of the Nexus Menu
- 20.14. Crowd Configuration Panel
- 20.15. Crowd Access Settings
- 20.16. Crowd HTTP Settings
- 20.17. Crowd HTTP Proxy Settings
- 20.18. Crowd Miscellaneous Settings
- 20.19. Configuring the Crowd Authentication Realm
- 20.20. Creating a Nexus Crowd Application
- 20.21. Creating a Nexus Crowd Application Connection
- 20.22. Creating a Nexus Crowd Application Directories
- 20.23. Creating a Nexus Crowd Application Authorization
- 20.24. Adding an External Role Mapping
- 20.25. Mapping an External Crowd Group to a Nexus Role
- 20.26. Two Crowd Groups Mapped to Nexus Roles
- 20.27. Crowd Groups for User "brian"
- 20.28. Adding an External User Role Mapping
- 20.29. Locating a Crowd User in the User Role Mapping Dialog
- 20.30. Adding a Nexus Role to a Crowd User
- 22.1. Archiva Managed Repositories
- 22.2. Editing an Archiva Managed Repository
- 22.3. Creating a Nexus Hosted Repository
- 22.4. Rebuilding the Index of a Nexus Hosted Repository
- 22.5. Browsing Archiva Remote Repositories
- 22.6. Archiva Proxy Connectors
- 22.7. Archiva Proxy Connector Settings
- 22.8. Creating a Nexus Proxy Repository
- 22.9. Adding a Proxy Repository to a Repository Group
- 22.10. Defining Nexus Repository Groups
- 23.1. SSL Certificates Administration
- 23.2. Certificate Details Displayed After Successful Retrieval
- 23.3. Providing a Certificate in PEM Format
- 23.4. SSL Tab for a Proxy Repository with Remote Server Using HTTPS
- 24.1. Nexus User Interface With Login
- 24.2. Successfully Deployed Components In The Snapshots Repository
- 24.3. Repository Heath Check Summary
- 24.4. Security Vulnerability Summary Display From Repository Health Check
- 24.5. License Analysis Summary Display From Repository Health Check
- 24.6. Repository Health Check Details With License Issues List
- 24.7. Closing A Staging Repository In Nexus User Interface
- 24.8. NuGet Repositories In Repository List
