Ben Poole

“It is a very sad thing that nowadays there is so little useless information.”

Weblog by month (September 2005)

Blimey!

No posts for a week. Tsk, disgraceful. So what has been happening in the world of me? I know you’re just itching to find out! Well, lots of meetings, lots of consulting, etc., etc. I’m conscious of the fact that I have neglected the next release of DominoWiki: I will release this imminently, as I’ve been playing with it in the wild for a month or so now, no ill effects. It’s a minor bug fix release, nothing to jump around about. Watch this space.

Other than that, I have been indulging in plenty of tinkering with ssh (via PuTTY), Tomcat and Verity. Oh yes! We’re also in the throes of rolling an enterprise wiki out into production. The software we chose is called Confluence, and it rocks. Confluence is a J2EE application which provides flexible “spaces”, wiki pages and “news posts” (basic weblog functionality), all wrapped up in a pleasing user interface with RSS all over the place. I recommend it. I believe it has some pretty decent developers working on it too... [smiley Wink]

In terms of IT function use, amongst other things we’re using Confluence to document various bits of developer guff (e.g. how to get started with Verity, Websphere and Domino processes, etc.), and a few of us are even ’blogging. Hopefully project weblogs, and full leverage of RSS will follow. Which brings me to a discussion point: what do you use for documentation in your organisation?


Gah

Today, I hit the ripe old age of thirty-three. Note that this post, for the first time in a couple of years, is not entitled “Ooof”...

Well, what a day. A ten hour meeting at work, a grabbed lunch from Pret’s, a quick bite to eat when I got home. Hopefully life will slow down a little so that I can enjoy things soon. In the meantime, I thought I’d better hold up my hands and admit the birthday — for consistency on this site if nothing else — and I’d also like to thank the friends who took time out to mention it.... you know who you are. [smiley BigGrin]

P.S. A few days after admitting to hitting thirty, Notes 6 went gold. Doesn’t time fly?


Using Mevenide

Screenshot of the Mevenide contextual menu in EclipsePart two of my occasional Maven series now follows. Feel free to disregard if you’re in Domino-land [smiley Wink] In this post I hope to provide some useful pointers for getting Mevenide Eclipse, the Maven plug-in, to work in er, Eclipse.

This all assumes you actually have Mevenide installed. If you don’t, go and do that first. OK? Right. Now, before right-clicking on a project and trying to do the Maven thang all over it, might I suggest that you ensure you have set everything up properly?

