【问题标题】:<copy> doesn't support nested "chainedmapper" error in Ant<copy> 不支持 Ant 中的嵌套“chainedmapper”错误
【发布时间】:2015-02-18 18:04:07
【问题描述】:

我有一个 Ant 任务,它应该复制一些文件并即时重命名它们。例如:

复制“file1-1.0.2”重命名为“file1”,复制“file-2.5.1”重命名为“file2”。

为此,我尝试使用 copy + fileset + chainedmapper + globmapper:

<copy todir="${version.dir}/WEB-INF/lib/" failonerror="false">
    <fileset dir="${version.dir}/WEB-INF/lib/" casesensitive="yes">
       <include name="file1-*.jar"/>
       <include name="file2-*."/>
       <include name="taxclient-v2-v2014-server-*.jar"/>
    </fileset>
    <chainedmapper>
       <globmapper from="file1-*.jar" to="file1.jar"/>
       <globmapper from="file2-*.jar" to="file2.jar"/>
    </chainedmapper>
</copy>

当 Ant 脚本运行时,我收到以下错误:

该类型不支持嵌套的“chainedmapper”元素

为什么会出现这个错误?

【问题讨论】:

  • “在我的机器上工作”。你用的是什么版本的蚂蚁? ant -version

标签: ant


【解决方案1】:

我使用的是旧版本的 ant (1.6)。 chainedmapper 类型仅在 Ant 1.7.0 之后可用。

Ant Mapper Type

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-10-27
    • 1970-01-01
    • 2012-05-13
    • 1970-01-01
    • 1970-01-01
    • 2018-11-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多