Ant构建系统的'build.xml'中的语法是什么 对应于Makefile(GNU Make)的以下内容:
target: dependency0 dependency1
shell command 1 # Not java, cc or the like
shell command 2
shell command 3
答案 0 :(得分:1)
$ ant
dependency0:
[echo] Hello world one
dependency1:
[echo] Hello world two
build:
[exec] command 1
[exec] command 2
[exec] command 3
<project name="demo" default="build">
<target name="dependency0">
<echo>Hello world one</echo>
</target>
<target name="dependency1">
<echo>Hello world two</echo>
</target>
<target name="build" depends="dependency0,dependency1">
<exec executable="echo">
<arg line="command 1"/>
</exec>
<exec executable="echo">
<arg line="command 2"/>
</exec>
<exec executable="echo">
<arg line="command 3"/>
</exec>
</target>
</project>