您如何在 Ant 中确定是否启用了详细信息?
How do you determine within Ant whether verbose is enabled?
在 ant build.xml 中,我想根据 ant 本身是否 运行 启用详细来影响子进程的详细标志。是否有变量集来确定这一点?或者,我能否以某种方式解析原始 Ant 命令行以检查 -v
是否已通过?
属性 sun.java.command
包含命令行选项
<project >
<echo message="${sun.java.command}" />
<condition property="verbose.is.set">
<contains string="${sun.java.command}" substring="-v" />
</condition>
<echo message="${verbose.is.set}" />
</project>
在 ant build.xml 中,我想根据 ant 本身是否 运行 启用详细来影响子进程的详细标志。是否有变量集来确定这一点?或者,我能否以某种方式解析原始 Ant 命令行以检查 -v
是否已通过?
属性 sun.java.command
包含命令行选项
<project >
<echo message="${sun.java.command}" />
<condition property="verbose.is.set">
<contains string="${sun.java.command}" substring="-v" />
</condition>
<echo message="${verbose.is.set}" />
</project>