最近在为公司的老项目修改Ant脚本,发现build的时候报错了,我单独写了个demo演示:
build.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<project default = "echoProperties">
<propertyfile = "build.properties"></propertyfile>
<targetname = "echoProperties">
<echo>Apache Ant version is ${ant.version} - You are at ${sitename}</echo>
</targetname>
</project>
build.properties
sitename=www.test.com
buildVersion=3.3.2
尝试改为<propertyfile = "build.properties"/>也不行,文件编码都是UTF8,能否有大佬帮忙看看?按理说xml语法好像也没错啊
propertyfile
和targetname
都是 tag,不是attribute,不能= xxx