mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-08-07 17:49:34 +00:00
-- fixed version
git-svn-id: http://maven-alfresco-archetypes.googlecode.com/svn/trunk@153 04253f4f-3451-0410-a141-5562f1e59037
This commit is contained in:
@@ -17,6 +17,7 @@ package com.sourcesense.maven;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
@@ -49,9 +50,10 @@ public class NoSnapshotVersionMojo
|
|||||||
public void execute()
|
public void execute()
|
||||||
throws MojoExecutionException
|
throws MojoExecutionException
|
||||||
{
|
{
|
||||||
int indexOfDash = -1;
|
int indexOfDash = version.indexOf("-");
|
||||||
|
|
||||||
String noSnapshotVersion = version;
|
String noSnapshotVersion = version;
|
||||||
if((indexOfDash = version.indexOf("-SNAPSHOT")) != -1)
|
if(Pattern.matches("[a-zA-Z]", version))
|
||||||
{
|
{
|
||||||
noSnapshotVersion = version.substring(0, indexOfDash);
|
noSnapshotVersion = version.substring(0, indexOfDash);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user