Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows Maven如何在其他命令失败时执行另一个命令_Windows_Ant_Exec Maven Plugin - Fatal编程技术网

Windows Maven如何在其他命令失败时执行另一个命令

Windows Maven如何在其他命令失败时执行另一个命令,windows,ant,exec-maven-plugin,Windows,Ant,Exec Maven Plugin,我在maven遇到了这样的问题 ..... <tasks> <exec executable="subst" failonerror="false"> <arg line="f: c:\blabla"/> </exec> ////// here the execution I try to make! <exec executable="subst" failonerror="false" if=//b

我在maven遇到了这样的问题

.....
<tasks>
    <exec executable="subst" failonerror="false">
        <arg line="f: c:\blabla"/>
    </exec>
////// here the execution I try to make!
    <exec executable="subst" failonerror="false" if=//before execution fails!>
        <arg line="g: c:\blabla"/>
    </exec>
<tasks>
。。。。。
//////这就是我试图执行的死刑!
我无法想象在另一个命令失败的情况下如何运行一个命令


谢谢你的帮助

这些都是蚂蚁的任务。它只与Maven有关,因为您使用的是Antrun插件。你应该看看。特别是,您可能会对“resultproperty”属性感兴趣。这将让您捕获流程的退出代码,然后您可以根据它做出决策。

这些都是Ant任务。它只与Maven有关,因为您使用的是Antrun插件。你应该看看。特别是,您可能会对“resultproperty”属性感兴趣。这将让您捕获流程的退出代码,然后您可以根据它做出决策