Re: Some Proximity usage questions

2006-08-08 Thread Tamás Cservenák

Hi Adrian,

take look into, it's there:
http://proximity.abstracthorizon.org/deploy/nightly/

Try it (NOT in production), it has a few extras, you will see.
The emergeGroups is implemented :)

~t~

On 8/7/06, Adrian Shum [EMAIL PROTECTED] wrote:


Thanks a lot Tomas.

May I clarify a bit?

for 1):
That means, whenever I know two repos are having chance
to contain same artifact, I should put them into two separate
group?

for 2):
I bet the new release will still enable us to access artifacts
thru http://hostname/px-webapp/repsitory/artifact-group/artifcact right?



Re: Some Proximity usage questions

2006-08-07 Thread Tamás Cservenák

Hi Adrian,

thanx for helping improve Proximity! Here are the answers:

1) the checksum failed problem is because the aggregation that Proximity
performs. It only happens if you have two or more reposes with same (or
similar) contents (like having central and apache.snapshots) in the same
repo group. IF Proximity finds two maven-metadata.xml on the SAME PATH, it
will MERGE THEM if the repositories are in the same group. This merging is
still unfinished', since new checksum for the merged metadata is NOT
calculated :(

2) this is perfectly sane thing to do. A new RC4 targeted feature will
enable Proximity to emerge the repo groups one level up, thus making
multiple Proximity instances unneeded. The new repo URL will be 
http://localhost:8080/px-webapp/repository/repogroup; instead of current 
http://localhost:8080/px-webapp/repository;.

3) Yes, DWR (direct web remoting) is included in RCx releases, but it is
unused and unconfigured. Since I don't speak JavaScript, it will be removed
eventually or some volunteer could set it up (and make the UI ajax capable)
:)


Please use forum on http://forum.abstracthorizon.org/ for support questions,
thanx.

Have fun,
~t~

On 8/7/06, Adrian Shum [EMAIL PROTECTED] wrote:


Dear all,

I am a newbie and just tried to use Proximity 1.0 RC3
on Windows + Tomcat 5.0.30.
There are some issues that I cannot figure out
and wish someone can give me a helping hand:

1) I have setted up several remote repositories in Proximity,
including central, ibiblio and codehaus ones.  I found that
sometimes I receive a CHECKSUM FAILED error in mvn, and
it will cause the artifacts failed to be downlaoded from
Proximity and mvn will eventually goes to central to download.

After some trial-and-errors, I found that whenever there
is such CHECKSUM FAILED error on client side,
I can see in stdout of TOMCAT displaying:
INFO: Item found in total of 2 repositories, will merge them.

Did I make something wrong which cause such problem?
The scenerio seems suggesting me to avoid having
repositories containing same artifacts but I think such
siutation should be very normal.

2) For snapshot and normal release repository, I think
maven handle differently, for which release artifiacts is
downloaded once and will not be downloaded again,
and artifats downloaded from snapshot repositories will
make maven check for updates.  So I have setted up
two Proximity, one for non-snapshot and one for snapshot.
In my settings.xml I put two corresponding repositories,
and I enabled snapshots in the latter one. Is it the right way
to do?

3) I found in tomcat's log a lot of exception caused by
Proximity, for as an example:

2006-08-07 16:03:57 StandardContext[/proximity]Servlet /proximity threw
load() exception
javax.servlet.ServletException: Servlet.init() for servlet dwr-invoker
threw exception
at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:1085)
... [deleted]
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
- Root Cause -
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(Unknown
Source)
... [deleted]
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)


Proximity seems still working fine.  Is these exception 'normal'?
I found Tomcat's log growing very fast because them.


Thanks a lot.


This email is confidential. If you are not the intended recipient, please
delete it from your system and notify the sender immediately. Any
unauthorized use, disclosure, dissemination or copying of this email is
prohibited. Tai Fook Securities Group, its group companies and their content
providers (Parties) shall not be responsible for the accuracy or
completeness of this email or its attachment, if any, which could contain
virus, be corrupted, destroyed, incomplete, intercepted, lost or arrive
late.   The Parites do not accept liability for any damage caused by this
email.





RE: Some Proximity usage questions

2006-08-07 Thread Adrian Shum
Thanks a lot Tomas.

May I clarify a bit?

