On Dec 13, 2007, at 12:58 AM, [EMAIL PROTECTED] wrote:
+12/13/07
+ LUCENE-1086: DocMakers setup for the "docs.dir" property
+ fixed to properly handle absolute paths. (Shai Erera via Doron
Cohen)
+
I haven't looked at the details of this beyond the commit messages
that went by, but if this is because of an Ant property that is
sending in a relative versus absolute path, you can ensure the path
is always absolute by using :
<property name="whatever.dir" file="relative/path"/>
instead of using the <property name="..." value="..."/> variant. If
the file="..." value is not already absolute, it'll make it absolute
based on the base directory.
(couldn't help myself) After a quick peek at the contrib/benchmark/
build.xml, this may be the culprit:
<property name="working.dir" value="work"/>
use file instead of value, and you can always assume the path is
absolute from that default, and mandate anyone overriding that
property specify an absolute path. And there are some other
properties (the ones pointing to JAR files, for example) that should
be using the file variant as well.
My rule is that all Ant properties that point to any file or
directory use the "file" variant of <property>.
And another candidate for refactoring in the benchmark build.xml is
this:
<arg line="${working.dir} ${basedir}/conf/micro-standard-
config.xml"/>
The relative path can be converted into an absolute path using two
<arg file="...."/> elements instead of one <arg line="..."/>. My
rule here is to avoid using "line", rather:
<arg file="${working.dir}"/>
<arg file="conf/micro-standard-config.xml"/>
No need to use ${basedir} for that second argument as that is
implicit in using <arg file="..."/> if the value is not already an
absolute path.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]