mirror of https://github.com/apache/maven.git
Test if project version is a snapshot
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@344173 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
62a19fa56e
commit
21f01fb81a
|
@ -58,6 +58,11 @@ public class ProjectVersionResolver
|
|||
//Rewrite project version
|
||||
String projectVersion = model.getVersion();
|
||||
|
||||
if ( !projectVersion.endsWith( SNAPSHOT_CLASSIFIER ) )
|
||||
{
|
||||
throw new IllegalArgumentException( "Project version isn't a snapshot, it must ends with '" + SNAPSHOT_CLASSIFIER + "'." );
|
||||
}
|
||||
|
||||
projectVersion = projectVersion.substring( 0, projectVersion.length() - SNAPSHOT_CLASSIFIER.length() );
|
||||
|
||||
if ( interactive )
|
||||
|
|
Loading…
Reference in New Issue