Wednesday, April 2, 2008

Maven Web Project Gotcha: Overlays

In order to prepare for some integration testing of a multi-WAR service layer, I included one WAR into the project dependencies of a Maven web project. If I had time to do this in 'the maven way', I'd probably pull this into an integration test subproject, but, sadly, I don't have time for that in this instance.

Unfortunately, this leads directly to Maven's principle of 'most surprise'. Turns out, if your web project depends on a WAR, the contents of that WAR will be overlaid over your web project, unless you explicitly tell it otherwise. Since I hadn't read about overlays this was actively damaging to my project, and very confusing. This cryptic build output helped me understand what was going on:

OverlayPackagingTask performPackaging overlay.getTargetPath() null

I hope that my mentioning this will save some of you future grief.

Tuesday, April 1, 2008

JAX-RS Momentum

It's great to see JAX-RS picking up momentum. I've done work in Restlet, and I'd like to spend some time in Jersey, so it's great to see that I'll have more choices next time.

Next comes tool support, integration, and then ... the world. Although, to be honest, I'd be happier with web services and remoting if I felt that they were consistently being used appropriately. I still find that people consider remoting when they don't need it -- too busy looking for the long-term flexibility and not enough time actually building the immediately necessary functionality.

Monday, March 31, 2008

Offline Google Docs

Curious to see how the availability of Offline Google Docs [via Scoble's twitter] affects the office software space.

Eclipse 3.4 Annotation Formatting

Eclipse 3.4 M5 resolves one of my biggest remaining complaints with the Eclipse formatter -- the inability to specify newline-after-annotation settings differently for annotations on different scopes:

Starting with 3.4M5, the Java source code formatter provides fine-grained options for line breaks after annotations. Instead of specifying whether line breaks should be inserted after all types of annotations, it's now possible to specify this separately for each of the different types of annotations


For instance, I would personally like to have newlines after method annotations, but not on method parameter annotations.