Monday, 28 June 2010

Apache url filtering corrupts compressed output.

While trying to set up Hudson behind apache again, I kept on getting garbage out.
After some googling I realized Hudson compress its output, therefore you can not use the normal proxy-html filter to modify urls coming from hudson:
SetOutputFilter proxy-html
Instead you can use the following:
SetOutputFilter INFLATE;proxy-html;DEFLATE
ProxyHTMLURLMap http://your_server:8080/hudson /hudson
But since hudson seems to be well behaved it even better to just not use SetOutputFilter and ProxyHTMLURLMap.

Thursday, 24 June 2010

Internet Explorer 7 with Wine

After searching a lot and trying some recipes, the following worked beautifully for me to install Internet Explorer 7 on ubuntu 10.04 (lucid)

(I changed the last step to get it to work for me, because its installed in your home dir, not in your current dir)

Download dependencies:
sudo apt-get install wine cabextract

Download and run IE4WINE:
Warning: All wine program running must be closed before install and run IE4WINE
chmod +x ./ie4wine

type ~/wineie7 (Stable Version )
type ~/wineie7https (Unstable Version with https support)

Archiva On GlassFish with Derby

I added the following to the archiva wiki, but keeping a copy here for reference and backup.
(based on

Glassfish web configuration

Deploy the war file on your Glassfish server from the admin page (http://localhost:4848).
Or copy the the war file into your <GLASSFISH_FOLDER>/domains/domain1/autodeploy/archiva.war
Glassfish file configuration
Edit the file <GLASSFISH_FOLDER>/domains/domain1/config/domain.xml to add the following tags:

Go to Ressources -> JavaMail Sessions and create a new ressource with jndi-name='mail/Session', otherwise you will get "Error creating bean with name 'mailSession'" on startup. Or add it to the config file:

<mail-resource from="" host="" jndi-name="mail/Session" object-type="user"
store-protocol="imap" store-protocol-class="com.sun.mail.imap.IMAPStore"
transport-protocol="smtp" transport-protocol-class="com.sun.mail.smtp.SMTPTransport"

Set appserver.base and appserver.home properties

Ensure that the property appserver.base is set. Archiva uses this to locate log files.

<java-config ...

JDBC resources

<jdbc-resource pool-name="archivaUsersPool" jndi-name="jdbc/users" />
<jdbc-resource pool-name="archivaPool" jndi-name="jdbc/archiva" />

Connection pool

<jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="archivaUsersPool">
<property name="databaseName" value="/archiva/data/databases/users" />
<property name="connectionAttributes" value=";create=true" />
<jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="archivaPool">
<property name="databaseName" value="/archiva/data/databases/arvhiva" />
<property name="connectionAttributes" value=";create=true" />

Resources ref

<server config-ref="server-config" name="server">
<resource-ref enabled="true" ref="jdbc/users"/>
<resource-ref enabled="true" ref="jdbc/archiva"/>

Now restart you Glassfish server, and open the archiva location. The last thing you have to do is create the admin user.