Ant 调通最简单的例子

来源:互联网 发布:edg知恩妹子是谁 编辑:程序博客网 时间:2024/05/16 05:56

1.在E:\学习笔记\Ant,建立build.xml文件,内容:

<?xml version="1.0" encoding="gb2312" ?>
<project  name ="projectStudy"  default ="sayBaseDir"   >
        <target  name ="sayBaseDir">
               <echo  message ="The base dir is: ${basedir}"/>
        </target>
</project>

2.进入dos,cd到目录:E:\学习笔记\Ant下,运行ant sayBaseDir,输出成功

注意(<?xml version="1.0" encoding="gb2312" ?> 中,不能有空格,否则报异常

The processing instruction must begin with the name of the target)

原创粉丝点击