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 Dave <da...@gmail.com> on 2008/09/11 17:59:46 UTC

Repository sync issue

I'm looking for a solution to the following issue if anyone can help.We're
using Ivy with 2 repos. One SHARED on a network drive and a LOCAL one for
each user stored under the ${user.home} directory.
At the moment, I'm successfully resolving modules from the shared
repository, and following the resolve, I use retrieve to place them in a
build directory where ant can find them.
However, I'd like to be able to publish the resolved dependencies to the
local repository, so that Ivy will find them there (Shared and Local are
used in a chain resolved) first in case the network share is unavailable.
I'm looking for something like
<ivy:publish resolver="local" resolveid="#last resolve#"
which would take all of the resolved dependencies for the current module and
publish them to the local repository.
Is there any way to do this without having to use an <ivy:publish> for each
dependency?

-- 
"A lot of people are afraid of heights. Not me, I'm afraid of widths."

Re: Repository sync issue

Posted by Dave <da...@gmail.com>.
Hey Paulo,I'm pretty new to Ivy to. I came up with the same solution as you
and it worked for me. Thanks for the suggestion though.
/Dave

On Mon, Sep 15, 2008 at 2:31 PM, Paulo Santos <pa...@gmail.com>wrote:

> Dave,
>
> I'm not sure if I understood what you meant. But if you want to publish the
> same file for the local and shared repo, you can call ivy:publish twice
> (each pointing for a repository) in your ant publish target. (Although, I'm
> not sure if it is the best solution, since I'm pretty new to ivy too!).
> When
> retrieving, the chain resolver will be the default, so just make sure that
> your shared repo comes first, and also use the returnFirst attribute at the
> resolver tag (chain),  so if the network is on, it will find the artifact
> in
> your shared repo, and break any further search, but if the network is down,
> it will try the local resolver.
>
> don't know if helped...
>
> Paulo
>
> On Thu, Sep 11, 2008 at 5:59 PM, Dave <da...@gmail.com> wrote:
>
> > I'm looking for a solution to the following issue if anyone can
> help.We're
> > using Ivy with 2 repos. One SHARED on a network drive and a LOCAL one for
> > each user stored under the ${user.home} directory.
> > At the moment, I'm successfully resolving modules from the shared
> > repository, and following the resolve, I use retrieve to place them in a
> > build directory where ant can find them.
> > However, I'd like to be able to publish the resolved dependencies to the
> > local repository, so that Ivy will find them there (Shared and Local are
> > used in a chain resolved) first in case the network share is unavailable.
> > I'm looking for something like
> > <ivy:publish resolver="local" resolveid="#last resolve#"
> > which would take all of the resolved dependencies for the current module
> > and
> > publish them to the local repository.
> > Is there any way to do this without having to use an <ivy:publish> for
> each
> > dependency?
> >
> > --
> > "A lot of people are afraid of heights. Not me, I'm afraid of widths."
> >
>



-- 
"A lot of people are afraid of heights. Not me, I'm afraid of widths."

Re: Repository sync issue

Posted by Paulo Santos <pa...@gmail.com>.
Dave,

I'm not sure if I understood what you meant. But if you want to publish the
same file for the local and shared repo, you can call ivy:publish twice
(each pointing for a repository) in your ant publish target. (Although, I'm
not sure if it is the best solution, since I'm pretty new to ivy too!). When
retrieving, the chain resolver will be the default, so just make sure that
your shared repo comes first, and also use the returnFirst attribute at the
resolver tag (chain),  so if the network is on, it will find the artifact in
your shared repo, and break any further search, but if the network is down,
it will try the local resolver.

don't know if helped...

Paulo

On Thu, Sep 11, 2008 at 5:59 PM, Dave <da...@gmail.com> wrote:

> I'm looking for a solution to the following issue if anyone can help.We're
> using Ivy with 2 repos. One SHARED on a network drive and a LOCAL one for
> each user stored under the ${user.home} directory.
> At the moment, I'm successfully resolving modules from the shared
> repository, and following the resolve, I use retrieve to place them in a
> build directory where ant can find them.
> However, I'd like to be able to publish the resolved dependencies to the
> local repository, so that Ivy will find them there (Shared and Local are
> used in a chain resolved) first in case the network share is unavailable.
> I'm looking for something like
> <ivy:publish resolver="local" resolveid="#last resolve#"
> which would take all of the resolved dependencies for the current module
> and
> publish them to the local repository.
> Is there any way to do this without having to use an <ivy:publish> for each
> dependency?
>
> --
> "A lot of people are afraid of heights. Not me, I'm afraid of widths."
>