Archiva

Method isVersion() for validating an uploaded artifact version is open to criticism

Details

  • Type: Wish Wish
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Duplicate
  • Affects Version/s: 1.1.2
  • Fix Version/s: None
  • Component/s: Web Interface
  • Labels:
    None
  • Environment:
    Client: Windows XP SP3, Firefox 3.0.3
    Server: Linux Red Hat AS 4.0
  • Number of attachments :
    0

Description

When uploading an artifact, a validation is made against the 'version' field.
The validation occurs in file $SRC/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/VersionUtil.java.

I think such a validation algorithm can be discussed, as it does not let the user free to use its own versioning system. Actually, Maven itself does not seem to restrict the string pattern for the version of an artifact (even if the version ranging may not work), so why restricting it at Archiva level?
There are cases where you cannot comply with imposed validation method, and where the change of the version system is not permitted for various reasons. The result is you cannot install the artifact using Archiva.

Issue Links

Activity

Hide
Justin Rennell added a comment -

This is an issue for using archiva to create an internal copy of outside dependencies as well. For instance I am unable to upload an artifact with the version "beta1.SP1" which is the version of the artifact from another repo.

I would be in favor of removing version validation entirely, or perhaps making it a warning instead of an error. That way if a version fails validation, then the user is prompted to accept the version as-is, change it, or cancel the upload entirely.

Show
Justin Rennell added a comment - This is an issue for using archiva to create an internal copy of outside dependencies as well. For instance I am unable to upload an artifact with the version "beta1.SP1" which is the version of the artifact from another repo. I would be in favor of removing version validation entirely, or perhaps making it a warning instead of an error. That way if a version fails validation, then the user is prompted to accept the version as-is, change it, or cancel the upload entirely.
Hide
Justin Rennell added a comment -

This issue was fixed in 1.2.1, but I am still unable to upload an artifact with the form "beta1.SP1" in 1.2.2.

Show
Justin Rennell added a comment - This issue was fixed in 1.2.1, but I am still unable to upload an artifact with the form "beta1.SP1" in 1.2.2.
Hide
Brett Porter added a comment -

still the case in trunk

Show
Brett Porter added a comment - still the case in trunk

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: