Running ant from a batch file: Later commands don't run

前端 未结 2 1560
礼貌的吻别
礼貌的吻别 2021-01-01 10:36

I have a batch file that runs ant and then copies one of the files that were produced:

ant -Dproject.version=1.1.2 release published
copy /Y D:\\dir1\\MyJar.         


        
2条回答
  •  长发绾君心
    2021-01-01 11:18

    I had the same problem once and the magic call did it.

    In that batch file of yours try:

    call ant -Dproject.version=1.1.2 release published
    copy /Y D:\dir1\MyJar.jar   D:\dir2\MyJar.jar
    

    Cannot tell you why it worked, though. Guess it's Microsoft logic.

提交回复
热议问题