Ivy 2 beta 2 Adds Maven Metadata Support

March 18, 2008 – 18:33

Ivy 2.0 beta 2 adds an interesting useMavenMetaData switch to its ibiblio resolver. When it’s on (the default actually), Ivy will try and use the maven-metadata.xml for listing the versions available, and for dynamic dependency resolution. This is interesting to me because it makes it a lot easier to run our builds against a proxy repository server like Maven Proxy or Archiva.

Until beta 2, Ivy finds out about the available versions of a module by parsing the directory listing HTML from Ibiblio’s Apache server. That doesn’t work when there is a proxy server sitting in between, because a) the proxy server doesn’t usually proxy directory listing requests, and/or b) the proxy server renders the directory listing in different HTML. Switching to using the structured maven meta data completely eliminated this mess.

Of course, using the maven-metadata.xml files from the official ibiblio repository will subject us to some new hazard – some modules have out-of-date maven-metadata.xml. For instance, by its maven-metadata.xml, the latest version of Hibernate would still be 3.2.0.cr1.

One of those maven proxy servers turns out to be a perfect solution to this problem – we can use them now, remember? :) In my case, I run an Archiva server proxying the official maven 2 repository. Whenever I run into a bad metadata file, I simply request the missing version through Archiva, and it will fetch it and update the metadata file. For example, in the hibernate case, I would just open up Firefox and try to download http://archiva-server/repository/internal/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar. That only needs to be done once, and afterwards Archiva would have updated its local version of the maven-metadata.xml properly.

Could Java 7 Please Add A Subpackage Access Modifier?

January 6, 2008 – 22:34

As we all know, the package hierarchy in Java is a rather superficial one. Package com.foo.pack.sub means nothing special to package com.foo.pack – no more special than com.bar.whatever. It’s something that’s seemingly trivial, but really has been discouraging proper organization of classes and more careful design practices. more…

Spring 2.5’s Unintrusive Annotation-based Configuration

November 14, 2007 – 22:00

Annotation-based configuration isn’t new, but Spring 2.5 adds an interesting twist to it by making it possible to use annotations for wiring, yet without being explicitly tied to any Spring classes. more…

Dual-booters, beware the XP installer.

November 5, 2007 – 21:51

About this time last year, I decided to switch to Linux. I lived happily ever after in (K)Ubuntu, with my original Windows still kept around (one word: games). So after upgrading my workhorse desktop at home a couple of weeks back, I had the opportunity to reinstall both OS’s in a dual-boot setup. The experience from the two setup processes was unbelievably radically different. more…

Log4j 1.2.15: What’s With All These Dependencies?

September 19, 2007 – 16:55

I may not necessarily agree with Weiqi Gao’s opinion that Log4j Must Die, but I have to admit that I really think the new mandatory dependencies added by log4j 1.2.15 are going over the board. To add insult to injury, some of those dependencies – namely com.sun.jdmk.jmxtools and com.sun.jmx.jmxri – aren’t actually available in any public repository due to license reasons. more…

An Odd Netflix Recommendation

August 9, 2007 – 20:24

Caught this “Movie you’ll :heart” recommendation from Netflix today. WWII submarine && King Lear Japanese Edition && modern American office parody => documentary on insects?
Thrown-off Netflix Recommendation

The infinit loop in Horde

August 1, 2007 – 22:52

Tried to install Horde Groupware WebMail Edition in my new server. Ran ./scripts/setup.php. Test.php showed everything fine. But when i try to hit the horde entry page for the first time, the browser gets into an infinite loop. The server log keeps showing

“GET /horde/index.php/login.php HTTP/1.1″ 302 26

Here’s a workaround.

Export a private key without encryption using openssl

July 28, 2007 – 14:54

When I generated a private key file for a new server I’m setting up, I put in a pass phrase. The PEM file for the private key is then encrypted with that pass phrase. Usually that’s a good thing, but a problem came when I needed to make postfix use that and the certificate issued based-on it. Postfix can only access a passwordless private key file. So to produce one, here’s what I did:

cat my.crt my.key >my.pem
openssl pkcs12 -export -in my.pem -nodes -out my.pfx
openssl pkcs12 -in my.pfx -out my-nodes.key -nodes -nocerts

How to Assign a Label to a Swap Partition

July 20, 2007 – 22:37

mkswap -L label /dev/device

Checked Exceptions and Alternate Business Flows

July 17, 2007 – 12:57

As I have always had problems with Java’s checked exceptions, I had a little debate with Debasish in the comments section of his recent blog post regarding exceptions in DDD. Over there, I concluded my case with: more…