ANT tutorial (Ant is a Java-based build tool)
1. Ant 的最小构成
build.xml
Congratulations!!! Your first ant program completed successfully!
1.尝试在屏幕上打印一些信息
我们在项目中用ant的时候经常会看到先会在屏幕上打印出很多信息。
tag:target
我们来做这个例子
运行一下ant.
build.xml
<?xml version="1.0" encoding="utf-8" ?>
<project>
</project>
在build.xml同一目录下,运行ant.
D:\ant>ant
Buildfile: build.xml
BUILD SUCCESSFUL
Total time: 0 seconds
Congratulations!!! Your first ant program completed successfully!
1.尝试在屏幕上打印一些信息
我们在项目中用ant的时候经常会看到先会在屏幕上打印出很多信息。
tag:target
我们来做这个例子
<?xml version="1.0" encoding="utf-8" ?>
<project default="help">
<target name="help">
<echo message=" ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、"/>
<echo message=" / )"/>
<echo message=" ( /"/>
<echo message=" ) でろでろ ("/>
<echo message=" / )"/>
<echo message=" ( /"/>
<echo message=" ⌒|/⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ"/>
</target>
</project>
运行一下ant.
D:\ant>ant
Buildfile: build.xml
help:
[echo] ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、
[echo] / )
[echo] ( /
[echo] ) でろでろ (
[echo] / )
[echo] ( /
[echo] ⌒|/⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ⌒ヽ、_ノ
BUILD SUCCESSFUL
Total time: 0 seconds
Comments
Post a Comment