ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George McKinney" <>
Subject RE: wrapping long string literals
Date Thu, 23 May 2002 21:49:27 GMT

> -----Original Message-----
> From: Mike Cepek []
> Having to write:
>    <property name="header1" value="&amp;copy; Copyright SMSI,
> 2000, "/>
>    <property name="header2" value="2001, 2002&lt;br>All Rights
> Reserved"/>
>    <property name="javadoc_header" value="${header1}${header2}"/>
> is amazingly unsatisfying.
> Other thoughts?

You can specify a file to read a bunch of properties from and that
properties file includes line continuation.

>From the javadoc of java.util.Properties.load (I'm assuming Ant is using the
Properties class)
"...if the last character on the line is \, then the next line is treated as
a continuation of the current line; the \ and line terminator are simply
discarded, and any leading whitespace characters on the continuation line
are also discarded and are not part of the element string. "

That might let you clean things up, though you'll have to keep the names as
defined in the properties file and as uses in the build file in sync.

George McKinney

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message