Summary: | name attribute of record task is not relative to basedir | ||
---|---|---|---|
Product: | Ant | Reporter: | Marius Scurtescu <marius.scurtescu> |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | leichen, marius.scurtescu |
Priority: | P3 | ||
Version: | 1.5 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
Marius Scurtescu
2003-03-07 17:55:12 UTC
You are correct, that name should resolve relative files as most other tasks do. Unfortunately if we change current behavior, we may break existing code, so we can't. What we could do, was implementing an additional attribute with the correct behavior. As a workaround, you can prepend ${basedir} to the value of your name attribute. *** Bug 23563 has been marked as a duplicate of this bug. *** I played a little bit with that. An additional file-attribute would help. But I have to search for a solution for getting the right name from the file. Scenario: <record file="logs/log.txt" action="start" /> <record name="logs/log.txt" action="stop" /> Both should use the same recorder. But file is a java.io.File and set by Ant with an absolute value (e.g. /home/test/logs/log.txt). So I have to get the relative part (/home/test = basedir). But the problem is: what if I set the file value to an absolute value by myself? <record file="/logs/antlogs/logs/log.txt" action="start" /> |