Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.3
-
Fix Version/s: 1.3.1
-
Component/s: Web Interface
-
Labels:None
-
Environment:all
-
Patch Submitted:Yes
-
Number of attachments :
Description
If i upload a Snapshot to archiva it shows up as Version 0.0.1-20100127.073805-1 and the Version of the 0.0.1-SNAPSHOT Artifact is also 0.0.1-20100127.073805-1. So if i download the jar from the orange box, i get the version 0.0.1-20100127.073805-1. Now i upload a later snapshot version to archiva: 0.0.1-20100127.074443-3. The Version shows up in the list of snapshots in archiva (other versions), but the Version is still set to 0.0.1-20100127.073805-1. So if i download the jar from the orange box it is still version 0.0.1-20100127.073805-1 and not the latest version. maven-metadata.xml is correct and builds get the latest version, but archiva-gui shows up the first uploaded snapshot. In Archiva 1.2.2 this was working correct. If the oldest snapshot gets purged, archiva uses the oldest still available version to show up as xxx-SNAPSHOT. Maybe some kind of sorting was changed?
Well i took a look at the source and I found a solution:
in DefaultRepositoryBrowsing.java (archiva-database) in method handleGenericSnapshots (Line 346) the Collection gets reversed:
Collections.reverse( versions );
If i comment out this Line, Archiva offers me the latest Version for my SNAPHSOT. Here is an Example:
BEFORE:
Version 7.3.1-20100201.230219-35
Other Versions 7.3.1-20100201.230219-35 7.3.1-20100202.134434-36 7.3.1-20100202.134921-37
AFTER:
Version 7.3.1-20100202.134921-37
Other Versions 7.3.1-20100201.230219-35 7.3.1-20100202.134434-36 7.3.1-20100202.134921-37
So maybe some kind of sorting was changed somewhere?