Class VersionMapper
- java.lang.Object
-
- org.apache.maven.ant.tasks.support.VersionMapper
-
- All Implemented Interfaces:
java.util.Comparator<java.lang.String>,org.apache.tools.ant.util.FileNameMapper
public class VersionMapper extends java.lang.Object implements org.apache.tools.ant.util.FileNameMapper, java.util.Comparator<java.lang.String>Ant filename mapper to remove version info from filename when copying dependencies.- Version:
- $Id: VersionMapper.java 1645339 2014-12-13 17:56:59Z khmarbaise $
-
-
Constructor Summary
Constructors Constructor Description VersionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(java.lang.String s1, java.lang.String s2)java.lang.String[]mapFileName(java.lang.String sourceFileName)voidsetFrom(java.lang.String from)Set the versions identifiers that this mapper can remove from filenames.voidsetTo(java.lang.String to)By default, only filename is changed, but if this attribute is set toflatten, directory is removed.
-
-
-
Method Detail
-
mapFileName
public java.lang.String[] mapFileName(java.lang.String sourceFileName)
- Specified by:
mapFileNamein interfaceorg.apache.tools.ant.util.FileNameMapper
-
setFrom
public void setFrom(java.lang.String from)
Set the versions identifiers that this mapper can remove from filenames. The separator value used is path separator, as used by dependencies task when settingversionsIdproperty value.- Specified by:
setFromin interfaceorg.apache.tools.ant.util.FileNameMapper- Parameters:
from- The string from which we set.
-
setTo
public void setTo(java.lang.String to)
By default, only filename is changed, but if this attribute is set toflatten, directory is removed.- Specified by:
setToin interfaceorg.apache.tools.ant.util.FileNameMapper- Parameters:
to-to
-
compare
public int compare(java.lang.String s1, java.lang.String s2)- Specified by:
comparein interfacejava.util.Comparator<java.lang.String>
-
-