开发者

Apache Ivy Best Practices

Hi I'm reading up on Ivy for the first time and had a few quick questions:

  1. Need confirmation: the IvyDE plugin is used to configure just the ivyconf.xml file for all workspace projects, correct?
  2. Where does this ivyconf.xml live? I'm running Windows 7 and can't find this hidden .ivy directory anywhere!
  3. Where do you usually place a project's ivy.xml and other xml config files?

Thanks for any 开发者_开发技巧nudges in the right direction!


  1. IvyDE allow you to resolve dependencies per project. You could use separate ivyconf.xml in different projects.
  2. You could place ivyconf.xml (or ivysettings.xml) where you want. You could use one per project (as I do) or one for all projects (as I did before).
  3. Usually I put ivy.xml beside Ant's build.xml in the root of my project. But ivysettings.xml I put in project/etc/ivysettings/ directory.


My team uses a separate build project in Eclipse that stores the ivysettings.xml file. The IvyDE plugin provides the Ivy dependency container that the Java projects can use. IvyDE can optionally allow inter-project dependency resolution, but this is off by default.

I'd suggest changing the order of classpath entries in the Ivy Classpath configuration to lexical, otherwise it shows dependencies in the order of the ivy.xml file.

Each project should have their own ivy.xml file - we also follow the same pattern as Alexey uses of using the project's top-level directory.

I've never used an ivyconf.xml file - a quick google suggests this is an alternative (older, deprecated?) name for the ivysettings.xml file.

You will need to write your own ivysettings.xml file to tell IvyDE where your repositories are and which resolvers to use. Leave a comment if you're interested in an example ivysettings.xml file.

Which repositories are you using? Maven Central? Setting up your own repository with Nexus, Artifactory or just using the file system?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