4

The Archiva documentation states:

The standalone installation of Archiva is capable of separating its configuration from installation

However, I didn't manage to do so with 1.3.6 and 1.4 (using Ubuntu 12.04).

$ARCHIVA_BASE is set to /var/archiva and exported, but the wrapper doesn't seem to take care of that and always launches in the installation directory.

Moreover, the 1.4 init script (bin/archiva) uses $BASEDIR instead of $ARCHIVA_BASE

Does someone have a clue?

snv
  • 133
  • 1
  • 11
  • This certainly works in Archiva 1.3.6 (see https://github.com/maestrodev/puppet-archiva for an example that configures it that way). More info would be needed on the error. For 1.4, that does seem like a regression that needs to be reviewed. – Brett Porter Mar 07 '13 at 11:01

4 Answers4

2

Post is old but I faced this problem recently and wanted to share what worked for me to make Archiva 2.2.3 execute as a service on RHEL 6.8

  • Archiva installed at /opt/archiva
  • Archiva data directory created at /var/archiva_data using these instructions
  • Edited /opt/archiva/conf/wrapper.conf and made the following change
    set.default.ARCHIVA_BASE=/var/archiva_data
  • Edited /opt/archiva/bin/archiva and made the following change
    RUN_AS_USER=foo
  • Linked /etc/init.d/archiva with /opt/archiva/bin/archiva
  • Start service using service archiva start
mark_iv
  • 46
  • 6
1

How I do personally. My archiva app installed in /x1/archiva/archiva with archiva -> /x1/archiva/apache-archiva-1.4-M4-SNAPSHOT

And all datas archiva.xml in /x1/archiva/archiva-base

archiva start script is modified with:

BASEDIR=/x1/archiva/archiva/bin

BASEDIR_CONF="/x1/archiva/archiva-base"

WRAPPER_CONF="$BASEDIR_CONF/conf/wrapper.conf"

PIDDIR="$BASEDIR_CONF/logs"

And it works fine as it :-)

Olivier Lamy
  • 2,280
  • 1
  • 14
  • 12
1

This post might be a little old, I'd nonetheless like to share my experience using Archiva 2.2.1. Seperating the base from the installation directory by simply setting $ARCHIVA_BASE (as described on http://archiva.apache.org/docs/1.4-M4/adminguide/standalone.html) still doesn't work. I did the following to get Archiva up and running:

My setup

  • Archiva binaries and installation files in /opt/archiva/current (current being a symlink pointing to apache-archiva-2.2.1)
  • Directories conf/ data/ logs/ temp/ moved to /data/archiva_data

Adjustments in Archiva config files

File /opt/archiva/current/bin:

BASEDIR_CONFIG="/data/archiva_data"
WRAPPER_CONF="$BASEDIR_CONFIG/conf/wrapper.conf"
PIDDIR="$BASEDIR_CONFIG/logs"

Wrapper config File /data/archiva_data/conf/wrapper.conf:

#Manually set the Archiva Basedir
set.default.ARCHIVA_BASE=/data/archiva_data

So the steps pointed out by olamy did work, however a further adjustment was needed in the wrapper config file to reflect the configuration being moved away from the installation directory.

After the changes, I was able to start and use Archiva.

Community
  • 1
  • 1
Mike Floyd
  • 337
  • 3
  • 15
0

1 remember to use cp when you copy configuration files from original conf folder to your folder.

2 if you're trying to run archiva as service you need to modify wrapper.conf at line 14 with added your ARCHIVA_BASE folder.

dnocode
  • 1,928
  • 1
  • 18
  • 21