https://bz.apache.org/bugzilla/show_bug.cgi?id=70173
Bug ID: 70173
Summary: Record doesn't use the ${basedir} when adding the
"file" into the static Entry map
Product: Ant
Version: 1.10.17
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Core
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
In my scenario:
/main/build.xml (basedir=".")
<import file="/common/build.xml" />
<ant antfile="build.xml" dir="/sub1" inheritAll="false" inheritRefs="false"
/>
<ant antfile="build.xml" dir="/sub2" inheritAll="false" inheritRefs="false"
/>
/sub1/build.xml (basedir=".")
<import file="/common/build.xml" />
/sub2/build.xml (basedir=".")
<import file="/common/build.xml" />
/common/build.xml (basedir=".")
<record name="build.log" />
When running:
/main/build.xml
I only ever get:
/main/build.log
Record simply takes the "name" and uses that as the key into the static
"recorderEntries" map, and only ever creates one build.log. When I dump the
buildListeners, for main I can see (Recorder@1, RecorderEntry@2), and for a sub
I can see (Recorder@1, RecorderEntry@2, Recorder@3, RecorderEntry@4), so
keeping "recorderEntries" static I assume makes sense to avoid trying to write
to the same file if referenced from separate Record tasks. But, it seems like
a bug that Record doesn't resolve the full file path from the basedir and the
"name" attribute. If not considered a bug, a thorough doc note would be
helpful to future users.
At any rate, in case it helps anyone else, changing to this:
<record name="${basedir}/build.log" />
yielded the desired:
/main/build.log
/sub1/build.log
/sub2/build.log
--
You are receiving this mail because:
You are the assignee for the bug.