Class VersionMapper
java.lang.Object
org.apache.maven.ant.tasks.support.VersionMapper
- All Implemented Interfaces:
Comparator<String>,org.apache.tools.ant.util.FileNameMapper
public class VersionMapper
extends Object
implements org.apache.tools.ant.util.FileNameMapper, Comparator<String>
Ant filename mapper to remove version info from filename when copying dependencies.
- Author:
- Herve Boutemy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintString[]mapFileName(String sourceFileName) voidSet the versions identifiers that this mapper can remove from filenames.voidBy default, only filename is changed, but if this attribute is set toflatten, directory is removed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
VersionMapper
public VersionMapper()
-
-
Method Details
-
mapFileName
- Specified by:
mapFileNamein interfaceorg.apache.tools.ant.util.FileNameMapper
-
setFrom
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
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
- Specified by:
comparein interfaceComparator<String>
-