File ant读取键值属性文件
我有如下属性文件(user.properties):File ant读取键值属性文件,file,ant,properties-file,File,Ant,Properties File,我有如下属性文件(user.properties): ip=10.161.16.755 names={"10.161.16.75":"v1"} adminPassword=admin sshUserName=r sshPassword=v vc.username=administrator@address.local 我想把vc.username和names读入一些变量,然后在ant中使用它们。 如何实现这一点?您可以在构建xml中包含属性文件 <property file="user.
ip=10.161.16.755
names={"10.161.16.75":"v1"}
adminPassword=admin
sshUserName=r
sshPassword=v
vc.username=administrator@address.local
我想把vc.username
和names
读入一些变量,然后在ant中使用它们。
如何实现这一点?您可以在
构建xml中包含属性文件
<property file="user.properties"/>
现在,您可以像使用变量一样使用属性文件中定义的所有键。例如:
${vc.username}
将为您提供administrator@address.local
希望这有帮助您可以在构建xml中包含属性文件
<property file="user.properties"/>
现在,您可以像使用变量一样使用属性文件中定义的所有键。例如:
${vc.username}
将为您提供administrator@address.local
希望这有帮助您也可以参考您也可以参考