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 Troy Self <ts...@bbn.com> on 2010/04/19 14:44:21 UTC

filesystem resolver for win/mac

Is there a path format that allows me to specify a filesystem URL that works
in Windows and MacOS?

If you put pattern="/mydirectory/ivyrepo" then Ivy complains that the path
must be absolute. The only way I've been able to do that in Windows is to
specify pattern="c:/mydirectory/ivyrepo", which then fails on a Mac.

Is there an Ivy property I can reference that is the root drive? I'd like to
use something similar to how ant lets you do this:

<property name="absolute-path" location="/" />

Putting "location=" tells Ant to substitute an absolute path. Can I do that
in the ivysettings.xml file somehow?

Thanks,

-- tBs


RE: filesystem resolver for win/mac

Posted by Troy Self <ts...@bbn.com>.
Thanks to all. I set a default value for root.drive in ivysettings.xml and
then override it in the build.xml using:

<property name="root.drive" location="/" />

This appears to be working.

-- tBs

> -----Original Message-----
> From: Jeff Evans (IT) [mailto:Jeffrey.Evans@morganstanley.com]
> Sent: Tuesday, April 20, 2010 8:26 PM
> To: ivy-user@ant.apache.org
> Subject: Re: filesystem resolver for win/mac
> 
> Yep.  In addition, you can give an Ivy property
> <http://ant.apache.org/ivy/history/2.1.0/settings/property.html> in
> the settings file with the same name ("repo.root" in this case) and
> value, but with override="false".  This makes the settings file useful
> even outside the context of Ant (within Eclipse/IvyDE, for example),
> but if a value is supplied by Ant, it will take precedence.
> 
> There is still a slight problem that the value is duplicated between
> the Ant world and Ivy world, but even this can be overcome if you set
> an environment variable giving the value of the repository root, and
> then set repo.root from both Ant and Ivy files based on this
> environment variable (their mechanisms for doing this are slightly
> different, but both work fine).
> 
> 
> On Tue, Apr 20, 2010 at 7:16 PM, Tim Brown <tp...@gmail.com> wrote:
> >
> > That's exactly what we do here.
> >
> > On Tue, Apr 20, 2010 at 2:23 PM, Maarten Coene
> <ma...@yahoo.com>wrote:
> >
> > > Maybe you can work with variables and specify your pattern as
> > > "${repo.root}/[organisation]/..." in your settings.xml?
> > > In you Ant build.xml, you can give the properrty "repo.root" an
> appropriate
> > > value.
> > >
> > > Maarten
> > >
> > >
> > >
> > >
> > > ----- Original Message ----
> > > From: Troy Self <ts...@bbn.com>
> > > To: ivy-user@ant.apache.org
> > > Sent: Mon, April 19, 2010 2:44:21 PM
> > > Subject: filesystem resolver for win/mac
> > >
> > > Is there a path format that allows me to specify a filesystem URL
> that
> > > works
> > > in Windows and MacOS?
> > >
> > > If you put pattern="/mydirectory/ivyrepo" then Ivy complains that
> the path
> > > must be absolute. The only way I've been able to do that in Windows
> is to
> > > specify pattern="c:/mydirectory/ivyrepo", which then fails on a
> Mac.
> > >
> > > Is there an Ivy property I can reference that is the root drive?
> I'd like
> > > to
> > > use something similar to how ant lets you do this:
> > >
> > > <property name="absolute-path" location="/" />
> > >
> > > Putting "location=" tells Ant to substitute an absolute path. Can I
> do that
> > > in the ivysettings.xml file somehow?
> > >
> > > Thanks,
> > >
> > > -- tBs
> > >
> > >
> > >
> > >


Re: filesystem resolver for win/mac

Posted by "Jeff Evans (IT)" <Je...@morganstanley.com>.
Yep.  In addition, you can give an Ivy property
<http://ant.apache.org/ivy/history/2.1.0/settings/property.html> in
the settings file with the same name ("repo.root" in this case) and
value, but with override="false".  This makes the settings file useful
even outside the context of Ant (within Eclipse/IvyDE, for example),
but if a value is supplied by Ant, it will take precedence.

