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/05/28 08:42:39 UTC

[Bug 57965] New: Multiple resources in the same union are collapsed if the source file is the same, even if the paths are different

https://bz.apache.org/bugzilla/show_bug.cgi?id=57965

            Bug ID: 57965
           Summary: Multiple resources in the same union are collapsed if
                    the source file is the same, even if the paths are
                    different
           Product: Ant
           Version: 1.9.4
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: trejkaz@trypticon.org

This is a real example which hit us in a build but I condensed it down to the
following:

    <?xml version="1.0"?>
    <project name="release" default="test">
        <target name="test">
            <mkdir dir="build"/>
            <copy todir="build">
                <union>
                    <fileset dir="src" includes="config/log4j.properties" />
                    <fileset dir="src/config" includes="log4j.properties"/>
                </union>
            </copy>
        </target>

        <target name="clean">
            <delete dir="build"/>
        </target>
    </project>

So the two resources have different paths:
    config/log4j.properties
    log4j.properties

But despite their paths being different, the second of these seems to be
deduplicated away by the <union>.

I looked at the code in Union and decided that it was probably using the
default equals() on FileResource, which does indeed only look at the full file
path. Perhaps that should be taking into account the base directory instead.

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

[Bug 57965] Multiple resources in the same union are collapsed if the source file is the same, even if the paths are different

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 OS|                            |All
         Resolution|---                         |FIXED
   Target Milestone|---                         |1.9.7

--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
thanks for the analysis.

fixed with git commit 592aa74

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