where do you put ivysettings.xml?

荒凉一梦 提交于 2019-11-28 09:07:17

If you'll allow me to clarify, the ivysettings.xml is the configuration of your development environment as a whole. It is not related to the repository items themselves. Generally speaking, ivysettings.xml should sit alongside your main build.xml, so that when you put

<ivy:settings file="ivysettings.xml"/>

in your build.xml, it just finds it in the current directory.

This file is completely distinct from the ivy.xml files that describe the various modules in your repository. These sit alongside the published artifacts in the repo.

You can place your ivysettings.xml file anywhere you want and you simply reference it in your Ant script with:

<ivy:settings file="ivysettings.xml"/>

If you are developing several projects, you will notice that you typically use the same ivysettings.xml file everywhere and there's no point in copy/pasting this file manually.

What I do is define one ivysettings.xml file that is checked out by all my other projects using svn:externals.

Brett Rigby

I have had the same fun with this toady, and have found you can put the ivysettings.xml file anywhere you like, but you simply reference this location on the commandline when you come to use it. e.g. You can call Ivy from NAnt something like this:

<exec program="java" 
  commandline=" ... ...  
  -jar [location of .jar file] 
  -settings [location of ivysettings.xml file]
  ... ..." 
/> 

(where ... means something uninteresting has been removed to save space)

Reference:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!