Archiva

Archivas relocation feature should be configurable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.0-alpha-1
  • Fix Version/s: 1.0
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Archiva automatically delivers the new pom and jar for a relocated artifact to a maven client.

The downside of this feature is that clients do not get a warning that the artifact is relocated anymore.

In a "All-Maven2" environment this warning is quite good, and gives the developer a hint and a motivation (get rid of the warning ) to use the new groupId.

So I think it would be a good idea to make this feature configurable, so the archiva admin can turn it off.

Activity

Hide
nicolas de loof added a comment -

Hello, I made the original contrib for the relocation feature.

Maven2 will request all POMs from archiva before requesting the artifacts, so it will handle relocations metadata itself and warn the user. Maven2 will then ask for the relocated artifact and archiva reloaction will not occur. Isn't this what you get/expect ?

Maven1 has no support for model4 POMs and will not download the POM neither read any relocation info, so it can't warn the user. The relocation from the archiva-side was designed for maven1 only, to avoid legacy/duplicated artifacts in a managed repo (my corporate repo had 5 "ejb.jar" under groupIds "ejb", "j2ee", "sun", "java.ejb" and "javax.ejb"). It should not occur when maven2 only is used.

Show
nicolas de loof added a comment - Hello, I made the original contrib for the relocation feature. Maven2 will request all POMs from archiva before requesting the artifacts, so it will handle relocations metadata itself and warn the user. Maven2 will then ask for the relocated artifact and archiva reloaction will not occur. Isn't this what you get/expect ? Maven1 has no support for model4 POMs and will not download the POM neither read any relocation info, so it can't warn the user. The relocation from the archiva-side was designed for maven1 only, to avoid legacy/duplicated artifacts in a managed repo (my corporate repo had 5 "ejb.jar" under groupIds "ejb", "j2ee", "sun", "java.ejb" and "javax.ejb"). It should not occur when maven2 only is used.
Hide
Chris Wewerka added a comment -

Hello Nicolas, thanks for your comment.

I think there is something broken then with your described behavior in archivas latest checkouts.

If I use an relocated artifact with our archiva, I do get the maven1 behavior although I'm using maven 2.

E.g. I request activation/activation/1.0.2 with my maven 2.0.4 client

I do not get the pom under activation/activation with the relocation info to javax.activation but the pom which resides under javax.activation in our archivas cache.

Looks like a bug to me.

Show
Chris Wewerka added a comment - Hello Nicolas, thanks for your comment. I think there is something broken then with your described behavior in archivas latest checkouts. If I use an relocated artifact with our archiva, I do get the maven1 behavior although I'm using maven 2. E.g. I request activation/activation/1.0.2 with my maven 2.0.4 client I do not get the pom under activation/activation with the relocation info to javax.activation but the pom which resides under javax.activation in our archivas cache. Looks like a bug to me.
Hide
nicolas de loof added a comment -

The latest archiva build doesn't handle relocation from the DAV api.
I've reopend MRM-153 and will investigate this one when solved.

Show
nicolas de loof added a comment - The latest archiva build doesn't handle relocation from the DAV api. I've reopend MRM-153 and will investigate this one when solved.
Hide
nicolas de loof added a comment -

Relocation is only applied to maven1 request and never on POM request. It will only occurs for maven1 that require archiva to handle it (or they will NOT get the artifact), and will never occur for maven2 that allways request the POM before the artifact.

Show
nicolas de loof added a comment - Relocation is only applied to maven1 request and never on POM request. It will only occurs for maven1 that require archiva to handle it (or they will NOT get the artifact), and will never occur for maven2 that allways request the POM before the artifact.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: