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 2013/03/29 15:05:43 UTC

[Bug 54769] New: Properties are not set correctly when reading from a file with prefix.

https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

            Bug ID: 54769
           Summary: Properties are not set correctly when reading from a
                    file with prefix.
           Product: Ant
           Version: 1.8.3
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
          Assignee: notifications@ant.apache.org
          Reporter: nicolas.cenerario@gmail.com
    Classification: Unclassified

Created attachment 30119
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30119&action=edit
An archive containing testing files as long a a patch (which might be only
partial)

Inconsistency in property setting when using prefix.

1) create a property files containing properties that depends on each other
like, for example:
a=A
b=${a}

2) Try to set property from this file with a prefix:
<project default="test">
    <target name="test">
        <property name="test.a" value="test.a" />
        <property file="build.properties" prefix="test" prefixValues="false" />
        <echo>test.a = ${test.a}</echo>
        <echo>test.b = ${test.b}</echo>
    </target>
</project>


3) The values are not what they should be. Here, test.b should be equals to
${a}. Here is the obtained output:
test:
     [echo] test.a = test.a
     [echo] test.b = A

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

[Bug 54769] Properties are not set correctly when reading from a file with prefix.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |1.9.4

--- Comment #4 from Stefan Bodewig <bo...@apache.org> ---
First of all, Nicolas, I'm very sorry it took so long for anybody of the team
to respond.

You haven't done anything wrong, the only thing you could have done was nagging
us a more aggressive way.  Things tend to get forgotten when they pop up at a
point in time when you cannot deal with them right away.

Nested property expansion in property files has been a sore point for quite a
few releases, we have repeatedly broken it over the past few years as there are
too many ways to get it wrong.  Your approach of resolving one property after
the other won't work when prefixValues is true (or there is no prefix at all)
and the iterator isn't returning keys in the order needed - you may end up with
unexpanded properties because the property refered to in the value side hasn't
been iterated over, yet.

should be fixed by svn revision 1554614

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

[Bug 54769] Properties are not set correctly when reading from a file with prefix.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

Nicolas Cenerario <ni...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nicolas.cenerario@gmail.com

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

[Bug 54769] Properties are not set correctly when reading from a file with prefix.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

--- Comment #2 from Stefan Bodewig <bo...@apache.org> ---
(In reply to comment #1)
> OK, both testcases fail in Jenkins, I'll add an option to completely turn of
> zip64 extensions and make turn it on in <jar> by default.

sorry, this was meant to be a comment to bug 54762

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

[Bug 54769] Properties are not set correctly when reading from a file with prefix.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

Nicolas Cenerario <ni...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

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

[Bug 54769] Properties are not set correctly when reading from a file with prefix.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

Nicolas Cenerario <ni...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nicolas.cenerario@gmail.com
                 OS|                            |All

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

[Bug 54769] Properties are not set correctly when reading from a file with prefix.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

Nicolas Cenerario <ni...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|nicolas.cenerario@gmail.com |

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

[Bug 54769] Properties are not set correctly when reading from a file with prefix.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

--- Comment #3 from Nicolas Cenerario <ni...@gmail.com> ---
Created attachment 30135
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30135&action=edit
Patch for the bug 54769: Setting properties one after another when reading from
a file.

I just saw that the two first lines from the patch included in the zip file
should not be there.

I attach a new version of the patch.
I hope it helps: It is the first time I am participating to a open source
project and I am not sure how to do it.

Thank you.

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

[Bug 54769] Properties are not set correctly when reading from a file with prefix.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54769

--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
OK, both testcases fail in Jenkins, I'll add an option to completely turn of
zip64 extensions and make turn it on in <jar> by default.

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