Directories

The following sections describe the various directories that are a part of any Nexus Repository Manager Pro and Nexus Repository Manager OSS installation. When you install Nexus Repository Manager OSS or Nexus Repository Manager Pro, you are creating two directories: a directory containing the runtime and application often symlinked as nexus and a directory containing your own configuration and data - sonatype-work/nexus. When you upgrade to a newer version of Nexus Repository Manager, you replace the application directory and retain all of your own custom configuration and repository data in sonatype-work/.

Sonatype Work Directory

The Sonatype Work directory sonatype-work is created as a sibling to the nexus application directory, and the location of this directory can be configured via the nexus.properties file which is described in Configuration Directory.

The Sonatype Work directory sonatype-work/nexus/ contains a number of subdirectories. Depending on the plugins installed and used, some directories may or may be not present in your installation:

access/ 

This directory contains a log of all IP addresses accessing the repository manager. The data can be viewed by clicking on Active Users Report in the Administration - Licensing tab in the user interface.

aether-local-repository/ or maven2-local-repository

This holds temporary files created when running Maven dependency queries in the user interface

backup/ 

If you have configured a scheduled job to back up configuration, this directory is going to contain a number of ZIP archives that contain snapshots of the configuration. Each ZIP file contains the contents of the conf/ directory. (Automated backups are a feature of Nexus Repository Manager Pro.)

broker/ 

The broker directory and its subdirectories contains the storage backend for the Smart Proxy messaging component

conf/ 

This directory contains the configuration. Settings that define the list of repositories, the logging configuration, the staging and procurement configuration, and the security settings are all captured in this directory.

conf/keystore/ 

Contains the automatically generated key used to identify this repository manager for Smart Proxy usage

db/ 

Contains the database storing the User Token information, if that feature is enabled

error-report-bundles/ 

Used to contain the bundled archives of data assembled for problem reporting. Since this feature has been removed this folder can be safely deleted.

felix-cache/ 

This directory holds the cache for the OSGi framework Apache Felix, which is used for the repository manager plugin architecture

health-check/ 

Holds cached reports from the Repository Health Check plugin

indexer/  and  indexer-pro/

Contains an index for all repositories and repository groups managed by repository manager. An index is a Lucene index which is the standard for indexing and searching a Maven repository. The repository manager maintains a local index for all repositories, and can also download an index from remote repositories.

logs/ 

The nexus.log file that contains information about a running instance of the repository manager. This directory also contains archived copies of log files. Log files are rotated every day. To reclaim disk space, you can delete old log files from the logs directory.

nuget/ 

Contains the database supporting queries against NuGet repositories used for .NET package support

p2/ 

If you are using the P2 repository management features of Nexus Repository Manager Pro, this directory contains a local cache of P2 repository components

plugin-repository/ 

This directory contains any additionally installed plugins from third parties as documented in Managing Plugins

proxy/ 

Stores data about the files contained in a remote repository. Each proxy repository has a subdirectory in the proxy/attributes/ directory and every file that the repository manager has interacted with in the remote repository has an XML file that captures the last requested time stamp, the remote URL for a particular file, the length of the file, the digests for a particular file, and others. If you need to backup the local cached contents of a proxy repository, you should also back up the contents of the proxy repository‚Äôs directory under proxy/attributes/.

storage/ 

Stores components and metadata repositories. Each repository is a subdirectory that contains the components in a repository. If the repository is a proxy repository, the storage directory will contain locally cached components from the remote repository. If the repository is a hosted repository, the storage directory will contain all components in the repository. If you need to back-up the contents of a repository, you should back up the contents of the storage directory.

support/ 

The support zip archive documented in Support Tools is created and stored in this folder

template-store/ 

Contains the Maven settings template files documented in detail in Managing Maven Settings

timeline/ 

Contains an index that the repository manager uses to store events and other information to support internal operations. The user interface exposes this data with the system feeds.

tmp/ 

Folder used for temporary storage

trash/ 

