ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George McKinney" <geo...@tantalus.com>
Subject RE: wrapping long string literals
Date Thu, 23 May 2002 21:07:03 GMT

> -----Original Message-----
> I want to write something like this in Ant:
>
>     <property name="longdir" value="/base/rootdir/subdir1/
>             subdir2/subdir3/subdir4"/>
>
> which actually works, but produces a string with whitespace before
> "subdir2".
>
> Is there a way to break strings across lines (without
> introducing extra
> whitespace)?  We have a coding standard here of <=80 chr lines.

The brute force way would be

...
     <property name="pt1" value="/base/rootdir/subdir1/"/>
     <property name="pt2" value="subdir2/subdir3/subdir4"/>
     <property name="longdir" value="${pt1}${pt2}"/>
...

Although you might prefer a ${base} property that has the common root and
concatenate that with specific sub-paths whenever you need them.


George McKinney




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message