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: [email protected]
Reporter: [email protected]
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.