I did Roller 3 on Glassfish 2 a while back
so thought that’d be the simplest thing to put on Glassfish3. The process has got quite a bit easier.

get roller

curl -O http://www.mirrorservice.org/sites/ftp.apache.org/roller/roller-4/v4.0.0/bin/apache-roller-4.0.zip
unzip apache-roller-4.0.zip

If you want to be able to send mail you’ll need Roller 4.0.1 (a bug in 4.0 breaks JavaMail on Glassfish).

setup an empty database

Roller4 isn’t perfect, but it kicks ass when it comes to auto-generating its
own database tables. It still needs the actual database to exist, though:

asadmin create-jdbc-connection-pool \
--datasourceclassname org.apache.derby.jdbc.EmbeddedDataSource \
--property databaseName=\$\{com.sun.aas.instanceRoot\}/databases/rollerdb:\
connectionAttributes=\;create\\=true rollerpool
asadmin ping-connection-pool rollerpool
asadmin create-jdbc-resource --connectionpoolid=rollerpool jdbc/rollerdb

(those of you playing along at home on an embedded database should look at upping your PermGen space at this point).

tweak roller

Roller 4 uses JNDI to find its DB by default, so there isn’t much to tweak:

cd ~/apache-roller-4.0/webapp/roller/WEB-INF/classes
curl -O http://files.hellooperator.net/glassfish/webapps/roller-custom.properties

You’ll want to change the mailserver to one you can use.

The full bewildering list of possible roller properties is in the Install Guide

You should make these changes to security.xml, too (unless you’re on Debian in which case, why bother?hee hee).

make and deploy a WAR

cd ~/apache-roller-4.0/webapp/roller
jar cvf ~/roller.war *
asadmin deploy ~/roller.war

Browse to http://localhost:8080/roller and try it out.

The database is created when you first connect, and the first user you make is the site admin.