You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Greg Thompson <th...@credentica.com> on 2007/06/25 17:44:11 UTC
CDATA in properties
In my javadoc-plugin configuration, I currently have something along the
lines of:
<bottom><![CDATA[somestuff © 2007 somestuff.]]></bottom>
For various reasons, I'd like to move the value into a property. So
I've added this to my pom's properties:
<jdBottom><![CDATA[somestuff © 2007 somestuff.]]></jdBottom>
and changed the javadoc-plugin configuration to:
<bottom>${jdBottom}</bottom>
while help:effective-pom says that the property has the proper value:
<jdBottom>somestuff &copy; 2007 somestuff.</jdBottom>
the expansion of the property is being parsed as XML, yielding this in
the javadoc-plugin configuration:
<bottom>somestuff © 2007 somestuff.</bottom>
This is most definitely NOT what I want. Of course, the first thing I
tried was to wrap the use of the property in the javadoc-plugin
configuration in another CDATA:
<bottom><![CDATA[${jdBottom}]]></bottom>
This has no effect.
Is there any way to do what I want here? Thanks.
--
-Greg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: CDATA in properties
Posted by Steven Rowe <sa...@syr.edu>.
Greg Thompson wrote:
> Steven Rowe wrote:
>> Have you tried to add one or more levels to the entity expansion?
>>
>> E.g., specify the following in your properties section:
>>
>> <jdBottom><![CDATA[somestuff &copy; 2007 somestuff.]]></jdBottom>
>>
>> Or equivalently:
>>
>> <jdBottom>somestuff &amp;copy; 2007 somestuff.</jdBottom>
>
> Thanks for the reply, Steven. The trouble with your suggestion is that
> I want the property's value to be precisely "somestuff &copy; 2007
> somestuff." since the same property is being used in another context.
How about composing the components:
<preamble>somestuff</jdBottomPreamble>
<postamble>2007 somestuff.</jdBottomPostamble>
<jdBottom>${preamble} &amp;copy ${postamble}</jdBottom>
<elsewhere>${preamble} &copy ${postamble}</elsewhere>
That way, you get a single place to set the components, and can use
<elsewhere> in another context.
Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: CDATA in properties
Posted by Greg Thompson <th...@credentica.com>.
Steven Rowe wrote:
> Have you tried to add one or more levels to the entity expansion?
>
> E.g., specify the following in your properties section:
>
> <jdBottom><![CDATA[somestuff &copy; 2007 somestuff.]]></jdBottom>
>
> Or equivalently:
>
> <jdBottom>somestuff &amp;copy; 2007 somestuff.</jdBottom>
Thanks for the reply, Steven. The trouble with your suggestion is that
I want the property's value to be precisely "somestuff &copy; 2007
somestuff." since the same property is being used in another context.
--
-Greg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: CDATA in properties
Posted by Steven Rowe <sa...@syr.edu>.
Hi Greg,
Greg Thompson wrote:
> In my javadoc-plugin configuration, I currently have something along the
> lines of:
>
> <bottom><![CDATA[somestuff © 2007 somestuff.]]></bottom>
>
> For various reasons, I'd like to move the value into a property. So
> I've added this to my pom's properties:
>
> <jdBottom><![CDATA[somestuff © 2007 somestuff.]]></jdBottom>
>
> and changed the javadoc-plugin configuration to:
>
> <bottom>${jdBottom}</bottom>
>
> while help:effective-pom says that the property has the proper value:
>
> <jdBottom>somestuff &copy; 2007 somestuff.</jdBottom>
>
> the expansion of the property is being parsed as XML, yielding this in
> the javadoc-plugin configuration:
>
> <bottom>somestuff © 2007 somestuff.</bottom>
>
> This is most definitely NOT what I want. Of course, the first thing I
> tried was to wrap the use of the property in the javadoc-plugin
> configuration in another CDATA:
>
> <bottom><![CDATA[${jdBottom}]]></bottom>
>
> This has no effect.
>
> Is there any way to do what I want here? Thanks.
Have you tried to add one or more levels to the entity expansion?
E.g., specify the following in your properties section:
<jdBottom><![CDATA[somestuff &copy; 2007 somestuff.]]></jdBottom>
Or equivalently:
<jdBottom>somestuff &amp;copy; 2007 somestuff.</jdBottom>
Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org