If you have configured scheduled jobs to remove snapshot components or to delete other information from repositories, the deleted data will be stored in this directory. To empty this trash folder, view a list of repositories, and then click on the Trash icon in the user interface.

The conf/ directory contains a number of files which allow for configuration and customization of the repository manager. All of the files contained in this directory are altered by the administrative user interface. While you can change the configuration settings contained in these files with a text editor, Sonatype recommends that you modify the contents of these files using the administrative user interface. Depending on your version of the repository manager and the installed plugins, the complete list of files may differ slightly.

broker.groovy 

A groovy script for configuring low-level properties for Smart Proxy

capabilities.xml 

Further Smart Proxy backend configuration

healthcheck.properties

Configuration for the Repository Health Check

logback.properties logback.xml , and logback-*.xml

Contains logging configuration. If you need to customize the detail of log messages, the frequency of log file rotation, or if you want to connect your own custom logging appenders, you should edit the logback-nexus.xml configuration file as desired. If you find log4j.properties files as well, you can safely remove them since they are remnants from an old version and are not used anymore.

lvo-plugin.xml

Contains configuration for the latest version plugin. This XML file contains the location of the properties file that the repository manager queries to check for a newer version.

nexus.xml

The bulk of the configuration is contained in this file. This file maintains a list of repositories and all server-wide configuration like the SMTP settings, security realms, repository groups, targets, path mappings and others.

pgp.xml

Contains PGP key server configuration

nexus-obr-plugin.properties

Contains configuration for the Nexus OSGi Bundle repository plugin in Nexus Repository Manager Pro

procurement.xml

Contains configuration for the procurement plugin in Nexus Repository Manager Pro

security-configuration.xml

Contains global security configuration

security.xml

Contains security configuration about users and roles

staging.xml

Contains configuration for the Nexus Staging Plugin in Nexus Repository Manager Pro

Configuration Directory

After installing the repository manager and creating the nexus symlink as described earlier, your nexus folder contains a conf directory, different than the one discussed above in sonatype-work. The nexus conf directory contains configuration for the Jetty servlet container. You will only need to modify the files in this directory if you are customizing the configuration of Jetty servlet container or the behavior of the scripts that start the repository manager.

The files and folders contained in this directory are:

nexus.properties

This file contains configuration variables which control the behavior of the repository manager and the Jetty servlet container. If you are customizing the port and host that the repository manager listens to, you change the application-port and application-host properties defined in this file. If you want to customize the location of the sonatype-work directory, you modify the value of the nexus-work property in this configuration file. Changing nexus-webapp-context-path allows you to configure the server context path where repository manager lives.

jetty.xml  and  jetty-*.xml

Configuration files for the Eclipse Jetty servlet container running the repository manager. Jetty users are used to providing a list of jetty XML config files which are merged to form the final configuration. As an advanced configuration option, the repository manager supports this merging concept in its launcher code as of version 2.8.

You can specify additional jetty XML configuration files to load to form the final configuration. For the standard distribution bundle, these files can be specified using special properties located in NEXUS_HOME/bin/jsw/conf/wrapper.conf

wrapper.app.parameter.1=./conf/jetty.xml
wrapper.app.parameter.2=./conf/jetty-requestlog.xml
# add more indexed app parameters...

Any of the files located at NEXUS_HOME/conf/jetty-*.xml can be specified as part of the wrapper.app.parameter.n property, where n is the next highest number not already used. The Java Service Wrapper documentation contains more information about this property. This setup allows for a simple method to add configuration for https, JMX and others by adjusting a few properties.

Versions of Nexus Repository Manager Pro and Nexus Repository Manager OSS prior to 2.8 loaded all of the Jetty configuration from one jetty.xml file, typically found at NEXUS_HOME/conf/jetty.xml and required modifications to this file for configuration changes. Examples were available in NEXUS_HOME/conf/examples. These files cannot be used in version 2.8 or higher, as they were intended to be standalone files that could not be merged into other files.