for 1):
That means, whenever I know two repos are having chance
to contain same artifact, I should put them into two separate
group?

for 2):
I bet the new release will still enable us to access artifacts
thru http://hostname/px-webapp/repsitory/artifact-group/artifcact right?

Also, can I ask one related question on how Maven2 handle snapshot
artifacts? Which of the following is the correct way?
A) 
maven search thru repositories. If maven enountered a 'snapshot-
enabled' repo, it will retrieve snapshot artifacts.  Artifacts retrieved 
from 'snapshot-enabled' repo is assumed to be snapshot and will 
be checked for update in subsequent accesses; or

B)
maven search thru repositories. If maven enountered a 'snapshot-
enabled' repo, it will retrieve snapshot artifacts.  Repository or maven
can tell this specific artifact is a snapshot , and only snapshot
artifact from snapshot-enabled repo will be checked for update in
subsequent accesses

Which of the above case is correct?
I am just thinking on whether there are ways to eliminate multiple
repository proxies (no matter multiple Proximity instance or URL prefix)
to serve for release and snapshot.

Thanks a lot for your kind help

Adrian


-Original Message-
From: Tamas Cservenak [mailto:[EMAIL PROTECTED]
Sent: Monday, August 07, 2006 5:20 PM
To: Maven Users List
Subject: Re: Some Proximity usage questions


Hi Adrian,

thanx for helping improve Proximity! Here are the answers:

1) the checksum failed problem is because the aggregation that Proximity
performs. It only happens if you have two or more reposes with same (or
similar) contents (like having central and apache.snapshots) in the same
repo group. IF Proximity finds two maven-metadata.xml on the SAME PATH, it
will MERGE THEM if the repositories are in the same group. This merging is
still unfinished', since new checksum for the merged metadata is NOT
calculated :(

2) this is perfectly sane thing to do. A new RC4 targeted feature will
enable Proximity to emerge the repo groups one level up, thus making
multiple Proximity instances unneeded. The new repo URL will be 
http://localhost:8080/px-webapp/repository/repogroup; instead of current 
http://localhost:8080/px-webapp/repository;.

3) Yes, DWR (direct web remoting) is included in RCx releases, but it is
unused and unconfigured. Since I don't speak JavaScript, it will be removed
eventually or some volunteer could set it up (and make the UI ajax capable)
:)


Please use forum on http://forum.abstracthorizon.org/ for support questions,
thanx.

Have fun,
~t~

On 8/7/06, Adrian Shum [EMAIL PROTECTED] wrote:

 Dear all,

 I am a newbie and just tried to use Proximity 1.0 RC3
 on Windows + Tomcat 5.0.30.
 There are some issues that I cannot figure out
 and wish someone can give me a helping hand:

 1) I have setted up several remote repositories in Proximity,
 including central, ibiblio and codehaus ones.  I found that
 sometimes I receive a CHECKSUM FAILED error in mvn, and
 it will cause the artifacts failed to be downlaoded from
 Proximity and mvn will eventually goes to central to download.

 After some trial-and-errors, I found that whenever there
 is such CHECKSUM FAILED error on client side,
 I can see in stdout of TOMCAT displaying:
 INFO: Item found in total of 2 repositories, will merge them.

 Did I make something wrong which cause such problem?
 The scenerio seems suggesting me to avoid having
 repositories containing same artifacts but I think such
 siutation should be very normal.

 2) For snapshot and normal release repository, I think
 maven handle differently, for which release artifiacts is
 downloaded once and will not be downloaded again,
 and artifats downloaded from snapshot repositories will
 make maven check for updates.  So I have setted up
 two Proximity, one for non-snapshot and one for snapshot.
 In my settings.xml I put two corresponding repositories,
 and I enabled snapshots in the latter one. Is it the right way
 to do?

 3) I found in tomcat's log a lot of exception caused by
 Proximity, for as an example:

 2006-08-07 16:03:57 StandardContext[/proximity]Servlet /proximity threw
 load() exception
 javax.servlet.ServletException: Servlet.init() for servlet dwr-invoker
 threw exception
 at org.apache.catalina.core.StandardWrapper.loadServlet(
 StandardWrapper.java:1085)
 ... [deleted]
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
 - Root Cause -
 javax.xml.transform.TransformerFactoryConfigurationError: Provider
 org.apache.xalan.processor.TransformerFactoryImpl not found
 at javax.xml.transform.TransformerFactory.newInstance(Unknown
 Source)
 ... [deleted]
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)


 Proximity seems still working fine.  Is these exception 'normal'?
 I found Tomcat's log growing very fast because them

