Monday, 28 March 2011

Adding additional repositories in ivy

Although I've been using ivy for quite a while, it's been pretty light touch as we had someone on the team who did all the config. Moving to another project where we're using it in a more traditional way I have started to get a bit more involved.

One of the first things we needed to do was add configuration for some more repositories. On the face of it, ivy is very well documented, but sometimes you can't see the wood for the trees (or should that be ivy :-)). I'm going to describe my understanding of the process I followed in the hope that it'll help someone else, or even that someone might comment and tell me how I could have done it much more simply.

The first part is understanding how the ivysettings.xml file works. This page shows how the default ivysettings.xml file, contained in the ivy jar file, is set up. To create your own settings, you must override the complete file in the current directory adding in all the sections contained in the original.

Starting with the original:

<ivysettings>
<settings defaultResolver="default"/>
<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
</ivysettings>

I ended up with this:

<ivysettings>
<settings defaultResolver="default" />
<resolvers>
<chain name="public">
<ibiblio name="ibiblio" m2compatible="true" />

<url name="com.springsource.repository.bundles.milestone" m2compatible="true">
<artifact pattern="http://maven.springframework.org/milestone/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="jboss" m2compatible="true">
<artifact pattern="http://repository.jboss.org/nexus/content/groups/public-jboss/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
</chain>
</resolvers>

<include url="${ivy.default.settings.dir}/ivysettings-shared.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-local.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml" />
<include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml" />
</ivysettings>

Most of the file is the same as the original except that we have overridden the public resolver chain. The original
<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
section includes a file that looks like this:

<ivysettings>
<resolvers>
<ibiblio name="public" m2compatible="true"/>
</resolvers>
</ivysettings>

This content has been replace with an identical inline section that starts with the original ibiblio resolver and then add 2 additional Maven repos for Spring milestones and jboss.

Sunday, 10 October 2010

Good customer service

My super Philips electric toothbrush recently decided to give up the ghost. It developed a most unwelcome fault of switching itself on in the middle of the night. It's a brilliant brush that I bought new from an eBay seller for a good price well over a year ago and as it went wrong while I was on holiday I decided to buy another one. Luckily they were on special offer in Boots!

When I returned from holiday I decided I had nothing much to lose by sending it back to Philips with a covering letter. I reckon around 18 months is not very good for a product that retails for over £100.

Well, low and behold, on Saturday, a new one arrived in the post.

Top marks to Philips. Probably costs them very little and now means I'll be buying their products in the future.

Tuesday, 5 October 2010

Child Benefit

I have decided to write to my MP.

mp

Tuesday, 16 March 2010

Charity

Just got one of those plastic bags through the door to fill up with junk in aid of the Air Ambulance.

It's amazing in this country that we think it's normal to have major charities for 2 really important things, #1, various Air Ambulance groups and #2, the RNLI.

How is it that we're prepared to spend millions, or is it billions, of pounds funding the armed forces to go and blow people up all around the world, but we can't spare a few boats and helicopters plus crew to save the lives of people in our own country?

Sunday, 10 January 2010

Adria Altea 542 DT Caravan review

We bought this caravan last June (2009) and I thought it'd be good to do a small review to help other prospective purchasers.
We got ours from Broad Lane leisure in Daventry as VERY nearly new purchase, someone else had had it for a couple of months and only used it once, so it was hard to tell.

Our main criteria (in order) for selecting this caravan were:
  1. Layout - a good compomise for us, as the bunk beds are very wide and the bathroom is still much more than a cupboard.
  2. Weight - for the size, these vans are lightweight and we are limited by the car we tow with (Citreon C4 Picasso 138bhp).
  3. Price - these vans are very competitivley priced.
  4. Good reputation for build quality.
Of course, all caravans are a compromise and nearly all of the above come at a price of one sort or another, so I thought a list of the pros and cons might be useful, although I'll try and justify the reasons that certain things might be somewhat lacking.

Pros
  1. Price, about £11K for a 6 berth van is pretty much un-beatable.
  2. Layout is pretty much unique and as our 2 children grow older the wide bunks and also the wide single bed will hopefully be appreciated. A half-decent bathroom is also nice to have.
  3. Lightweight - about 1300KG fully loaded is amazing for this size of caravan.
Cons
  1. Small fridge - probably to keep the weight and cost down.
  2. Slightly flimsy fittings in some areas, again probably to keep the weight down. In particular the bunk beds do seem to flex a bit an I wonder if their stated 85 kg weight limit might be a bit optimistic. Also the overhead cupboard stays are plastic and I wonder if they will last.
  3. Heater is gas only, was sort of expecting electric as well, again probably budget related.
  4. Nose weight has to be very carefully checked. We only have one small 3.9kg propane gas cylinder in the front locker and it's already on the limit.
  5. Shower tray and basin plugs are very odd and I suspect peculiar to either Adira or continental caravan in general. They get jammed in very easily and you'd be advised to have a pair of pliars on hand to loosen them if necessary.
  6. Velcro cushion fixings have nearly all come off but I'm manged to glue them all back down again.
  7. Slightly dingy lighting at the rear end near the bunk beds, I noticed at recent show at Milton Keynes shopping centre, that the display model had an extra skylight there, not sure if this is now standard, or just an optional extra.

Thursday, 17 September 2009

Spot the deliberate mistake

Got caught out today doing some Jave code at work.

I thought I'd be a good boy and use Commons Lang utilities to implement toString(), hashCode() and equals(). Spot the mistake here:

@Override
public int hashCode() {
return new HashCodeBuilder(13, 73).append(field1).append(field2).hashCode();
}


Any ideas? Here's the corrected version:

@Override
public int hashCode() {
return new HashCodeBuilder(13, 73).append(field1).append(field2).toHashCode();
}


An easy mistake to make when using an IDE with auto-complete.

Luckily I was saved by my unit tests!

Monday, 20 April 2009

More Ubuntu progress

With regard to my previous post, I have recently upgraded to 9.04. I was finally getting too fed up with sound and display issues on 8.04 so upgraded to 8.10 (Intrepid), but found no improvements with the NVidia integration and sound on Skype. I took the plunge and went for the 9.04 release candidate. I have to say it is a massive improvement for me with instant out of the box dual monitor support and the sound stuff all works without having to install pulseaudio.

I need Windows less and less now and I feel the writing really is on the wall for Microsoft. This seems to be confirmed by the increasing amount of laptops for sale with Linux rather than Windows.

Happy days.