NXRM 2 currently uses Jetty 8 which is EOL
This story will look at upgrading Jetty to the supported 9.x line.
Some early (external) investigation was done under https://github.com/sonatype/nexus-public/pull/9 but note that this branch contains a large number of changes that aren't necessarily related to upgrading Jetty, so I wouldn't use that as starting point.
Instead I'd suggest starting by upgrading the Jetty dependency in the build as well as the Jetty configuration files (the ones in NXRM3 can provide an example). Attempting a build will reveal places in the code that need fixing - likely around metrics and anything that touches Jetty specific API.