Trouble relocating nexus folder?

I got a bit adventurous and decided to install the Nexus in our Dev server. We already have a working version in a virtual environment, but I’ve got my hands on a clean Linux machine and I thought to make best use of it.

I have found this blog post very helpful for a non-Linux native person.
It was very simple to get it started (after I have sorted out some environmental and user right issues).

Once I got it started at port 8081, I wanted to move the folders around. But I didn’t want to set the environment variables, just to make sure my folder structure works..

In order to do this the main file you want to edit is located here,

/[your system folder structure]/nexus-webapp-[version]/conf/wrapper.conf

the wrapper.conf looks like this – just out of the box..

# Wrapper Properties
# Java Application

# Wait a bit longer than default before assuming jvm hasn’t started properly

#This should be set to the base of your system, which is one folder below the container and nexus folders

# 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.

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1*.jar

# Java Library Path (location of Wrapper.DLL or

# Java Additional Parameters,server=y,suspend=y,address=8000

# Initial Java Heap Size (in MB)

# Maximum Java Heap Size (in MB)

# Application parameters.  Add parameters as needed starting from 1

# Make wrapper reload configuration between app restarts (NEXUS-3032)

# Wrapper Logging Properties
# Format of output for the console.  (See docs for formats)

# Log Level for console output.  (See docs for log levels)

# Log file to use for wrapper output logging.

# Format of output for the log file.  (See docs for formats)


I didn’t like the idea of having relative paths and leaving all the standard stuff aside, I only wanted to make sure it has got the correct base directory to work with.

So all I did is introduce couple of variable like this at the top :


and for all the relative path-ed variable, just update them like this:


# Log file to use for wrapper output logging.

If you want to change the folder location, all you need to do is just update your HOME variable to the new path and all will be well. Hope this helpful !


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s