【问题标题】:Ant: Are jarfile and destfile the same?Ant:jarfile 和 destfile 是一样的吗?
【发布时间】:2016-03-06 00:11:34
【问题描述】:

jar command 的 Ant 文档中,它说 destfile 属性是必需的。

但是底部有一个使用 jarfile 属性而不使用 destfile 属性的示例。另外,我有来自工作同事的功能代码,该代码在 Netbeans 项目的 build.xml 文件中使用 jarfile 属性。

所以似乎不需要destfile,或者可以用jarfile代替。 jarfile 和 destfile 是否相同? 是否存在应该使用一种情况而应该使用另一种情况的情况?

提前致谢

【问题讨论】:

    标签: ant jar


    【解决方案1】:

    是的,jarfiledestfile 的已弃用别名。

    jar 的实现是zip 实现的子类——earwar 也是如此。它们每个都有一个特殊的(zip|jar|war|ear)file 属性。在 Ant 1.5 中,我们决定将其统一为 destfile 并弃用特定于任务的属性。

    显然我们忘记更新手册中的所有参考资料 :-)

    【讨论】:

      猜你喜欢
      • 2017-04-26
      • 2010-11-15
      • 2021-07-15
      • 2019-06-02
      • 2014-10-23
      • 2018-06-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多