There is still a slight problem that the value is duplicated between
the Ant world and Ivy world, but even this can be overcome if you set
an environment variable giving the value of the repository root, and
then set repo.root from both Ant and Ivy files based on this
environment variable (their mechanisms for doing this are slightly
different, but both work fine).


On Tue, Apr 20, 2010 at 7:16 PM, Tim Brown <tp...@gmail.com> wrote:
>
> That's exactly what we do here.
>
> On Tue, Apr 20, 2010 at 2:23 PM, Maarten Coene <ma...@yahoo.com>wrote:
>
> > Maybe you can work with variables and specify your pattern as
> > "${repo.root}/[organisation]/..." in your settings.xml?
> > In you Ant build.xml, you can give the properrty "repo.root" an appropriate
> > value.
> >
> > Maarten
> >
> >
> >
> >
> > ----- Original Message ----
> > From: Troy Self <ts...@bbn.com>
> > To: ivy-user@ant.apache.org
> > Sent: Mon, April 19, 2010 2:44:21 PM
> > Subject: filesystem resolver for win/mac
> >
> > Is there a path format that allows me to specify a filesystem URL that
> > works
> > in Windows and MacOS?
> >
> > If you put pattern="/mydirectory/ivyrepo" then Ivy complains that the path
> > must be absolute. The only way I've been able to do that in Windows is to
> > specify pattern="c:/mydirectory/ivyrepo", which then fails on a Mac.
> >
> > Is there an Ivy property I can reference that is the root drive? I'd like
> > to
> > use something similar to how ant lets you do this:
> >
> > <property name="absolute-path" location="/" />
> >
> > Putting "location=" tells Ant to substitute an absolute path. Can I do that
> > in the ivysettings.xml file somehow?
> >
> > Thanks,
> >
> > -- tBs
> >
> >
> >
> >

Re: filesystem resolver for win/mac

Posted by Tim Brown <tp...@gmail.com>.
That's exactly what we do here.

On Tue, Apr 20, 2010 at 2:23 PM, Maarten Coene <ma...@yahoo.com>wrote:

> Maybe you can work with variables and specify your pattern as
> "${repo.root}/[organisation]/..." in your settings.xml?
> In you Ant build.xml, you can give the properrty "repo.root" an appropriate
> value.
>
> Maarten
>
>
>
>
> ----- Original Message ----
> From: Troy Self <ts...@bbn.com>
> To: ivy-user@ant.apache.org
> Sent: Mon, April 19, 2010 2:44:21 PM
> Subject: filesystem resolver for win/mac
>
> Is there a path format that allows me to specify a filesystem URL that
> works
> in Windows and MacOS?
>
> If you put pattern="/mydirectory/ivyrepo" then Ivy complains that the path
> must be absolute. The only way I've been able to do that in Windows is to
> specify pattern="c:/mydirectory/ivyrepo", which then fails on a Mac.
>
> Is there an Ivy property I can reference that is the root drive? I'd like
> to
> use something similar to how ant lets you do this:
>
> <property name="absolute-path" location="/" />
>
> Putting "location=" tells Ant to substitute an absolute path. Can I do that
> in the ivysettings.xml file somehow?
>
> Thanks,
>
> -- tBs
>
>
>
>

Re: filesystem resolver for win/mac

Posted by Maarten Coene <ma...@yahoo.com>.
Maybe you can work with variables and specify your pattern as "${repo.root}/[organisation]/..." in your settings.xml?
In you Ant build.xml, you can give the properrty "repo.root" an appropriate value.

Maarten




----- Original Message ----
From: Troy Self <ts...@bbn.com>
To: ivy-user@ant.apache.org
Sent: Mon, April 19, 2010 2:44:21 PM
Subject: filesystem resolver for win/mac

Is there a path format that allows me to specify a filesystem URL that works
in Windows and MacOS?

If you put pattern="/mydirectory/ivyrepo" then Ivy complains that the path
must be absolute. The only way I've been able to do that in Windows is to
specify pattern="c:/mydirectory/ivyrepo", which then fails on a Mac.

Is there an Ivy property I can reference that is the root drive? I'd like to
use something similar to how ant lets you do this:

<property name="absolute-path" location="/" />

Putting "location=" tells Ant to substitute an absolute path. Can I do that
in the ivysettings.xml file somehow?

Thanks,

-- tBs