java - Ant -f<buildfile> 不工作但 -file<buildfile> 工作

标签 java ant

有没有其他人看到 ANT 拒绝遵守 -f 选项但愉快地使用 -file 选项。

ant -f cms.xml etc etc - gives the response: build.xml does not exist!

ant -file cms.xml etc etc - : works

这是带有 IBM JRE 1.6 的 ANT 1.8.1。当然,我第一次看到这样的行为。 -f 选项适用于一个目标,但不适用于另一个目标。每个目标都调用不同的自定义任务。

每个自定义任务中的属性设置是否可以打乱 -f 选项?

如果有任何想法,斯图尔特,我将不胜感激。

最佳答案

查看 source code ,我看不出这是怎么可能的,因为 -f-file 的处理方式完全相同。

else if (arg.equals("-buildfile") || arg.equals("-file")
       || arg.equals("-f")) {
     i = handleArgBuildFile(args, i);
} 

我鼓励您查看 source也是。

关于java - Ant -f<buildfile> 不工作但 -file<buildfile> 工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4132931/

相关文章:

java - 从对象创建实例的通用方法

java - 从文本文件中读取数据

java - 如何设置 JRadioButtons 的属性并将其应用于所有属性?

java - 以编程方式运行 ant : "Cannot use SUN rmic"

ant - apache ivy - ivysettings.xml 中有什么

java - 从字符串中提取自定义 HTML 属性

java - 为什么 count++ 在我的代码中不起作用?

在 Jenkins : unable to resolve target 中使用 ant 构建 Android

ant - 如何遍历 ant 属性并将其作为 arg 传递给 exec

java - H2 数据库 org.h2.Driver ClassNotFoundException