<property file="Build.properties"/>
如果build.properties
文件位于project的根目录中,则此方法有效。现在,如果Build.properties文件位于src文件夹中,并且build.xml
位于root(主项目根目录)中,则访问该build.properties
的语法是什么?文件。
It can be done by giving in two ways
give the loction in classpath.
<property file="src/build.properties" />
Both of them worked for me.
You can define property at starting of your ant script. And use ${proj_home}*.properties to access your property file. Hope it helps.
Other answers are valid. Note that you can pass a property file as ant command line
ant -propertyfile src/build.properties
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.