Details
-
Type:
Bug
-
Status:
Reopened
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 3.0
-
Fix Version/s: None
-
Component/s: Deployment
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
When using a version that ends with ".SNAPSHOT" instead of the usual "-SNAPSHOT", Maven 3.0 changes the project version to the timestamped version. So "5.2.0.SNAPSHOT" becomes something like "5.2.0.20101109.215833-1". A Nexus snapshot repository will reject this deployment because the version in the directory name does not end with "SNAPSHOT".
I tested that this works in Maven 2.2.1 and Maven 3.0-beta-1, but does not work in Maven 3.0. The build returns an HTTP 400 error when deploying to Nexus.
Error from Nexus log
2010-11-09 22:02:23 INFO [1298122354-2147] - o.s.n.p.m.m.M2Repos~ - Storing of item snapshots:/org/drools /drools/5.2.0.20101110.030222-361/drools-5.2.0.20101110.030222-361.pom is forbidden by Maven Repository policy. Because snapshots is a SNAPSHOT repository 2010-11-09 22:02:23 ERROR [1298122354-2147] - o.s.n.r.ContentPlex~ - Got exception during processing request "PUT http://repository.jboss.org/nexus/content/repositories/snapshots/org/drools/drools /5.2.0.20101110.030222-361/drools-5.2.0.20101110.030222-361.pom": Storing of item snapshots:/org/drools /drools/5.2.0.20101110.030222-361/drools-5.2.0.20101110.030222-361.pom is forbidden by Maven Repository policy. Because snapshots is a SNAPSHOT repository
Issue Links
- relates to
-
MNG-4957
Emit validation warning when project version uses irregular SNAPSHOT version string
-
This is caused by an inconsistency in snapshot detection. Maven [2.0, 3.0] consider "5.2.0-20101110.030222-361" a snapshot version but not "5.2.0.20101110.030222-361" whereas the corresponding base forms "5.2.0-SNAPSHOT" and "5.2.0.SNAPSHOT" are both considered snapshot versions. I.e. if one tried to resolve the timestamped snapshot 5.2.0.20101110.030222-361 as a dependency, it would fail as well.