<?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; maven2</title>
	<atom:link href="http://www.mattgoldspink.co.uk/tag/maven2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattgoldspink.co.uk</link>
	<description></description>
	<lastBuildDate>Sun, 05 Feb 2012 21:23:29 +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>
	</channel>
</rss>

