<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matt Goldspink &#187; Java</title>
	<atom:link href="http://www.mattgoldspink.co.uk/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattgoldspink.co.uk</link>
	<description></description>
	<lastBuildDate>Fri, 10 Feb 2012 15:16:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Re-visiting Spring, Ivy and Maven &#8211; copy and paste configs</title>
		<link>http://www.mattgoldspink.co.uk/2010/06/19/re-visiting-spring-ivy-and-maven-copy-and-paste-configs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=re-visiting-spring-ivy-and-maven-copy-and-paste-configs</link>
		<comments>http://www.mattgoldspink.co.uk/2010/06/19/re-visiting-spring-ivy-and-maven-copy-and-paste-configs/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 19:16:53 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Ivy]]></category>
		<category><![CDATA[Ivy Settings]]></category>
		<category><![CDATA[IvyDE]]></category>
		<category><![CDATA[Jodatime]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[maven2]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[springframework]]></category>
		<category><![CDATA[Springsource]]></category>

		<guid isPermaLink="false">http://www.mattgoldspink.co.uk/?p=1237</guid>
		<description><![CDATA[So its been a while since I did any Java development at home and having done enough at work I figured I would get a basic ivy setup with all the regular dependencies that I use for 90% of the &#8230; <a href="http://www.mattgoldspink.co.uk/2010/06/19/re-visiting-spring-ivy-and-maven-copy-and-paste-configs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So its been a while since I did any Java development at home and having done enough at work I figured I would get a basic ivy setup with all the regular dependencies that I use for 90% of the projects I do at the firm and am likely to do at home so I can just copy and paste in the future. So feel free to&#8230; copy and paste!</p>
<p>I&#8217;m using Eclipse 3.5 with the <a href="http://ant.apache.org/ivy/ivyde/">IvyDE plugin</a>. With those installed I created a new Java Project and then set about creating my ivy.xml. My projects pretty much all have the same basic dependencies</p>
<ul>
<li>Spring (3.0.3.RELEASE since that&#8217;s the latest)</li>
<li>Hibernate (3.5.3.Final)</li>
<li>Hibernate-search (Makes indexing my model nice and easy)</li>
<li>Jodatime (Awesome for date manipulation)</li>
<li>Jodatime-hibernate</li>
<li>H2 database (I always start of with a mock in-memory at start of dev and then use some JPA magic to dump out a schema to DB2 or Sybase, or whatever else DB is in use)</li>
<li>SLF4J (My logging api of choice)</li>
<li>Jackson (For any restful services I might write)</li>
</ul>
<p>Here&#8217;s my ivy.xml</p>
<pre class="brush: xml">
&lt; ?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;ivy -module xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
	xsi:noNamespaceSchemaLocation=&quot;http://ant.apache.org/ivy/schemas/ivy.xsd&quot;
	version=&quot;2.0&quot;&gt;

	&lt;info organisation=&quot;mattgoldspink&quot; module=&quot;gtdtd&quot; revision=&quot;1.0.0&quot; status=&quot;integration&quot;&gt;
		&lt;license name=&quot;Apache 2.0&quot; url=&quot;http://www.apache.org/licenses/LICENSE-2.0&quot;/&gt;
	&lt;/info&gt;

	&lt;configurations&gt;
		&lt;conf name=&quot;compile&quot; visibility=&quot;public&quot; description=&quot;Maven compile dependencies&quot;/&gt;
		&lt;conf name=&quot;runtime&quot; visibility=&quot;public&quot; extends=&quot;compile&quot; description=&quot;Runtime dependencies&quot;/&gt;
		&lt;conf name=&quot;test&quot; visibility=&quot;private&quot; description=&quot;Test dependencies&quot;/&gt;
	&lt;/configurations&gt;

	&lt;dependencies&gt;
		&lt;dependency org=&quot;org.springframework&quot; name=&quot;org.springframework.spring-library&quot; rev=&quot;3.0.3.RELEASE&quot; conf=&quot;runtime-&gt;runtime&quot; /&gt;
		&lt;/dependency&gt;&lt;dependency org=&quot;org.hibernate&quot; name=&quot;hibernate-core&quot; rev=&quot;3.5.3-Final&quot; conf=&quot;runtime-&gt;*&quot; /&gt;
		&lt;/dependency&gt;&lt;dependency org=&quot;com.h2database&quot; name=&quot;h2&quot; rev=&quot;1.2.137&quot; conf=&quot;runtime-&gt;*&quot; /&gt;
		&lt;/dependency&gt;&lt;dependency org=&quot;org.hibernate&quot; name=&quot;hibernate-validator&quot; rev=&quot;4.0.2.GA&quot; conf=&quot;runtime-&gt;*&quot; &gt;
			&lt;exclude org=&quot;org.slf4j&quot; name=&quot;slf4j-log4j12&quot; /&gt;
		&lt;/dependency&gt;
		&lt;dependency org=&quot;org.hibernate&quot; name=&quot;hibernate-entitymanager&quot; rev=&quot;3.5.3-Final&quot; conf=&quot;runtime-&gt;*&quot; /&gt;
		&lt;/dependency&gt;&lt;dependency org=&quot;org.hibernate&quot; name=&quot;hibernate-search&quot; rev=&quot;3.2.0.Final&quot; conf=&quot;runtime-&gt;*&quot;&gt;
			&lt;exclude org=&quot;javax.jms&quot; name=&quot;jms&quot; /&gt;
		&lt;/dependency&gt;
		&lt;dependency org=&quot;joda-time&quot; name=&quot;joda-time&quot; rev=&quot;1.6&quot; conf=&quot;runtime-&gt;*&quot; /&gt;
		&lt;/dependency&gt;&lt;dependency org=&quot;org.hibernate.javax.persistence&quot; name=&quot;hibernate-jpa-2.0-api&quot; rev=&quot;1.0.0.Final&quot; conf=&quot;runtime-&gt;*&quot; /&gt;
		&lt;/dependency&gt;&lt;dependency org=&quot;joda-time&quot; name=&quot;joda-time-hibernate&quot; rev=&quot;1.2&quot; conf=&quot;runtime-&gt;*&quot;&gt;
			&lt;exclude org=&quot;org.hibernate&quot; name=&quot;hibernate&quot; /&gt;
		&lt;/dependency&gt;
		&lt;dependency org=&quot;org.slf4j&quot; name=&quot;slf4j-api&quot; rev=&quot;1.5.6&quot; conf=&quot;runtime&quot; force=&quot;true&quot;/&gt;
		&lt;dependency org=&quot;org.slf4j&quot; name=&quot;slf4j-log4j12&quot; rev=&quot;1.5.6&quot; conf=&quot;runtime&quot; force=&quot;true&quot;/&gt;
		&lt;dependency org=&quot;org.codehaus.jackson&quot; name=&quot;jackson-core-lgpl&quot; rev=&quot;1.5.3&quot; conf=&quot;runtime&quot; /&gt;
		&lt;dependency org=&quot;org.codehaus.jackson&quot; name=&quot;jackson-mapper-lgpl&quot; rev=&quot;1.5.3&quot; conf=&quot;runtime-&gt;*&quot; /&gt;
&lt;/dependency&gt;&lt;/dependencies&gt;

&lt;/ivy&gt;
</pre>
<p>I&#8217;m going to get my spring dependencies from Springsource&#8217;s ivy/maven repository, but everything else will come from a mix of JBoss and Maven2 repo&#8217;s. Here&#8217;s the ivy-settings.xml
</p>
<pre class="brush: xml">
&lt; ?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;ivysettings&gt;

	&lt;caches artifactPattern=&quot;[organisation]/[module]/[revision]/[artifact].[ext]&quot; /&gt;
	&lt;settings defaultResolver=&quot;ibiblio.jboss.java-net.springsource&quot; checkUpToDate=&quot;true&quot; /&gt;

	&lt;resolvers&gt;
		&lt;chain name=&quot;ibiblio.jboss.java-net.springsource&quot;&gt;
			&lt;ibiblio name=&quot;ibiblio&quot; m2compatible=&quot;true&quot; /&gt;
			&lt;ibiblio name=&quot;jboss&quot; m2compatible=&quot;true&quot;
				root=&quot;https://repository.jboss.org/nexus/content/groups/public-jboss&quot; /&gt;
			&lt;ibiblio name=&quot;java.net&quot; m2compatible=&quot;true&quot;
				root=&quot;https://repository.jboss.org/nexus/content/repositories/java.net-m2/&quot; /&gt;
			&lt;ibiblio name=&quot;java.net&quot; m2compatible=&quot;true&quot;
				root=&quot;http://repository.codehaus.org/&quot; /&gt;
			&lt;url name=&quot;com.springsource.repository.libraries.release&quot;&gt;
				&lt;ivy pattern=&quot;http://repository.springsource.com/ivy/libraries/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
				&lt;artifact pattern=&quot;http://repository.springsource.com/ivy/libraries/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
			&lt;/url&gt;

			&lt;url name=&quot;com.springsource.repository.libraries.external&quot;&gt;
				&lt;ivy pattern=&quot;http://repository.springsource.com/ivy/libraries/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
				&lt;artifact pattern=&quot;http://repository.springsource.com/ivy/libraries/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
			&lt;/url&gt;
			&lt;url name=&quot;com.springsource.repository.bundles.release&quot;&gt;
				&lt;ivy pattern=&quot;http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
				&lt;artifact pattern=&quot;http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
			&lt;/url&gt;

			&lt;url name=&quot;com.springsource.repository.bundles.external&quot;&gt;
				&lt;ivy pattern=&quot;http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
				&lt;artifact pattern=&quot;http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
			&lt;/url&gt;
		&lt;/chain&gt;

	&lt;/resolvers&gt;
&lt;/ivysettings&gt;
</pre>
<p>After plugging the above into Eclipse and setting up my IvyDE classpath container to use the new ivy-settings.xml file there was one more thing to do which was to tell IvyDE what type the source jars were. Go to &#8220;Window&#8221; -> &#8220;Preferences&#8221;, find &#8220;Ivy&#8221; -> &#8220;Classpath&#8221; in the tree and on that page under the option for &#8220;Source types&#8221; enter &#8220;source,src,srcs&#8221;. Save and you should get source code attachment to the jars too. Note that you can tell your Eclipse project to use the ivy-settings within it by going right clicking on your Ivy classpath container and under &#8220;Ivy Settings Path&#8221; enter <code>project:///ivy-settings.xml</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgoldspink.co.uk/2010/06/19/re-visiting-spring-ivy-and-maven-copy-and-paste-configs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tomcat6 issues upgrading to Ubuntu 10.4 Lucid Lynx</title>
		<link>http://www.mattgoldspink.co.uk/2010/05/03/tomcat6-issues-upgrading-to-ubuntu-10-4-lucid-lynx/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tomcat6-issues-upgrading-to-ubuntu-10-4-lucid-lynx</link>
		<comments>http://www.mattgoldspink.co.uk/2010/05/03/tomcat6-issues-upgrading-to-ubuntu-10-4-lucid-lynx/#comments</comments>
		<pubDate>Mon, 03 May 2010 20:07:21 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Subsonic]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://www.mattgoldspink.co.uk/?p=1178</guid>
		<description><![CDATA[I thought I&#8217;d post this in case anyone else hits similar issues upgrading to Ubuntu 10.4. So after following all the steps I decided to keep my existing tomcat6 script under /etc/init.d/tomcat6 because I&#8217;d customised it for launching Subsonic Music &#8230; <a href="http://www.mattgoldspink.co.uk/2010/05/03/tomcat6-issues-upgrading-to-ubuntu-10-4-lucid-lynx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d post this in case anyone else hits similar issues upgrading to Ubuntu 10.4. So after following all the steps I decided to keep my existing tomcat6 script under /etc/init.d/tomcat6 because I&#8217;d customised it for launching <a href="http://www.subsonic.org/">Subsonic Music Server</a>. However after restarting my machine after upgrading I noticed subsonic was not running. So I dug a bit deeper and found that I was missing the jsvc package. Running:</p>
<p>sudo apt-get install jsvc</p>
<p>got me sorted and Subsonic is back alive!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgoldspink.co.uk/2010/05/03/tomcat6-issues-upgrading-to-ubuntu-10-4-lucid-lynx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Ivy with Springs repository and other Maven repositories</title>
		<link>http://www.mattgoldspink.co.uk/2009/03/01/using-ivy-with-springs-repository-and-other-maven-repositories/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-ivy-with-springs-repository-and-other-maven-repositories</link>
		<comments>http://www.mattgoldspink.co.uk/2009/03/01/using-ivy-with-springs-repository-and-other-maven-repositories/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 17:22:01 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[The Office]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.mattgoldspink.co.uk/?p=845</guid>
		<description><![CDATA[We use Apache Ivy in the office now and I thought I&#8217;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 &#8230; <a href="http://www.mattgoldspink.co.uk/2009/03/01/using-ivy-with-springs-repository-and-other-maven-repositories/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
We use <a href="http://ant.apache.org/ivy/">Apache Ivy</a> in the office now and I thought I&#8217;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&#8217;m using Eclipse 3.4 with the <a href="http://ant.apache.org/ivy/ivyde/">IvyDE plugin</a>. 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.</p>
<ol>
<li>I want to use Spring for config</li>
<li>I want to have a play with Compass &#8211; the lucene abstraction</li>
</ol>
<p>
Out of the box Ivy will use the &#8220;ibiblio&#8221; resolver which makes use of the Ibiblio&#8217;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 <a href="http://www.springsource.com/repository/app/">http://www.springsource.com/repository/app/</a>. So my ivy.xml file looks like:</p>
<pre class="brush: xml">
&lt; ?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;ivy -module version=&quot;2.0&quot;&gt;

	&lt;info organisation=&quot;matt&quot; module=&quot;compassTest&quot; status=&quot;integration&quot; /&gt;

	&lt;dependencies&gt;
		&lt;dependency org=&quot;org.springframework&quot; name=&quot;org.springframework.context.support&quot;
			rev=&quot;2.5.6.A&quot; /&gt;
		&lt;dependency org=&quot;org.compass-project&quot; name=&quot;compass&quot; rev=&quot;2.2.0-M2&quot; /&gt;
	&lt;/dependencies&gt;

&lt;/ivy&gt;
</pre>
<p>
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&#8217;d <a href="http://www.springsource.com/repository/app/faq#q7">here</a>), then I need to add <a href="http://repo.compass-project.org/">Compass&#8217;s Maven repo</a> and finally Compass depends on a version of Lucene not in Springs repository so I need to add in ibiblio&#8217;s Maven2 repository. My final ivy-settings.xml file looks like:</p>
<pre class="brush: xml">
&lt; ?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;ivysettings&gt;
	&lt;settings defaultResolver=&quot;spring.compass.ibiblio&quot; checkUpToDate=&quot;true&quot; /&gt;
	&lt;resolvers&gt;
		&lt;chain name=&quot;spring.compass.ibiblio&quot;&gt;
			&lt;url name=&quot;com.springsource.repository.bundles.release&quot;&gt;
				&lt;ivy pattern=&quot;http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
				&lt;artifact pattern=&quot;http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
			&lt;/url&gt;
			&lt;url name=&quot;com.springsource.repository.bundles.external&quot;&gt;
				&lt;ivy pattern=&quot;http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
				&lt;artifact pattern=&quot;http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]&quot; /&gt;
			&lt;/url&gt;
			&lt;ibiblio name=&quot;compass&quot; m2compatible=&quot;true&quot; root=&quot;http://repo.compass-project.org&quot; /&gt;
			&lt;ibiblio name=&quot;ibiblio&quot; m2compatible=&quot;true&quot; /&gt;
		&lt;/chain&gt;

	&lt;/resolvers&gt;
&lt;/ivysettings&gt;
</pre>
<p>
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!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattgoldspink.co.uk/2009/03/01/using-ivy-with-springs-repository-and-other-maven-repositories/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

