[2.7.x] Backport Nexus Client changes.

Those are:
https://github.com/sonatype/nexus-oss/pull/281
https://github.com/sonatype/nexus-oss/pull/322

CI
TBD