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 TypeMethodDescriptionint
String[]
mapFileName
(String sourceFileName) void
Set the versions identifiers that this mapper can remove from filenames.void
By 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, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
versions
-
to
-
-
Constructor Details
-
VersionMapper
public VersionMapper()
-
-
Method Details
-
mapFileName
- Specified by:
mapFileName
in 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 settingversionsId
property value.- Specified by:
setFrom
in 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:
setTo
in interfaceorg.apache.tools.ant.util.FileNameMapper
- Parameters:
to
-to
-
compare
- Specified by:
compare
in interfaceComparator<String>
-