Make sure that the nexus_root directory exist

if the nexus_root directory does not exist (e.g. $nexus_root = '/srv/nexus') then the module fails.

if the nexus_root directory is /srv then nexus logs the exceptions below because it cannot write to the ${user.home} (/srv) that is owned by root. (see this: https://issues.sonatype.org/browse/NEXUS-3671 )

so to avoid that I added logic to make sure the module has this new functionality while at the same time keep backwards compatibility.


The module does not manage the nexus user and group.  I'd be open to such a change if for instance you used ensure_resource() so that the resource is overridable by the person using the module.