ivy.xml for Spring 3

  • Post author:
  • Post category:Java / Tools

Here’s an ivy.xml with a dependency on Spring MVC. Please fill in the organisation and module attributes. It excludes the Unified Expression Language library because it conflicts with Tomcat 7.

<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
    <info organisation="..." module="..." />

	<dependencies>
		<dependency org="org.springframework" name="org.springframework.web.servlet" rev="3.0.5.RELEASE">
			<!-- Fix for java.lang.LinkageError: loader constraint violation -->
			<exclude name="com.springsource.javax.el" />
		</dependency>
	</dependencies>
</ivy-module>

Here’s the corresponding ivysettings.xml. It uses the SpringSource Bundle Repository instead of the default Maven repository.

<ivysettings>
	<settings defaultResolver="spring" />
	<resolvers>
		<chain name="spring">
			<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>
		</chain>
	</resolvers>
</ivysettings>