ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49514] New: property task incorrectly sets properties when prefix is used
Date Mon, 28 Jun 2010 23:24:29 GMT

           Summary: property task incorrectly sets properties when prefix
                    is used
           Product: Ant
           Version: 1.8.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Core tasks

If using an <property file="" prefix=""> task, and a property was previously
defined that is also defined in the property file, the value created using the
prefix will be a copy of the previously defined property, rather than the value
from the file. A test case is as follows:

<?xml version="1.0"?>

<project name="bug-test" default="test" basedir=".">
  <target name="test">
    <property name="foo" value="bar"/>
    <echo file="" message="foo=baz"/>
    <property file="" prefix="old."/>
    <fail message="Incorrect value for got '${}', expected
      <condition><not><equals arg1="${}" arg2="baz"/></not></condition>

This test case succeeds with Ant 1.7.1, but fails with 1.8.0.

While a partial workaround exists (don't define properties in your file that
you'll import), this can pose problems when you attempt to load two different
versions of a property file for comparison.  This comparison is useful if
you're attempting to short-circuit an expensive action, based on metadata
stored in the property file.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message