Stephen on Software aka SOS

June 23, 2009

Ivy Problems

Filed under: Uncategorized — Tags: — sljm @ 9:55 pm

My build server using Cruise Control and Ivy to manage project dependencies encountered an error today. Our original Project (lets call it WEB) only had one dependency call DB, so we used IVY to managed the dependency.  Now WEB depends on another new library called FILE, and i started seeing errors  like “impossible to publish artifacts …. ivy destination already exists” whenever i publish a new version.

Our ivy settings file was like this.

<ivysettings>
  <settings defaultResolver="libraries"/>
  <resolvers>
    <filesystem name="libraries">
      <artifact pattern="D:/ivyrepository/libs/[artifact]/[artifact]-[revision].[ext]" />
    </filesystem>
  </resolvers>
</ivysettings>

The reason is that both FILE and DB are writing ivy.xml files to the same directory,D:/ivyrepository/libs/ivy. Seems like you need to seperate the ivy files for both modules into different directory.

I changed the settings file to below, note the new “<ivy pattern=” part, it now puts the respective ivy files in the correct directory under each module.

<ivysettings>
  <settings defaultResolver="libraries"/>
  <resolvers>
    <filesystem name="libraries">
	  <ivy pattern="D:/ivyrepository/libs/[module]/ivy/ivy-[revision].xml"/>
      <artifact pattern="D:/ivyrepository/libs/[artifact]/[artifact]-[revision].[ext]" />
    </filesystem>
  </resolvers>
</ivysettings>

Hope this helps those who are setting up their own private ivy repository.

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.