You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Carlos Sanchez <ca...@apache.org> on 2006/07/17 12:00:51 UTC

proximity vs maven-proxy

Hi,

I've hit a problem with maven-proxy and I'd like to know if any other
proxies, like proximity can solve it.

Let's say you proxy ibiblio and the apache snapshot repo, then there's
a conflict between maven-metadata files coming from both places, which
is a big problem for plugins, if the snapshot metadata wins, maven
will chose a snapshot plugin as latest instead of the latest released.

does proximity handle such use case?

-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: proximity vs maven-proxy

Posted by Tamás Cservenák <t....@gmail.com>.
Hi Carlos,

This issue is not handled directly in Proximity.

In Proximity, the order of scanned repos is defined by the order of
injecting them into Proximity bean:

<bean id="proximity"
  class="hu.ismicro.commons.proximity.base.ProximityImpl"
  init-method="initialize">
  <property name="indexer" ref="indexer" />
  <property name="statisticsGatherer" ref="stats" />
  <property name="accessManager" ref="openAccessManager" />

  <property name="repositories">
    <list>
	<!-- Repos'es will be processed in THIS ORDER! -->
	<ref local="inhouse" />
	<ref local="extFree" />
	<ref local="extNonFree" />
	<ref local="central" />
    </list>
  </property>

</bean>

So in this example, the artifact search order will be: inhouse, extFree,
extNonFree, central.

Generally speaking, i always recommend the following order:
local (inhouse, extFree, extNonFree) reposes, low latency for fastest
possible 404 response (file scan)
remote reposes (like central), possible high latency
other (like snapshot remote reposes), possible high latency

In your case with similar config (including some snapshot repo as last
repo), the "central" will ALWAYS win (if you are looking for the atifact on
tha same path from central and snapshot, listed after central), since
central will be always the first repo that can serve the metadata file.

There is a possibility (let's say Proximity-like) to address the given
repository by appending repositoryId=XXX as HTTP URL parameter. This method
can be seen on repository browsing interface. But i think this method is not
usable directly from M1 or M2. Example targeted URL:

http://intranet.is-micro.hu/proximity-maven2/repository/hu/ismicro/proximity/px-core/1.0.0-RC1/px-core-1.0.0-RC1.jar?repositoryId=inhouse
get me exactly groupId:hu.ismicro.proximity artifactId:px-core version:
1.0.0-RC1 from inhouse

http://intranet.is-micro.hu/proximity-maven2/repository/dwr/?repositoryId=extFree
list the groupId:dwr as found in repository extFree (there is DWR on central
too!)

These URLs will fetch/list from the targeted repos only (if exists), it will
not search all of the listed reposes.


~t~


On 7/17/06, Carlos Sanchez <ca...@apache.org> wrote:
>
> Hi,
>
> I've hit a problem with maven-proxy and I'd like to know if any other
> proxies, like proximity can solve it.
>
> Let's say you proxy ibiblio and the apache snapshot repo, then there's
> a conflict between maven-metadata files coming from both places, which
> is a big problem for plugins, if the snapshot metadata wins, maven
> will chose a snapshot plugin as latest instead of the latest released.
>
> does proximity handle such use case?
>
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: proximity vs maven-proxy

Posted by Tamás Cservenák <t....@gmail.com>.
Just to add some "appendix" to my previous letter, to make myself clearer:

1. Proximity serves by "love at first sight" (could not find better phrase)
- if the repo (scanned in proper order) can serve the requested URL, wins,
search stops
2. there is no "merge" operation defined at ARTIFACT level, thus you can
have your metadata from one or from other repo only, as it is contained in
repo itself.

~t~

On 7/17/06, Carlos Sanchez <ca...@apache.org> wrote:
>
> Hi,
>
> I've hit a problem with maven-proxy and I'd like to know if any other
> proxies, like proximity can solve it.
>
> Let's say you proxy ibiblio and the apache snapshot repo, then there's
> a conflict between maven-metadata files coming from both places, which
> is a big problem for plugins, if the snapshot metadata wins, maven
> will chose a snapshot plugin as latest instead of the latest released.
>
> does proximity handle such use case?
>
> --
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>