You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Fredrik Lindberg <fr...@gmail.com> on 2009/10/19 15:59:37 UTC

ivysettings.xml

Hi!

I am trying to setup an enterprise repository using ivy. My problem is how
to externalize ivysettings.xml from projects. I don't e.g. want there to be
any absolute paths in the build file to ivysettings.xml. This is something
that should be localy configured for each user/machine. A user might e.g.
chose to use a copy of the company repository when working offline and
accessing it via a URL normally. Also I have to take into account that some
users use unix/linux and others windows. There might e.g. differences in how
paths are managed.

I have thought about overriding the default ivysettings.xml and I have read
how to change the default settings, but it does not say how to make use of
them here(!):

http://ant.apache.org/ivy/history/latest-milestone/tutorial/defaultconf.html

I tried creating a new ivysettings.xml in my .ivy2 folder, but that does not
appear to work. I know that I could unpack the ivy.jar file and change the
default settings in there, but that cannot be the expected way? Also I can
use the configure or settings task in ant, but the problem then is that the
path has to be absolute (something that was not the case prior to ivy 2.1).
Is there any location that Ivy looks for an ivysettings.xml outside of the
ivy.jar by default that I can make use of, or is there e.g. an environment
variable I can set for forcing it to do so?

/ Fredrik (2009-10-19).

Re: ivysettings.xml

Posted by Niklas Matthies <ml...@nmhq.net>.
On Mon 2009-10-19 at 15:59h, Fredrik Lindberg wrote on ivy-user:
> Hi!
> 
> I am trying to setup an enterprise repository using ivy. My problem is how
> to externalize ivysettings.xml from projects. I don't e.g. want there to be
> any absolute paths in the build file to ivysettings.xml. This is something
> that should be localy configured for each user/machine. A user might e.g.
> chose to use a copy of the company repository when working offline and
> accessing it via a URL normally.

Define the path using an Ant property. The project can have a
build.properties file with some sensible default, and users could
override it in a local.build.properties file for example, or with an
Ant command line option (-D).

-- Niklas Matthies

Re: ivysettings.xml

Posted by Felix Dorner <fe...@web.de>.
Fredrik Lindberg wrote:
> I am trying to setup an enterprise repository using ivy. 
Hey, me too!

> My problem is how
> to externalize ivysettings.xml from projects. I don't e.g. want there to be
> any absolute paths in the build file to ivysettings.xml. This is something
> that should be localy configured for each user/machine. 
I thought I'd just use an ant property for this. Then everyone is 
responsible for defining the property according to his setup.
The src/examples/depender example does it like this too.

> A user might e.g.
> chose to use a copy of the company repository when working offline and
> accessing it via a URL normally. Also I have to take into account that some
> users use unix/linux and others windows. There might e.g. differences in how
> paths are managed.
>
> I have thought about overriding the default ivysettings.xml and I have read
> how to change the default settings, but it does not say how to make use of
> them here(!):
>
>   
Bummer. I thought exactly the same thing. It's unclear from the tutorial 
how to change the settings.
I guess you just do so by setting 'ivy.settings.dir' and place your own 
ivy-settings.xml there.

Have a look at the src/example/depender project, this was pretty easy to 
understand (well not all of it, but..)




RE: ivysettings.xml

Posted by Shawn Castrianni <Sh...@halliburton.com>.
I have chosen to make an ivysettings file for every release that my company does.  This makes sense to me since different releases could have different dependencies and settings requirements.  Anyway, when my ant build starts, it presents a list of these ivysettings files to the user and waits for them to select the one they want (they can set a variable beforehand to skip this prompt).  Then, internally to ANT, I execute ivy's configure task to load in the ivysettings file the user selected.

---
Shawn Castrianni


-----Original Message-----
From: Fredrik Lindberg [mailto:fredricus@gmail.com] 
Sent: Monday, October 19, 2009 9:00 AM
To: ivy-user@ant.apache.org
Subject: ivysettings.xml

Hi!

I am trying to setup an enterprise repository using ivy. My problem is how
to externalize ivysettings.xml from projects. I don't e.g. want there to be
any absolute paths in the build file to ivysettings.xml. This is something
that should be localy configured for each user/machine. A user might e.g.
chose to use a copy of the company repository when working offline and
accessing it via a URL normally. Also I have to take into account that some
users use unix/linux and others windows. There might e.g. differences in how
paths are managed.

I have thought about overriding the default ivysettings.xml and I have read
how to change the default settings, but it does not say how to make use of
them here(!):

http://ant.apache.org/ivy/history/latest-milestone/tutorial/defaultconf.html

I tried creating a new ivysettings.xml in my .ivy2 folder, but that does not
appear to work. I know that I could unpack the ivy.jar file and change the
default settings in there, but that cannot be the expected way? Also I can
use the configure or settings task in ant, but the problem then is that the
path has to be absolute (something that was not the case prior to ivy 2.1).
Is there any location that Ivy looks for an ivysettings.xml outside of the
ivy.jar by default that I can make use of, or is there e.g. an environment
variable I can set for forcing it to do so?

/ Fredrik (2009-10-19).

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.