0

有什么方法可以在不停止构建的情况下从 ant 启动 Windows Explorer?

这是我到目前为止所拥有的:

<project default="default">
 <target name="default">
  <fail unless="customerName">
   You need to set the customerName.
   -DcustomerName=Value
  </fail>
  <fail unless="htmlCode">
   You need to set the htmlCode.
   -DcustomerName=Value
  </fail>
  <exec executable="cmd">
   <arg value="-b">

  </exec>
  <exec executable="explorer">
   <arg value='"C:\working_copies\${customerName}\${htmlCode}"' />
  </exec>
  <exec executable="explorer">

不幸的是,上面的代码会为每个打开的窗口暂停,我没有同时获得两个资源管理器窗口。

4

1 回答 1

3

这应该有效:

<exec executable="cmd.exe"
      dir="C:\working_copies\${customerName}\${htmlCode}">
      <arg line="/c explorer ." />
</exec>
于 2010-03-05T00:07:00.537 回答