Thursday 11 June 2009

Battling with Maven

Well after upteen tries I finally got the customised Jetspeed portal tutorial to work. That's the problem with volunteer efforts. They're not quite professional because they have no real requirement to be bug-free. The community – that's me! – is supposed to fix the broken bits. I must say that of the various build systems around today, Maven, which is compulsory for Jetspeed, is not my favourite.

Problems experienced by me, and the rest of the community, include:

  1. difficulty of getting Maven to work through a proxy, which not everyone found so easy. Here's the cryptic error-message:
    Reason: POM 'org.apache.maven.plugins:maven-archetype-plugin' not found in repository: Unable to download the artifact from any repository
    This actually means that Maven couldn't contact any remote repository. In my case I couldn't get it to work through port 3128 with a username and password, even after specifying them in ~/.m2/settings.xml, according the the official instructions. So I gave up and did it at home, where I had a more direct Internet connection. Here's someone else who had the same problem.

  2. failure to login once you get it to build. What they failed to mention was that the tutorial ceased to work with some version of Tomcat after 5.5.6 and before 6.0.18. I tried for a long time with 6.0.13 which is missing certain security classes whose absence prevents the user from logging in. (It rejects user=admin, password=admin, or any user you define because it doesn't encrypt the password before looking it up.)
  3. failure to dispose of previous attempts to start up the database. I noticed that after any failed attempt to build and deploy jetexpress (the tutorial's customised version of Jetspeed) the java database connection was still live, causing any further attempts to connect to the Derby jdbc driver to fail. So I just rebooted the machine and all was fine.
  4. failure to provide proper instructions for configuring databases other than Derby. Although I eventually found some here, they are not explained properly and really belong in the Jetspeed documentation.
  5. etc. (yes, etc!) In particular don't use one of the older tutorials by mistake. They should be taken down, because they are worse, and obsolete. Oh, and don't launch Tomcat using ./startup.sh but using ./catalina.sh run as it says in the tutorial, or you'll miss important error messages.
OK, it works now, but it was a lot of effort to get something going that was supposed to take only five minutes. Whereas I wasted four days of my precious spare time. For the record I used Tomcat 6.0.20 on Mac OSX 10.4.13, JRE 1.5, Jetspeed 2.2.0, the bundled copy of Derby, and it all worked.

Why don't I give up on Jetspeed, you ask? Because the alternative is to use one of those bloated and unusable 'free'/commercial portal products. My contempt for them and their dirty tricks is undiminished in spite of my difficulties of the past few days. At least this way I can do what I like with it and walk away at the end with my software intact.

Now to start the customisation!

No comments:

Post a Comment

Note: only a member of this blog may post a comment.