开发者

Execute an Ant script from other Ant script?

开发者 https://www.devze.com 2022-12-30 00:15 出处:网络
I have several Ant scripts, for example ant1.xml, ant2.xml, ant3.xml. And I want to execute ant1.xml and ant2.xml in ant3.xml, so that when I execute ant3.xml, ant1.xml and ant2.xml are execute开发者_

I have several Ant scripts, for example ant1.xml, ant2.xml, ant3.xml. And I want to execute ant1.xml and ant2.xml in ant3.xml, so that when I execute ant3.xml, ant1.xml and ant2.xml are execute开发者_开发技巧d.

Can anyone show me some ways, please?


Import ant1.xml and ant2.xml in ant3.xml by using an import or include command

<import file="ant1.xml"/>

Set the intended targets in ant1 and ant2 as a default - example below

<project default="compile-ant1">

<project default="compile-ant2">

This will run from within ant3 as required.

See here for more details: http://ant.apache.org/manual/Tasks/import.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号