Target overriding in Ant

后端 未结 1 1325
感动是毒
感动是毒 2021-02-13 00:33

Is there a possibility to literally override a target or emulate this somehow?

So, when I call


     

        
1条回答
  •  醉话见心
    2021-02-13 01:04

    See the "Target overriding" section of the import task or the "Target rewriting" section of the include task. In short, give the common build.xml a project name like "common", and then use "common.release" in the antcall.

    I'll note that antcall isn't quite the same since it starts a new project at runtime, which means variables set by the target won't be visible later. I don't have Ant available on this machine to test, but you might try something like this to avoid the antcall:

    
    

    0 讨论(0)
提交回复
热议问题