0

I would ask about property ant.After some action I got property

<property name="prop" value="test"/>

in file build.properties .I have the property test

test=example

I want to get value from build.properties but when I use

<echo>${${prop}}</echo>

I got error Could somebody help me?How I can solve this problem?It's possible in general such way use property?

4

1 回答 1

0

假设您有一个包含以下内容的 build.properties 文件,这应该可以工作:

test=example

构建文件可能如下所示:

<project basedir="." default="default">
 <property file="build.properties"/>
 <property name="prop" value="test"/>

 <target name="default">
  <echo>${test}</echo>
  <echo>${prop}</echo>
 </target>
</project>
于 2012-04-13T08:36:43.723 回答