Announcement Announcement Module
No announcement yet.
Dependency management with Ivy and Maven repo Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dependency management with Ivy and Maven repo

    This is obviously not the correct forum to post this in, but really no other forum suits it either as far as I can tell. And it's not really an Ivy issue since Ivy works fine for all my other dependencies. Mods, feel free to move as appropriate.

    After struggling for two days trying to get a handle on Spring dependency management using Apache Ivy, I think I'm almost there. I'm using the Maven repository instead of the Spring EBR because when I tried using the EBR it would download like 25 JARs that I did not need. Weird stuff I'd never seen before. Still not sure why.

    So here is my ivy.xml:

    		<conf name="runtime" />
    		<dependency org="org.springframework" name="spring-webmvc" rev="${spring.version}" conf="runtime->runtime" />
    		<dependency org="org.springframework" name="spring-orm" rev="${spring.version}" conf="runtime->runtime" />
    		<dependency org="org.springframework" name="spring-oxm" rev="${spring.version}" conf="runtime->runtime" />
    		<exclude org="commons-logging" />
    All of the Spring JARs are getting downloaded, except for three: spring-orm, spring-oxm, and spring-web-servlet. That last one is necessary for my Web project.

    The weird thing is that the log output shows that Ivy is finding the artifacts with no problem:

    [ivy:retrieve] 	found org.springframework#spring-webmvc;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-asm;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-beans;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-core;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-context;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-aop;3.0.5.RELEASE in central
    [ivy:retrieve] 	found aopalliance#aopalliance;1.0 in central
    [ivy:retrieve] 	found org.springframework#spring-expression;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-context-support;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-web;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-orm;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-jdbc;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-tx;3.0.5.RELEASE in central
    [ivy:retrieve] 	found org.springframework#spring-oxm;3.0.5.RELEASE in central

    But they aren't being downloaded. Does anyone have any ideas? Any help whatsoever would be greatly appreciated! I'm about to pull my hair out...
    Last edited by damrass; Aug 22nd, 2011, 03:06 PM.

  • #2

    I decided to drop the Maven repo and try the EBR again. I'm posting my setup in hopes of saving others the trouble...

    Here is my updated ivy.settings.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    	<settings defaultResolver="default" />
    		<chain name="default" returnFirst="true">			
    			<url name="com.springsource.repository.bundles.release">
    				<ivy pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
    				<artifact pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
    			<url name="com.springsource.repository.bundles.external">
    				<ivy pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
    				<artifact pattern="[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
    And here is my updated ivy.xml:
    <ivy-module version="2.0">
    	<info organisation="" module="bar" />
    		<conf name="compile" />
    		<conf name="runtime" />
    		<dependency org="org.springframework" name="org.springframework.web.servlet" rev="3.0.5.RELEASE" conf="compile->runtime" />
    		<exclude artifact="" />
    Adding the "web.servlet" component as the (only) artifact is sufficient as its transitive dependencies (i.e., the rest of the Spring framework) is automatically retrieved by Ivy. Also, I exclude the commons-logging artifact as recommended in the documentation found here:

    To browse the EBR (similar to, you can go here: