Installing Sun Java 6 on Ubuntu 10.04 (Lucid Lynx)

I came across this post that almost completely explains how to get Sun Java SE 6 installed on Ubuntu 10.04 (Lucid Lynx).

$ do apt-get install python-software-properties
$ sudo add-apt-repository "deb lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

The problem I had with the original post was that add-apt-repository was not available until I installed the python-software-properties package.


Getting JSP EL to work on Google App Engine

I am developing an Spring 3.0 based web application that I intend to deploy to Google App Engine. But I’ve been banging my head against a brick wall for a day now trying to figure out why my ${xxx} expressions are not evaluating correctly.

The source of the problem seems to be a bug with Google App Engine. It would appear that even though I am using a Servlet 2.5 deployment descriptor that Google App Engine is behaving as if it was Servlet 2.3.

In Servlet 2.3 JSP expression language was not evaluated by default and it had to be explicitly enabled using the following below. However, since Servlet 2.4 the default behaviour is to evaluate the JSP expression language.

<%@ page isELIgnored="false" %>

So adding the above directive to my JSP page sorted my Google App Engine woes. But not before I’d developed some nasty bruising on my forehead.

Déjà Vu – Using the Maven Assembly Plugin correctly

If you want to create an archive (.zip, .tar.gz, etc.) file as part of a Maven 2 build you need to use the Assembly Plug-in. Furthermore, if you want to install it into your local repository or deploy it to a remote repository you will need the assistance of the Builder Helper Plug-in.

But if you are building a multi-module project you need to do it properly or you can severely mess up your build. I’ve just spent the last 2 weeks going round in circles trying to figure out why we couldn’t build our project from the root project. In the end it turned out to be the fact that I was incorrectly using the assembly goal instead of the singlegoal. This was causing Maven to fork and try to build all the project dependencies again. To us it looked like our dependencies were not getting installed into the local repository and it was going out to get the last good snapshot build of the components from our remote repository which were 2 weeks out of date by this time.

Of course. Once I found the solution a little light bulb went off and I remembered I’d already seen this problem before. About two years ago in fact.

Here is a sample POM snippet that assumes an assembly descriptor with an id of bin and a format of .tar.gz:

Building JBoss Service Archives (SARs) with Maven 2

I discovered the following Maven 2 plugins capabable of building JBoss Service ARchives (SARs).

The JBoss Maven Plugin is the better of the two because it will bundle the project dependencies into the generated SAR along with the compiled classes and resources. Whereas the Maven SAR plugin only bundles the compiled classes and resources.

The following POM extract demonstrates the usage of the JBoss Maven Plugin: