Customizing Nexus Repository 2 Jetty Configuration Files

Visit for documentation on Nexus Repository version 2.


This article describes a feature specific to Nexus Repository 2.8+ and newer.

Nexus Repository 2 uses Eclipse Jetty as its container.

Eclipse Jetty can combine multiple config files into one final configuration. Nexus Repository 2.8 supports this merging concept in its launcher code.

Prior versions of Nexus Repository 2 loaded all of the Jetty configuration from one jetty.xml file, typically found at NEXUS_HOME/conf/jetty.xml.


How it Works

A Nexus Repository Administrator user 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 the Java Service Wrapper properties prefixed with located in NEXUS_HOME/bin/jsw/conf/wrapper.conf.

In Nexus Repository 2.15.0 and newer, look for these lines:

In Nexus Repository 2.8 to 2.14.21, look for these lines:

Any of the files prefixed with jetty in NEXUS_HOME/conf/jetty-*.xml can be specified as part of the property, where n is the next highest number not already used. This provides a simple method to add configuration for https and JMX, simply by adjusting a few properties.

See the Java Service Wrapper for more information about this property. 

Adding Custom Jetty Configuration Files

If you create new jetty configuration files, make sure they match the naming convention of starting with jetty- and ending with .xml, and are located inside of NEXUS_HOME/conf/. This ensures that when generating a support bundle, these files are included.

Nexus Repository 2.15.0 configuration files need to be compatible with Jetty 9.4.

Earlier Nexus Repository 2 versions need to use configuration files compatible with Jetty 8.

Disabling Jetty Configuration Files

Comment out using hash ( # ) or remove lines starting with that reference files you do not need.

Important: There should be no gaps in the number appended to each remaining property.

In order to have at least one HTTP connector with a request.log, retain the default referenced files in your Nexus Repository 2 version.

Jetty Example Configuration Files Are Incompatible

Do not use the NEXUS_HOME/conf/examples/jetty-*.xml example files from older Nexus Repository 2 installations. These can cause problems as they were intended to be standalone files that could not be merged into other files.

Have more questions? Submit a request


Article is closed for comments.