Target overriding in Ant

后端 未结 1 1184
逝去的感伤
逝去的感伤 2021-02-13 00:21

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

So, when I call


     

        
1条回答
  •  我在风中等你
    2021-02-13 00:57

    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)
提交回复
热议问题