ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32582] - Conversion from upper case to lower case and vice versa
Date Wed, 08 Dec 2004 13:55:33 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32582>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32582





------- Additional Comments From peterreilly@apache.org  2004-12-08 14:55 -------
You could use a custom mapper, for example:
    <ae:scripttypedef name="custom.mapper" language="beanshell">
      import org.apache.tools.ant.types.DataType;
      import org.apache.tools.ant.util.FileNameMapper;
      import java.io.File;
      public class CustomMapper extends DataType implements FileNameMapper {
         public void setFrom(String from) {
             // DoNothing
         }
         public void setTo(String to) {
             // DoNothing
         }
         public String[] mapFileName(String sourceFileName) {
            String[] ret = new String[1];
            ret[0] = sourceFileName.toLowerCase() + ".java";
            return ret;
         }
      }
    </ae:scripttypedef>
    <pathconvert targetos="unix" property="converted">
      <path path="ABC:DEF:GHI"/>
      <mapper>
        <chainedmapper>
          <flattenmapper/>
          <custom.mapper/>
        </chainedmapper>
      </mapper>
    </pathconvert>
    <echo>${converted}</echo>


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message