Hi all,

there is a build failure showing up in some Gump builds that seems to
indicate a backwards incompatible change inside Velocity - which may or
may not be intentional.

One example of the failure can be seen in the Cargo build
<http://vmgump.apache.org/gump/public/cargo/cargo/gump_work/build_cargo_cargo.html>.
I'll be happy to explain what Gump does, but the failure itself can be
understood without that background.

The doxia-site-renderer Maven module contains a Velocity template which
itself contains a line

        #set ( $documentHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" )

probably with the expectaation that \" would escape the quote.  This
seems to work with the version referenced by the module: 1.5.

If you try to parse the same template with the trunk of Velocity engine
you get

[ERROR] org.apache.velocity.exception.ParseErrorException: Encountered "1.0" at 
org/apache/maven/doxia/siterenderer/resources/default-site.vm[line 308, column 
51]
Was expecting one of:
    <RPAREN> ...
    <WHITESPACE> ...

which looks as if the " before 1.0 was terminating the string literal.

I can't find any hint in Velocity's documentation that would say you can
escape quotes in string literals, but if it worked in older versions you
are setting some sort of expectation 8-)

Is this a regression that can/will be fixed or is this something the
downstream users like doxia would need to adapt to?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to