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.
-
Field Summary
Fields -
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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
versions
-
to
-
-
Constructor Details
-
VersionMapper
public VersionMapper()
-
-
Method Details
-
mapFileName
-
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
-
compare
- Specified by:
comparein interfaceComparator<String>
-