Friday, March 14, 2008

Installing war version of Archiva

Installing war version of Archiva is neither straight forward if $CATACLINA_HOME is NOT owned by you. You only own $CATACLINA_BASE, and there is $CATACLINA_HOME/bin and but no $CATACLINA_BASE/bin


* Create a directory in tomcat called archiva, at the same level as bin, conf, logs and the others.

* Copy the war file into the new directory

* Create a conf/Catalina/localhost/archiva.xml file with the following data (replace the database paths with a suitable location):

It would be more clear to put it

* Create a directory in tomcat called $CATALINA_BASE/archiva

* Copy the war file into $CATALINA_BASE/archiva

* Create a $CATALINA_BASE/conf/Catalina/localhost/archiva.xml …..

Install derby- and mail-1.4.jar into the Tomcat common/lib.

For Tomcat 6.0.*, there is no more “common/lib”, put them in “$CATALINA_HOME/lib” instead Details of change see here

Apart from mail.jar you also need to be put under $CATALINA_HOME/lib to get mail work
Java Activation Framework 1.1 - activation-1.1.jar


export CATALINA_OPTS="-Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME"

Again, if $CATACLINA_HOME is not owned by you.
export CATALINA_OPTS="-Dappserver.home=$CATALINA_BASE -Dappserver.base=$CATALINA_BASE" is better

If you use the default Derby DB, the default error log file is put under $HOME, to change it set the following properties in CATALINA_OPTS as well:"

Thursday, March 6, 2008

Create DB user in Oracle

-- Check which tablespace can be used

-- Create user
create user xxxx
identified by yyyyy
default tablespace dddddd
temporary tablespace tttttt;

-- Grant resource to user
grant connect to xxxx;
grant resourc to xxxx;

Installing Archiva

My first impression with Apache Archiva(1.0.1) is not very good.

First, I tried to install Archiva 1.0.1 on Linux as a standalone application. Here is what document say

…The standalone instance of Archiva uses the Plexus application server, which is capable of separating it's configuration from installation, in much the same way Tomcat does, for example, with it's CATALINA_BASE and CATALINA_HOME environment variables…

I can separate configuration from installation but definitely not as nice as Tomcat. When the server starts, it will write files to the installation. So sharing a single installation with multiple configurations is not possible. It would be easier if you just keep the installation and the configuration to the same user. Also, the installation document is just not right.

In step 2 “…Move the conf and data directories from the Archiva installation…”; it should be “ …Copy the conf and data directories from the Archiva installation…”, as the server expect file such as “classworlds.conf” existing in the “conf”. Details can be found here

Login problem

Due to Redback problem, newly added user just cannot login, you need to resend the validation email again (yes! email server is a requirement by default if you want to use Archiva!) Details can be found here

If you want to disable the email verification, add a file in the conf directory of the installation with the following line:


Detail about the configuration file) can be found here

Also, I need to explicitly set the smtp server to localhost, if you get the following error when the server try to send out mail

501 5.0.0 HELO requires domain address

Try adding this line to as well(assume your localhost can handle smtp)

Wednesday, March 5, 2008

Get rid of gcj

I always prefer Sun's Java over gcj, but with Linux you always default get the gcj. I found the following tip very useful here