Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.0
-
Fix Version/s: 1.1
-
Component/s: None
-
Labels:None
-
Environment:windows, maven2
-
Testcase included:yes
-
Number of attachments :
Description
After deploying an artifact with version trunk-SNAPSHOT with unique version set to true, I am not able to download the artifact anymore. The reason is the org.apache.maven.archiva.repository.content.DefaultPathParser throwing a LayoutException "filename format is invalid, expected timestamp format in filename".
The problem is the determination of an unique snapshot in the given file path using the FilenameParser.nextVersion method that uses VersionUtil.isVersion to determine if the parsed section of a given filename is part of a version or not.
The VersionUtil uses a VersionMegaPattern to identify version parts in a string, this does not work on any possible version name.
A quick solution for me was to patch the VersionUtil and add 'trunk' to the VersionMegaPattern, but a more stable solution should use the already identified baseVersion (trunk-SNAPSHOT in this case) to determine the version and timestamp parts in a given or to skip path validity checks.
I added an additional unit test snippet for org.apache.maven.archiva.repository.content.DefaultPathParserTest to reproduce the problem
Hmm, the test case is not failing for me. Could you verify this in trunk (1.1-SNAPSHOT) too?
Thanks!