Can I make the Ant copy task OS-specific?

后端 未结 6 1689
醉梦人生
醉梦人生 2021-02-07 05:03

I have an Ant script that performs a copy operation using the \'copy\' task. It was written for Windows, and has a hardcoded C:\\ path as the \'todir\' argument. I see the \'exe

6条回答
  •  走了就别回头了
    2021-02-07 05:21

    Declare a variable that is the root folder of your operation. Prefix your folders with that variable, including in the copy task.

    Set the variable based on the OS using a conditional, or pass it as an argument to the Ant script.

提交回复
热议问题