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 2026/08/06 18:11:07 UTC
[Bug 70173] New: Record doesn't use the ${basedir} when adding the "file" into the static Entry map
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: notifications@ant.apache.org
Reporter: robert.flaherty@oracle.com
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.
[Bug 70173] Record doesn't use the ${basedir} when adding the "name" into the static Entry map
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=70173
Robert Flaherty <ro...@oracle.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Record doesn't use the |Record doesn't use the
|${basedir} when adding the |${basedir} when adding the
|"file" into the static |"name" into the static
|Entry map |Entry map
OS| |All
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 70173] Record doesn't use the ${basedir} when adding the "name" into the static Entry map
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=70173
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
Oh, don't worry, there are way too many issues that have accumulated over >26
years by now. So I'll close this one. :-)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 70173] Record doesn't use the ${basedir} when adding the "name" into the static Entry map
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=70173
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |1.10.18
--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
in 1.10.18 a new "relativeToBasedir" attribute has been added by
https://github.com/apache/ant/commit/580e0e15efa15176526ab0bb21544efcfd13768c
This keeps the existing logic for current builds and should allow the behavior
you intend.
see also https://bz.apache.org/bugzilla/show_bug.cgi?id=17781
As part of the commit the manual has been adapted, do you think this is
sufficient?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 70173] Record doesn't use the ${basedir} when adding the "name" into the static Entry map
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=70173
--- Comment #2 from Robert Flaherty <ro...@oracle.com> ---
Good enough, at least the attribute will be front and center. It took me
forever to figure out what was going on since my <copy> did take basedir into
account. It wasn't until I dropped the logging to "debug" that I saw the one
log message in record, when it creates the recorder. Sorry I didn't see those
other bugs; wow, 23 years ago, and you! Time to pass the torch! Might be time
for a 2.x release where you can break, cleanup/normalize naming, etc.
--
You are receiving this mail because:
You are the assignee for the bug.