where do you put ivysettings.xml?
Asked Answered
P

3

18

I'm trying to learn how to use ivy and would like to setup a local repository of the .jar files I've downloaded.

Where do you put the ivysettings.xml file? Does it go in the ant library directory?

Pickings answered 28/7, 2009 at 16:57 Comment(0)
S
24

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.

Saladin answered 21/8, 2009 at 7:15 Comment(1)
And what if I have a share ivysettings.xml file retrieved from a server and I want to adjust some more settings (in other words add some stuff to the ivysettings.xml or simply load one more settings file and override the former one)?Saxecoburggotha
B
1

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.

Burns answered 11/8, 2009 at 6:45 Comment(1)
Sorry - bit lost by that... where do I save the ivysettings.xml file, and how do I reference that in terms of Ivy?Capri
C
0

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:

Capri answered 18/8, 2009 at 16:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.