如何在 Ant 中通过文件传递 (cli) 参数

发布于 2024-08-25 01:01:23 字数 246 浏览 4 评论 0原文

我正在使用 Ant 构建我的项目、生成文档并检查编码标准违规情况。我通过执行任务使用一些外部工具。 Exec 在输出行前添加 [exec] 前缀
这个字符串搞乱了我的输出。 如果我在命令行中指定 -e 开关,它会保持安静。

有没有办法

  • 在 build.xml 文件中的每次运行时指定 -e 开关?
  • 或其他等效的东西。

I'm using Ant to build my project, generate docs and check coding strandard violations. I use some external tool through exec task. Exec prefixes the output lines with [exec]
This string messes my output up.
If I specify the -e switch in the command line, it remains quiet.

Is there a way to

  • specify the -e switch on every run in the build.xml file?
  • or something else equivalent.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

攒一口袋星星 2024-09-01 01:01:23

也许 Java 系统属性会有所帮助...请参阅 http://ant.apache.org /manual/running.html#sysprops

特别是,我认为将属性 build.compiler.emacs 设置为 true 可能会有所帮助。无论如何,我怀疑在构建文件中设置(或者通过 ant-extensions 重新设置)它是否有帮助,因为属性被设计为不可变的。

Maybe the Java System Properties will help ... see http://ant.apache.org/manual/running.html#sysprops

In particular, I think that setting the property build.compiler.emacs to true may help. Anyway, I doubt that setting (or, re-setting it via ant-extensions) it in the build file helps, as properties are designed to be immutable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文