Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.2.1
-
Fix Version/s: 1.2.1
-
Component/s: Web Interface
-
Labels:None
-
Environment:Archiva 1.2.1-SNAPSHOT trunk r761865
-
Number of attachments :
Description
Archiva will not allow you to upload an artifact with a version number in the format 2.5-r123456-proj-1.2.3
We use this version number format to do internal releases of third-party artifacts.
Deploying from the command line works, but the artifact upload form in Archiva will not accept this version number and displays "Invalid version".
Issue Links
- relates to
-
MRM-964
Method isVersion() for validating an uploaded artifact version is open to criticism
-
Activity
Brett Porter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.2.1 [ 15108 ] |
Wendy Smoak
made changes -
| Environment | Archiva 1.2.1-SNAPSHOT trunk r761865 |
jan ancajas
made changes -
| Attachment | MRM-1172.patch [ 41616 ] |
jan ancajas
made changes -
| Attachment | MRM-1172-2.patch [ 41794 ] |
Maria Odea Ching
made changes -
| Assignee | Maria Odea Ching [ oching ] |
Maria Odea Ching
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
Justin Rennell
made changes -
From what I've traced this has something to do with the version algorithm implementation :
1. tokenize the string using "-" (dash) as the separator
2. checks if each token matches the regex pattern (see below)
3. the token ratio between "matching tokens" and "all tokens" must be 75% or more.
From the example it's only 50%.
We can loosen the rule a bit to return true if the first token is a matching token. thoughts on this ?
"([0-9][_.0-9a-z]*)", "(snapshot)", "(g?[_.0-9ab]*(pre|rc|g|m)[_.0-9]*)", "(dev[_.0-9]*)", "(alpha[_.0-9]*)", "(beta[_.0-9]*)", "(rc[_.0-9]*)", "(debug[_.0-9]*)", "(unofficial[_.0-9]*)", "(current)", "(latest)", "(fcs)", "(release[_.0-9]*)", "(nightly)", "(final)", "(incubating)", "(incubator)", "([ab][_.0-9]+)"