This article describes a feature specific to Nexus 2.8+ and newer. (NEXUS-6153)
<TABLE OF CONTENTS>
Nexus Repository 2 uses Eclipse Jetty as its container.
Eclipse Jetty can combine multiple config files into one final configuration. Repository 2.8 supports this merging concept in its launcher code.
Prior versions of Repository 2 loaded all of the Jetty configuration from one jetty.xml file, typically found at
How it Works
A Nexus 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
wrapper.app.parameter located in
In Repository 2.15.0 and newer, look for these lines:
In 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
wrapper.app.parameter.n 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.
Repository 2.15.0 configuration files need to be compatible with Jetty 9.4.
Earlier Repository versions need to use configuration files compatible with Jetty 8.
Disabling Jetty Configuration Files
Comment out using hash ( # ) or remove lines starting with
wrapper.app.parameter 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 Repository version.
Jetty Example Configuration Files Are Incompatible
Do not use the
NEXUS_HOME/conf/examples/jetty-*.xml example files from older Nexus installations. These can cause problems as they were intended to be standalone files that could not be merged into other files.