Using Ivy with Springs repository and other Maven repositories

We use Apache Ivy in the office now and I thought I’d give it a proper whirl at home. In the office we have our repository to store all the libraries we have in our environment and so the setting up of resolvers etc is all taken care off. Out in the real world you need to do this yourself, but the beauty of Ivy is its simple. First up I’m using Eclipse 3.4 with the IvyDE plugin. With those installed I created a new Java Project and then set about creating my ivy.xml. For this project there are a few requirements I wanted.

  1. I want to use Spring for config
  2. I want to have a play with Compass – the lucene abstraction

Out of the box Ivy will use the “ibiblio” resolver which makes use of the Ibiblio’s Maven repository. This is not really the greatest starting point as its not so easy to find stuff in. Spring however have their own repository with a lot of open source libraries and is much easier to search http://www.springsource.com/repository/app/. So my ivy.xml file looks like:

< ?xml version="1.0" encoding="ISO-8859-1"?>
<ivy -module version="2.0">

	<info organisation="matt" module="compassTest" status="integration" />

	<dependencies>
		<dependency org="org.springframework" name="org.springframework.context.support"
			rev="2.5.6.A" />
		<dependency org="org.compass-project" name="compass" rev="2.2.0-M2" />
	</dependencies>

</ivy>

Very simply I want to use Springs context support classes and I want to have play with Compass. In order to get this all to work I needed to create my own ivy-settings.xml with some new resolvers. First I need to add Springs repository resolvers (Doc’d here), then I need to add Compass’s Maven repo and finally Compass depends on a version of Lucene not in Springs repository so I need to add in ibiblio’s Maven2 repository. My final ivy-settings.xml file looks like:

< ?xml version="1.0" encoding="ISO-8859-1"?>
<ivysettings>
	<settings defaultResolver="spring.compass.ibiblio" checkUpToDate="true" />
	<resolvers>
		<chain name="spring.compass.ibiblio">
			<url name="com.springsource.repository.bundles.release">
				<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
				<artifact pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
			</url>
			<url name="com.springsource.repository.bundles.external">
				<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
				<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
			</url>
			<ibiblio name="compass" m2compatible="true" root="http://repo.compass-project.org" />
			<ibiblio name="ibiblio" m2compatible="true" />
		</chain>

	</resolvers>
</ivysettings>

After plugging the above into Eclipse and setting up my IvyDE classpath container to use the new ivy-settings.xml file all was good. Simples!

Posted in Java | Tagged , , | 3 Comments

How I pissed off Darth Vader

What does this switch do Darth?

Posted in Random | Leave a comment

I’m on twitter

Finally jumped on the band wagon. See http://www.twitter.com/mattgoldspink

Posted in Random | Leave a comment

Megu’s experiments with GIMP

test

Posted in Random | Leave a comment

I have MythTV!

I bought a new box for MythTV before Christmas and it rocks! For those that don’t know MythTV is a free software PVR (see http://mythtv.org/ for details). My box is awesome. I got it from EfficientPC.co.uk, it’s the Isis box (http://efficientpc.co.uk/desktops/flexible/isis/) with full spec for processor, ram and harddrive. The guy who runs the website ensures that the components are all linux compatible which means far less hassle when setting things like mythtv up (as opposed to me spending almost 2 years trying to get a USB Terratec Hybrid XS working on linux – which I finally managed to do about a month ago!)

So now I have have it and have it almost all set up how I want I thought I would put some notes together on some of the issues I had (unfortunately not all these things work out of the box) so that if anyone else hits them they can hopefully find some solutions here.

MythTV not recording scheduled programs

This problem turned up yesterday whilst trying to get by Shuttle PC in my room to be set up as a myth frontend. When I went to the mythweb upcoming recordings page I could see no recordings. I then tried to manually schedule recordings from the tv listings page and they did not appear. After much googling and fiddling with settings it turned out that the backend IP address on the box was still pointing to 127.0.0.1 when it should be changed to the LAN ip. After flipping that over everything appeared again :)

Securing MythWeb for multiple Users

Both my flat mate and girlfriend saw the benefit of me having 1Tb of space to fill with their favourite TV shows. MythWeb gives them perfect interface to schedule them from home or work, but I don’t want to leave it open to any old person so I used the mythbuntu control centre to set a user and password on mythweb. Unfortunately that limits it to one user so I wanted a bit more control to add multiple users. Fortunately its as easy as:


sudo htdigest /etc/mythtv/mythweb-digest MythTV <username>

That then prompts for a password to add and all is locked down and good :)

I’m sure I’ll find other nuggets of myth tv wisdom as I go along and I’ll add them on here. For now though I have 500Gb of Xmas Film Trash to watch.

Posted in mythtv | Leave a comment

Cool Stuff for Christmas

A few cool things from the net:

MERRY CHRISTMAS!

Posted in Random | Leave a comment

My Wordle


There is a severe overload in the word “love”. I suspect its down to “Love- the mix”

Posted in Random | Tagged | Leave a comment

Sketch Of Me!

Meg has done an awesome sketch of me :)

Posted in Random | Tagged | Leave a comment