You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2015/11/18 09:26:14 UTC
[Bug 58622] New: In-file property expansion does not work with
prefix
https://bz.apache.org/bugzilla/show_bug.cgi?id=58622
Bug ID: 58622
Summary: In-file property expansion does not work with prefix
Product: Ant
Version: 1.9.6
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: Core tasks
Assignee: notifications@ant.apache.org
Reporter: maye@ihp-microelectronics.com
The in-file property expansion does not work when the <property file ...> or
<loadproperties ...> task is used with the preofix attribute as sketched in the
following sample files.
build.properties
==================
prop1=Hello World
prop2=${general.message}
prop3=${prop1}
build.xml
===========
<project name="bugrepro">
<target name="show">
<property name="general.message" value="Hi, everybody!"/>
<property file="build.properties" prefix="prfx" prefixValues="false"/>
<echo message="prfx.prop1=${prfx.prop1}"/>
<echo message="prfx.prop2=${prfx.prop2}"/>
<echo message="prfx.prop3=${prfx.prop3}"/>
</target>
</project>
The expected output, as given with Ant 1.8.4, is:
show:
[echo] prfx.prop1=Hello World
[echo] prfx.prop2=Hi, everybody!
[echo] prfx.prop3=Hello World
The actual output of Ant 1.9.6 is:
show:
[echo] prfx.prop1=Hello World
[echo] prfx.prop2=Hi, everybody!
[echo] prfx.prop3=${prop1}
When prefixValues is set to false, prop3 does not work, i.e., prop1 is not
expanded locally in the properties file. Also, prop3=${prfx.prop1} does not
help. Note that prop2 works fine.
When prefixValues is set to true, in-file expansion with prop3 works fine.
However, prop2 does not work as the general.message property defined outside
the properties file cannot be accessed, anymore.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 58622] In-file property expansion does not work with prefix
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58622
Justin <ju...@siemens.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
CC| |justin.graham@siemens.com
--
You are receiving this mail because:
You are the assignee for the bug.