I think even the minimal (a) would be a great thing (just proxy things
you don't know about), having it able to create them on the fly (or
maybe just 'prepare' them as you suggest ready for an admin to
'approve') would be a killer feature! Nexus sounds like it's shaping
up to be a great tool..

For discovery of the 'root', one way you could do it is examine pom
xml files seen in that repository, and compare their directory (so if
there's a pom xml file in
repo.org/something/com/woo/thingy/1.0/thingy-1.0.xml with a groupId of
com.woo, you could relatively easily determine that the root ought to
be repo.org/something.

What might be more interesting might be to come up with an (optional)
maven specification for metadata _about_ a repository, to be stored
_in_ the repository. One option might be to store, in the root or the
repository, repo.org/something/repository-metadata.xml; another might
be to have an artifact equivalent to the root
(repo.org/something/org/repo/repository-metadata.xml). (The latter
would have the advantage of being unique in the repository namespace,
so could be placed in any m2 repo).

This could store things like last-update, known mirrors and, most
usefully, a black/whitelist of artifacts that the repository stores
(e.g. so the apache.snapshots repo declares that it only has
org.apache.* artifacts in it). This would enable downstream
repositories to automatically configure themselves as a part of the
discovery..

On Tue, Mar 18, 2008 at 6:28 PM, Tamás Cservenák <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>  after Nigel words, i tried to play with Nexus and HTTP Proxying and
>  have tested some solutions with Nexus and HTTP Proxying.
>
>  It seems that it is feasible and easily done.
>
>  I set my m2 to use Nexus as HTTP Proxy, and made nexus to use the
>  incoming URL as basis to resolve the repo in question.
>
>  This way, i was able to do do the following:
>
>  i had a clean settings, without mirrorOf, lots of repo, etc. Only one
>  proxy elem with nexus in it. And build Nexus itself with running Nexus
>  as HTTP Proxy :)
>
>  Nexus was happy to do the thing. Also, some features I thought about:
>
>  I have the full URL from request, on which i can base some decisions:
>  Nexus can search it's own proxy reposes (matching the remote URL with
>  request URL), do a URL prefix match (reposes cannot be nested in each
>  another, hence repo roots should be unique) and simply serve requests
>  from those Nexus reposes, and if a repo is not found:
>
>  a) do a real HTTP proxy call reaching outer world (or better: create
>  proxied repo automatically and use it at once -- on the fly?)
>
>  b) simply block and return 404 (to simply prevent outer reach).
>
>  or c), prepare proxied repo automatically as new Proxied repo. But
>  return 404 to stop the build (it would timeout anyway if awaited too
>  long)
>
>  a), b) or c) could be some "policy" of Nexus.
>
>  There is an issue of "calculating" the repo root (the full url does
>  not says anything about repo root), but i think it is easily done, at
>  least by some alg that will work in 90% of cases, for a start :) And
>  this is a problem only when "automating" repo addition, like in case
>  a).
>
>  The b) and c) cases would probably make the build fail, but
>  _it_does_not_ replace real Build Discovery, since it would know only
>  about "touched"/needed reposes only. Repeating the build would may
>  introduce a new unknown repo.
>
>  WDYT?
>
>  ~t~
>
>
>
>  On Sun, Mar 16, 2008 at 7:39 PM, Nigel Magnay <[EMAIL PROTECTED]> wrote:
>  > I've never thought it was sane in the first place...
>  >
>  >  I don't understand why the artifact servers (archiva et al) can't just
>  >  respond in the same way that an ordinary proxy server does, without
>  >  all this mirrorOf mucking about. Working on two or three independant
>  >  projects and my settings.xml is a bloatfest of project-specific repo
>  >  names.
>  >
>
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to