hudson.plugins.mavendeploymentlinker
Class VersionUtil

java.lang.Object
  extended by hudson.plugins.mavendeploymentlinker.VersionUtil

public class VersionUtil
extends Object

some utilities to handle maven version.

Author:
Dominik Bartholdi (imod)

Method Summary
static String stripeVersion(String name)
          Uses the default patterns to remove the version of the file name.
static String stripeVersion(String fileName, String stripPattern)
          Uses the given pattern to remove the version of the file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

stripeVersion

public static String stripeVersion(String fileName,
                                   String stripPattern)
Uses the given pattern to remove the version of the file name.

Parameters:
fileName - the name to remove the version from
stripPattern - a regex pattern used to remove the version. first group is used as the new file name and the last group is used as the file extension.
Returns:
the striped name, if the pattern does not match, the original name is returned

stripeVersion

public static String stripeVersion(String name)
Uses the default patterns to remove the version of the file name.

Parameters:
fileName - the name to remove the version from
Returns:
the striped name, if the pattern does not match, the original name is returned


Copyright © 2004-2013. All Rights Reserved.