Setting up Maven

  • Check that the project is actually a Maven-ised project. i.e. its organisation is sensible*, and you have added the relevant artifacts (at the very least, project.xml)
  • ... Better yet, why not simply create a new Maven project in your Eclipse workspace by selecting File / New / Other... / Maven / Maven Project
  • Check that the plug-in has been configured in Eclipse: (Windows / Preferences... / Maven)
  • Pay special attention to the “Locations” section. For example, the Java home field is not as it appears: you’d think that it would be the same as your system’s JAVA_HOME variable wouldn't you? i.e. something like c:\j2sdk1.4.2_06\ (the path to my Java SDK). Well, in actual fact, it should be like this: c:\j2sdk1.4.2_06\jre. Yup, you need to point it at your JRE, rather than your Java library or binaries.
  • Set up your project.xml file properly. Specifically, the relative paths to your source and test folders should be set-up. Here’s a sample extract from this file:
 <build> <sourceDirectory>main/src/java</sourceDirectory> <unitTestSourceDirectory>main/test/java</unitTestSourceDirectory> <unitTest> <includes> <include>**/*Test.java</include> </includes> </unitTest> </build> 

* what constitutes “sensible organisation”? Well, Maven likes source code, resources and tests to be clearly differentiated — which makes sense — and so something like the following directory structure is appropriate. Note also the presence of a target directory for all the stuff that Maven compiles, generates, and otherwise buggers about with:

 main/src/java main/test/java ... target/classes target/test-classes target/test-reports 

So, create yer project.xml file, set up the directories you may require, and your project is ready to be Maven-ised!

Troubleshooting

  • Unspecified launch error when running Maven: double-check all your locations in the preferences pane
  • Console notification about classes and / or test classes not being found: edit your project.xml file so that Maven knows where to find your source
  • Console errors about missing tzmappings: edit the Java home preferences field to point to a valid JRE (ZoneInfoMappings data are usually found in the \jre\lib\zi folder).

Next time on your friendly Maven channel: “Yes, yes, but does this actually help me get anything done?”


This J2EE thing

Screenshot of Maven in actionFinally, I think J2EE is really starting to kick off and mature to the point that nobs like me can use it. I've been knocking out some wee (read: very small, very basic) Java web apps for a little while at work now. Beyond the odd knicker-wettingly stupid scope error in one of my servlets, it’s been going quite well. I’m enjoying the environment (the oft-mentioned MyEclipse), and I’m now even starting to show off — which brings me to build tools. Specifically, Maven.

Now, when I was even wetter behind the ears than I am now, in my copious reading around t’internet, I saw some derogatory comments about Maven. Not having a scooby’s about this tool meant that I thought nothing more of it, and moved on to the next article. However, now that I’ve started to use this beast, I fail to see what the whingeing was about: Maven is actually pretty darn clever.

But Ben, I’m on tenterhooks: what is this thing called “Maven”? I hear one of you ask. Well, pull up a chair and I shall tell you what I know (it won’t take long)...

Maven is often mentioned in the same breath as Ant. Which kind of makes sense. Kind of. Ant is a build tool, and a very capable, extensible and well-known one at that. So why do we need another build tool? Well, Maven positions itself as more of a project management tool, and so the approach is somewhat different. In Ant we have the concept of “targets”, specific tasks that need to be defined in a build.xml file, and then executed by the tool. For example, using carefully crafted targets we can create WAR files, deploy them, perform various tricks, it’s all there. This approach is said to be “imperative” which my Latin studies immediately indicate to me that it’s very specific, and task-driven. Maven, on the other hand, takes a more “declarative” approach: there are certain things that need to be accomplished over the course of a project, so let’s set those out, and then do ’em. Subtly different, and aimed at a far larger group than us developers. Rather than focus on the specifics of assembling an application, Maven adopts a “Project Object Model” (POM) for its structure.

Let’s illustrate this with an example. You’re starting a new web application. You need to create the relevant project structure in your IDE of choice. You need to document it. You need to write test code, and then write your application code around that. You need to cut WAR files every now and again for interim builds (which need to be announced to an internal mailing list and website). Documentation needs to be updated. You need to work with your chosen source repository, be it Subversion, CVS, or whatever. You need to run all your tests, report on test / code coverage, report on progress in general, and so on and so forth. Enter Maven, with its concept of “goals”. Specify a bunch of goals, and let Maven do its thing: it automatically downloads and caches code plug-ins for each behaviour, reports on what it’s up to, and generally runs a tight ship.

I’m impressed.

Further reading

BTW, if you liked this post, you might also be interested in Spuggy’s one about AppFuse!


The new router

Netgear DG834GT internet gatewayRemember my saying my poor old router popped its clogs? Well, my Netgear DG814 gave me over three years of use, pretty much always-on, so no complaints. I was happy to buy another Netgear unit, despite their poor support arrangements (a premium rate phone line to a bad call centre overseas). This is the thing I got myself: the Netgear DG834GT. It’s an integrated router / ADSL modem, as before, but this time it’s a wireless unit — with speeds right up to the new “Super G” standard. I don’t have much in the way of wireless gear at home, but Son of Stinky has a wireless card, and I hope to add some devices (specifically, something music-related) in the future.

The thing that really freaked me out when the router arrived is that whilst it looks very similar to my old one, it’s about a third of the size! It also comes with a sparkly white livery, so doesn’t look out of place tucked on the window sill behind Ethelred. In tests, the wireless signal easily makes it from my study at the front of the house right through to the garden — no mean feat given that the house has some thick ole’ walls and a fair few rooms between those two locations.

VPN works just as well with this box as before, so working from home is still just fine. The router has quite a meaty firewall implementation together with all the other usual features: port forwarding, logging, support for ADSL 2, etc., etc. Overall, so far so good. One thing though: if you ever buy a Netgear box like this, be sure to update it to the latest firmware as soon as you can. For some reason Netgear tend to ship v1.0 firmware, and no-one likes v1.0 software eh! [smiley Wink]


The Ashes

Lumme, I can hardly bear it. England look set (fingers crossed!) to take the Ashes for the first time in eighteen years. The whole series has been amazing — even I’ve watched a fair bit of it (and I swore off cricket thanks to compulsory after-school matches at my prep school in my youth!) So, a big cheer to the English and Australian teams for giving us such a treat this summer!

BBC Live: England v Australia.


Eh?

So the expected has come to pass:

BBC: eBay to buy Skype in $2.6bn deal.

... But does anyone know why? How is internet telephony a “fit” for eBay? I don’t get it.


Deutschland, 1929

These photographs are simply amazing: a large number of pictures taken around the German landscape in 1929. Sadly of course, World War II no doubt put paid to most — if not all — of these scenes. But anyway... there are so many shots straight out of Hoffman or a fairy tale!

Deutschland, 1929. More detail about the pictures can be found here.

Via boingboing.


The iTunes phone

So the new gadgets are out, and the punditry begins. It looks as though overall, the reception for the iTunes phone is going to be pretty lukewarm. I regard this as the first in a line of phones, each better than the last. The fact that the phone only stores around 100 songs isn’t the issue — that’s all my shuffle stores, and I’m perfectly happy with that. No, for me, the issue is the hardware: it’s pretty ugly. Give the market a handset like the RAZR. Now we’re talking!

Moving on to iTunes 5, I like the new L&F, but agree that Apple need to get consistent with their window themes in OS X. Things are getting messy.

Finally, the iPod nano: now that looks to be a splendid wee addition to the iPod family.


Accessible content systems

Interesting stuff going on here in the UK at the moment:

Andy Budd: Blogging in Government.

Andy Budd, together with Tom Coates, Joe Clark, Patrick Lauke and Alastair Campbell (no, not that one, a different one!), recently presented at Number 10 Downing Street and the Home Office. They were there to discuss the use of weblogs within government, in addition to the thornier issue of web accessibility (understandably very high on the government’s agenda).

One comment which really leapt out at me:

There was some lively discussion afterward, particularly on the subject of accessible content management systems. One of the audience members was currently trying to procure an off the shelf CMS and none of the vendors were able to provide one that met the double-A standard. Tom quite rightly pointed out that there is a huge market for good, accessible and standards based CMS systems out there.

Having recently attended a conference with a heavy bias on CMS implementations, and also being in a position whereby our organisation is looking at various content management tools, I too am amazed that this area is not more mature and feature-rich yet. Why, if I were a gambling man... [smiley Wink]


When routers die...

...Things slow down. I blame the thunderstorm we had this morning. Perhaps I’ll get a surge protector this time around. Anyway, dial-up really is shite is it not! Time to get me a new router, and probably a wireless one this time. It’s amazing how one gets used to an always-on, high-speed internet connection at home. I think I miss it far more than I ever would the telly! [smiley BigGrin]


On Katrina

I was going to post something about this, but Bill says it all. No-one wants to get political over a tragedy like this, so let’s not. Let’s instead simply focus on the human angle: why the hell have people in the world’s richest nation been left out on a limb like this? Unbelievable. My thoughts and prayers go out to everyone affected by Mother Nature’s latest.

Also: Volker: Please help me understand this.