ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: auto download of antlibs
Date Wed, 09 May 2007 08:48:52 GMT
On 5/9/07, Steve Loughran <stevel@apache.org> wrote:
>
> Xavier Hanin wrote:
> > On 5/7/07, Stephen McConnell <mcconnell@dpml.net> wrote:
> >>
> >>
> >> > -----Original Message-----
> >> > From: Xavier Hanin [mailto:xavier.hanin@gmail.com]
> >> > Sent: Friday, 4 May 2007 5:56 PM
> >> > To: Ant Developers List
> >> > Subject: Re: auto download of antlibs
> >> >
> >> > On 5/4/07, Steve Loughran <stevel@apache.org> wrote:
> >> > >
> >> > > One thing I've been thinking of this week is how could we work with
> >> > > Ivy for automatic antlib download.
> >> > >
> >> > > No code right now, just some thoughts
> >> > >
> >> > >
> >> > > 1. add a -offline argument to say "we are offline". this will set
> >> > > a property, (and.build.offline) and the <offline> test will
> >> > > work. It is meant to tell things like Ivy that we are offline. At
> >> > > some point we could add some way for Ant to guess whether the net
> >> > > is there or not, if java integrates with the OS properly (there is
> >> > > an API call for this in J2ME, just not Java SE)
> >> >
> >> > This makes me think that we could improve how Ivy deal with
> >> > online/offline mode. Indeed for the moment Ivy doesn't really
> >> > know which repository requires a network access and which
> >> > doesn't. It would be nice if Ivy would know that, so that
> >> > even if offline mode you could still use alocal repository
> >> > (for antlib testing for instance).
> >>
> >> Are you describing a policy at the level of:
> >>
> >>   a) a multi-project build decision?
> >>   b) a specific target project build decision?
> >>   c) a repository access decision?
> >>   d) some or any of the above?
> > I'm describing how Ivy could be improved to better deal with a
> > situation where the user do not have network access. You can already
> > deal with that pretty efficiently in Ivy, but you have to define
> > several settings, to avoid using remote access when it's not
> > available. Having something easier for the user in this common
> > situation would be interesting.
>
> Maybe every repository in ivyconf.xml would be marked as offline,
> meaning they are available when there is no network.When you run ant (or
> ivy) with -offline, only offline repositories would be used.


What do you mean?  If all repositories are marked as offline, there is no
added value. We are currently reviewing our cache management, but for the
moment Ivy can already use the cache when you are offline. The problem is
that if you ask for a latest version of something, Ivy will try to connect
to the repository. For the moment this fails if the repository is not
available, but we are planning to make it possible to use cache only in this
case. But even with this improvement, trying to connect to a non available
repository may take time, so the idea of an offline mode would be to say:
"do not use this repository when offline, use only cache" for repositories
requiring a network connection, and for those which do not require this
connection (like a local repo), continue to use the repo and not only the
cache.

- xavier

---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message