-- fixed version

git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@153 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
mindthegab
2009-03-20 21:45:30 +00:00
parent d4353ce423
commit 2f44aef70a

View File

@@ -17,6 +17,7 @@ package com.sourcesense.maven;
*/
import java.text.MessageFormat;
import java.util.regex.Pattern;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
@@ -49,9 +50,10 @@ public class NoSnapshotVersionMojo
public void execute()
throws MojoExecutionException
{
int indexOfDash = -1;
int indexOfDash = version.indexOf("-");
String noSnapshotVersion = version;
if((indexOfDash = version.indexOf("-SNAPSHOT")) != -1)
if(Pattern.matches("[a-zA-Z]", version))
{
noSnapshotVersion = version.substring(0, indexOfDash);
}