Re: Some Proximity usage questions

2006-08-07 Thread Tamás Cservenák

Hi Adrian,

clarification never hurts :)
Read below.

On 8/7/06, Adrian Shum [EMAIL PROTECTED] wrote:


for 1):
That means, whenever I know two repos are having chance
to contain same artifact, I should put them into two separate
group?



Not quite. Whenever you know that having one non-snapshot (eg. central)
and snapshot repo for previous (eg. apache.snapshots) that CONTAIN some
artifacts on the SAME path, you SHOULD put them in the same group. And wait
for Proximity to be fixed for merged metadata hash calculaction (Proximity
currently merges propely the metadata, but the hash that returns belongs to
one of the two merged metadatas - hence it is WRONG! It is a known bug.) :)

This situation stands only if you use edge (snapshot) and release Maven
artifacts (especially plugins) together. This is typical for Maven
developers, for a common user it is not a probable situation.

The rule: if two different proxied repo is in same group, their maven
metadata (IF found on the same path) WILL BE MERGED, otherwise spoofed
(the one that is first found will be returned hiding the second one). Both
cases (merging vs spoofing) can be useful in certain cases, but these
features can be DANGEROUS if the man does not know what are they doing.


So the answer: the best thing would be to

1.) place EVERY repo in separate group (eg. groupId = repoId),
2.) turn on (currently nonexistent!) proximity.emergeGroups feature (that
causes to publish every repo on separate URL since their groupIds are also
repoIds).

And leave to Maven to do what it should (merging metadatas taken from
different repos hosted/proxied on Proximity).

There have been a discussion about this on Maven Developers List.


for 2):

I bet the new release will still enable us to access artifacts
thru http://hostname/px-webapp/repsitory/artifact-group/artifcact right?




Yep. It would simply allow to publish every repo on different URL. Consider
this: you have 2-3 reposes configured, and ALL of their contents appears on
the same http://localhost:8080/px-webapp/repository.

Think about this (pseudocode :)) - for the sake of brewity, all reposes are
non-snapshots.

POM:

repoA : http://localhost:8080/px-webapp/repository
repoB : http://localhost:8080/px-webapp/repository
repoC : http://localhost:8080/px-webapp/repository

This means, that mvn cannot distinguish between artifacts originating
reposes (even if Proximity itself DOES, mvn will lack the info). If mvn
during execution needs a.jar, it starts to search it by iterating over
reposes. It requests a.jar from repoA. Proximity executes the request and
finds it in repoC and returns it. So, mvn is completely fooled by saying
that repoA contains a.jar while it is in repoC.

This is the reason why Proximity factory config comes with central only,
which should be 90% suffficient for common user.

The spoofing and grouping should be left to maven powerusers, the
default proximity config from RC4 will be (repoId = groupId  emergeGroups
= true).


Also, can I ask one related question on how Maven2 handle snapshot

artifacts? Which of the following is the correct way?
A)
maven search thru repositories. If maven enountered a 'snapshot-
enabled' repo, it will retrieve snapshot artifacts.  Artifacts retrieved
from 'snapshot-enabled' repo is assumed to be snapshot and will
be checked for update in subsequent accesses; or

B)
maven search thru repositories. If maven enountered a 'snapshot-
enabled' repo, it will retrieve snapshot artifacts.  Repository or maven
can tell this specific artifact is a snapshot , and only snapshot
artifact from snapshot-enabled repo will be checked for update in
subsequent accesses

Which of the above case is correct?
I am just thinking on whether there are ways to eliminate multiple
repository proxies (no matter multiple Proximity instance or URL prefix)
to serve for release and snapshot.



This question is a complicated one, I will pass on this, but i'm also
interested in clarified answer :)

AFAIK, repositories only grows, never shrinks. Once deployed artifact
(even a broken one) should be left in it forever. True, there are examples
of misbehaved repositories (especially snapshot reposes), but it is not a
typical case. But: maven should be configured to enable snapshots, otherwise
it will never touch them.

I _would_ vote B)


Have fun,
~t~