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/04/03 17:56:43 UTC

[Bug 54797] New: Property redefinition should cause an error

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

            Bug ID: 54797
           Summary: Property redefinition should cause an error
           Product: Ant
           Version: 1.8.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: dtn-asfbugs@corefiling.co.uk
    Classification: Unclassified

Created attachment 30143
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30143&action=edit
Example build file to reproduce the issue

Property redefinition should cause an error.

See attached build file.

When I run it:

$ ant                                                       (03/04 16:52)
Buildfile: /home/david/tmp/build.xml

build:
     [echo] value

BUILD SUCCESSFUL
Total time: 0 seconds

Ideally the build would fail because I've illegally attempted to re-define a
property. A more likely scenario for this sort of thing is the use of a
property inside a macro or a target which is called twice, where the <local>
element needs to be used to avoid fixing permanently to the initial value.

Running ant in verbose mode does print 'Override ignored for property "p1"',
but I think this deserves to be an error - or at the very least a visible
warning in normal mode.

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

[Bug 54797] Property redefinition should cause an error

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

Antoine Levy-Lambert <an...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #1 from Antoine Levy-Lambert <an...@apache.org> ---
the default behavior of Ant concerning properties might not be what you expect
but it has been around for a long time and the consensus among Ant's developers
is to maintain compatibility between versions.

Maybe a custom propertyhelper could implement the behavior that you are after.

See http://ant.apache.org/manual/properties.html.

Closing this bug report as WONT'FIX and feel free to reopen it if you feel this
is not appropriate. You can discuss Ant usage questions on the user list user
at ant dot apache dot org.

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