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]

Reply via email to