ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Schrenk <oliver.schr...@gmail.com>
Subject Re: Problems resolving paths in copy's "tofile" when combining multiple properties
Date Wed, 03 Mar 2010 15:54:16 GMT
I solved my problem by using two properties, one for "file" and one for
"tofile"

I wonder though why the original approach works on Mac platform but not on
windows. There are different two behaviours:



1.MAC: multiple properties in "tofile" are first resolved, concatenated and
then converted to a path using basedir
2.WINDOWS: multiple properties in "tofile" are each converted to a path
against basedir, then concatenated and again converted to a path using
basedir

While I can understand the error, there has to be consistency along all
platforms. The more I think about it, the moreI think of it as a bug


2010/3/3 Antoine Levy Lambert <antoine@gmx.de>

> Oliver Schrenk wrote:
>
>>
>>
>> Here is an excerpt from the build file:
>>
>> <project name="Project" default="preview" basedir=".">
>>
>> <property name="build" location="build" />
>> <property name="classes" location="${build}/classes" />
>> <property name="properties-path"
>> location="/acme/servlet/messages.properties" />
>>
>> <!-- snip -->
>>
>> <target name="compile" depends="init" description="compile the source ">
>> <!-- Next line is line 86 -->
>> <copy file="${properties-path}" tofile="${classes}${properties-path}" />
>> <!-- snip -->
>> </target>
>>  <!-- snip -->
>> </project>
>>
>>
>>
>>
> ...
>
>  Is this a known issue, expected behavior or just bland misuse of
>> properties
>> on my part?
>>
>>
> change just this line
>
> <property name="properties-path"
> value="/acme/servlet/messages.properties" />
>
> when you use the <property location=""/> idiom, the property is converted
> to an absolute path. ${classes} is also an absolute path.
>
>
>  Best regards
>> Oliver Schrenk
>>
>>
>>
> Regards,
>
> Antoine
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message