org.apache.maven.ant.tasks.support
Class VersionMapper

java.lang.Object
  extended by org.apache.maven.ant.tasks.support.VersionMapper
All Implemented Interfaces:
Comparator, org.apache.tools.ant.util.FileNameMapper

public class VersionMapper
extends Object
implements org.apache.tools.ant.util.FileNameMapper, Comparator

Ant filename mapper to remove version info from filename when copying dependencies.

Version:
$Id: VersionMapper.html 816173 2012-05-06 22:12:29Z hboutemy $
Author:
Herve Boutemy

Constructor Summary
VersionMapper()
           
 
Method Summary
 int compare(Object o1, Object o2)
           
 String[] mapFileName(String sourceFileName)
           
 void setFrom(String from)
          Set the versions identifiers that this mapper can remove from filenames.
 void setTo(String to)
          By default, only filename is changed, but if this attribute is set to flatten, 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
 

Constructor Detail

VersionMapper

public VersionMapper()
Method Detail

mapFileName

public String[] mapFileName(String sourceFileName)
Specified by:
mapFileName in interface org.apache.tools.ant.util.FileNameMapper

setFrom

public void setFrom(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 setting versionsId property value.

Specified by:
setFrom in interface org.apache.tools.ant.util.FileNameMapper

setTo

public void setTo(String to)
By default, only filename is changed, but if this attribute is set to flatten, directory is removed.

Specified by:
setTo in interface org.apache.tools.ant.util.FileNameMapper

compare

public int compare(Object o1,
                   Object o2)
Specified by:
compare in interface Comparator


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.