--- conf/wrapper.conf	2022-03-23 19:24:46.000000000 +0100
+++ conf/wrapper.conf	2022-04-06 21:10:27.448234000 +0200
@@ -8,38 +8,33 @@
 # keywords.
 
 # Set the JSW working directory (used as base for resolving relative paths)
-wrapper.working.dir=../../..
+wrapper.working.dir=%%DATADIR%%
 
 # Set the JVM executable
 # (modify this to absolute path if you need a Java that is not on the OS path)
-wrapper.java.command=java
+wrapper.java.command=%%JAVA%%
 
 # The main class that JSW will execute within JVM
 wrapper.java.mainclass=org.sonatype.nexus.bootstrap.jsw.JswLauncher
 
 # The JVM classpath
-wrapper.java.classpath.1=bin/jsw/lib/wrapper-3.2.3.jar
+wrapper.java.classpath.1=%%WRAPPER_JAR%%
 wrapper.java.classpath.2=./lib/*.jar
-wrapper.java.classpath.3=./conf/
+wrapper.java.classpath.3=%%ETCDIR%%
 
 # The library path
-wrapper.java.library.path.1=bin/jsw/lib
+wrapper.java.library.path.1=%%WRAPPER_LIBDIR%%
 
 # Additional JVM parameters (tune if needed, but match the sequence of numbers!)
-wrapper.java.additional.1=-Djava.io.tmpdir=./tmp
+wrapper.java.additional.1=-Djava.io.tmpdir=%%WORKDIR%%/tmp
 wrapper.java.additional.2=-Djava.net.preferIPv4Stack=true
-wrapper.java.additional.3=-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl"
-wrapper.java.additional.3.stripquotes=TRUE
-wrapper.java.additional.4=-Djdk.tls.ephemeralDHKeySize=2048
-#wrapper.java.additional.5=-Xdebug
-#wrapper.java.additional.6=-Xnoagent
-#wrapper.java.additional.7=-Djava.compiler=NONE
-#wrapper.java.additional.8=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-#wrapper.java.additional.9=-XX:+HeapDumpOnOutOfMemoryError
+wrapper.java.additional.3=-Djava.util.prefs.userRoot=%%WORKDIR%%
+wrapper.java.additional.4=-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl"
+wrapper.java.additional.5=-Djdk.tls.ephemeralDHKeySize=2048
 
-wrapper.app.parameter.1=./conf/jetty.xml
-wrapper.app.parameter.2=./conf/jetty-requestlog.xml
-wrapper.app.parameter.3=./conf/jetty-http.xml
+wrapper.app.parameter.1=%%ETCDIR%%/jetty.xml
+wrapper.app.parameter.2=%%ETCDIR%%/jetty-requestlog.xml
+wrapper.app.parameter.3=%%ETCDIR%%/jetty-http.xml
 
 # Size Java memory, in MB (-Xms)
 wrapper.java.initmemory=256
@@ -60,7 +56,7 @@
 wrapper.on_exit.12=RESTART
 
 # Set up JSW logging
-wrapper.logfile=logs/wrapper.log
+wrapper.logfile=%%LOGDIR%%/wrapper.log
 wrapper.logfile.format=PM
 wrapper.logfile.loglevel=INFO
 wrapper.logfile.maxsize=10m
@@ -69,128 +65,5 @@
 # Set up system logging (if needed, change to INFO or other valid values)
 wrapper.syslog.loglevel=NONE
 
-# Set up JSW Console
-wrapper.console.title=Sonatype Nexus
-wrapper.console.format=PM
-wrapper.console.loglevel=INFO
-wrapper.console.flush=true
-
-# Set up JSW as NT Service (unused on other OSes)
-wrapper.ntservice.name=nexus-webapp
-wrapper.ntservice.displayname=nexus
-wrapper.ntservice.description=Sonatype Nexus
-wrapper.ntservice.dependency.1=
-wrapper.ntservice.starttype=AUTO_START
-wrapper.ntservice.interactive=false
-
-
-# =============================================
-# An example wrapper.conf file is included
-# below for quick reference
-# =============================================
-
-# ********************************************************************
-# Wrapper Java Properties
-# ********************************************************************
-# Java Application
-#wrapper.java.command=java
-
-# Tell the Wrapper to log the full generated Java command line.
-#wrapper.java.command.loglevel=INFO
-
-# Java Main class.  This class must implement the WrapperListener interface
-#  or guarantee that the WrapperManager class is initialized.  Helper
-#  classes are provided to do this for you.  See the Integration section
-#  of the documentation for details.
-#wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
-
-# Java Classpath (include wrapper.jar)  Add class path elements as
-#  needed starting from 1
-#wrapper.java.classpath.1=../lib/wrapper.jar
-
-# Java Library Path (location of Wrapper.DLL or libwrapper.so)
-#wrapper.java.library.path.1=../lib
-
-# Java Bits.  On applicable platforms, tells the JVM to run in 32 or 64-bit mode.
-#wrapper.java.additional.auto_bits=TRUE
-
-# Java Additional Parameters
-#wrapper.java.additional.1=
-
-# Initial Java Heap Size (in MB)
-#wrapper.java.initmemory=3
-
-# Maximum Java Heap Size (in MB)
-#wrapper.java.maxmemory=64
-
-# Application parameters.  Add parameters as needed starting from 1
-#wrapper.app.parameter.1=<YourMainClass>
-
-# ********************************************************************
-# Wrapper Logging Properties
-# ********************************************************************
-# Enables Debug output from the Wrapper.
-#wrapper.debug=TRUE
-
-# Format of output for the console.  (See docs for formats)
-#wrapper.console.format=PM
-
-# Log Level for console output.  (See docs for log levels)
-#wrapper.console.loglevel=INFO
-
-# Log file to use for wrapper output logging.
-#wrapper.logfile=../logs/wrapper.log
-
-# Format of output for the log file.  (See docs for formats)
-#wrapper.logfile.format=LPTM
-
-# Log Level for log file output.  (See docs for log levels)
-#wrapper.logfile.loglevel=INFO
-
-# Maximum size that the log file will be allowed to grow to before
-#  the log is rolled. Size is specified in bytes.  The default value
-#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
-#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
-#wrapper.logfile.maxsize=0
-
-# Maximum number of rolled log files which will be allowed before old
-#  files are deleted.  The default value of 0 implies no limit.
-#wrapper.logfile.maxfiles=0
-
-# Log Level for sys/event log output.  (See docs for log levels)
-#wrapper.syslog.loglevel=NONE
-
-# ********************************************************************
-# Wrapper General Properties
-# ********************************************************************
-# Allow for the use of non-contiguous numbered properties
-#wrapper.ignore_sequence_gaps=TRUE
-
-# Title to use when running as a console
-#wrapper.console.title=@app.long.name@
-
-# ********************************************************************
-# Wrapper Windows NT/2000/XP Service Properties
-# ********************************************************************
-# WARNING - Do not modify any of these properties when an application
-#  using this configuration file has been installed as a service.
-#  Please uninstall the service before modifying this section.  The
-#  service can then be reinstalled.
-
-# Name of the service
-#wrapper.name=@app.name@
-
-# Display name of the service
-#wrapper.displayname=@app.long.name@
-
-# Description of the service
-#wrapper.description=@app.description@
-
-# Service dependencies.  Add dependencies as needed starting from 1
-#wrapper.ntservice.dependency.1=
-
-# Mode in which the service is installed.  AUTO_START, DELAY_START or DEMAND_START
-#wrapper.ntservice.starttype=AUTO_START
-
-# Allow the service to interact with the desktop.
-#wrapper.ntservice.interactive=false
+# Set umask
+wrapper.umask=0027
