You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Joe D <jo...@gmail.com> on 2011/01/13 03:13:18 UTC

${link.separator} question?

Hi all,
    I'm trying to use <echo message> tags in a file to create a dynamic file
at build time (this solution is not optimal but we're working on changing it
shortly so need this for short term).   I can create a new file just fine,
but if i try to have a text file with multiple lines (ie. with line breaks),
this doesn't seem to work.  Instead, all my echo's appear on one line in the
new file with just a space between them.   Is there something wrong with the
"${line.separator}" variable?

Example:

<echo message="some text ${line.separator}" append="false" file="my_file" />
<echo message="more text ${line.separator}" append="true" file="my_file" />

I would expect a text file with:

*some text
more text
*
But instead i get:

*some text more text*

This is with maven 2.0.8.
Any ideas or help would be appreciated.   Thanks.

Re: ${link.separator} question?

Posted by Wayne Fay <wa...@gmail.com>.
> new file with just a space between them.   Is there something wrong with the
> "${line.separator}" variable?

To be clear... you're asking about using these <echo .../> statements
in the configuration body for a declaration of maven-antrun-plugin,
right? What version of m-antrun-p are you using? (You are including
the version of the plugin in your pom file, right??)

> This is with maven 2.0.8.
> Any ideas or help would be appreciated.   Thanks.

Upgrade to Maven 2.0.11 or 2.2.1 or even 3.0.2 which was just
released, and see if it works there. You're using a piece of software
that is over 3 years old -- lots of things are broken in odd ways in
those older Maven releases. (Avoid 2.1.x!)

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org