[ 
https://issues.apache.org/jira/browse/MNG-3558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939602#comment-17939602
 ] 

Guillaume Nodet commented on MNG-3558:
--------------------------------------

This is actually doable in Maven 4.
For model properties, the syntax is the following
{code:xml}
<properties>
    <tmp-prop>$\{my-prop\}</tmp-prop>
</properties>
{code}
For the antrun plugin configuration, one needs to escape for ant in addition to 
escape for Maven, so:
{code:xml}
               <echo>How to print my property placeholder #5 (working): 
$$\{my-prop\}</echo>
{code}

Starting from Maven 4.0.0-beta-5, the output is the following:
{code}
[WARNING]      [echo] How to print my property placeholder #5 (working): 
${my-prop}
{code}

> Add a property substitution escaping mechanism
> ----------------------------------------------
>
>                 Key: MNG-3558
>                 URL: https://issues.apache.org/jira/browse/MNG-3558
>             Project: Maven
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 2.0.9, 3.1.1
>            Reporter: Christophe DENEUX
>            Priority: Minor
>             Fix For: 4.0.0
>
>
> Hi,
> Developping a maven plugin, it is possible to initialize plugin parameters to 
> "$\{artifactId}-$\{version}" without property substitution, using:
> {{@parameter expression="$$\{artifactId}-$$\{version}.$$\{extension}"}}
> at the parameter declaration.
> But, in a POM file, it seems to me that it is not possible to redefine the 
> value of a such parameter without property substitution.
> I had tried without success:
> * <parameter>$\{dollar}\{artifactId}</parameter> with the property "dollar" 
> set to "$", replaced by value of artifactId,
> * <parameter>$$\{artifactId}</parameter>, replaced by "$" followed by 
> artifactId value,
> * <parameter>\$\{artifactId}</parameter>, replaced by "\" followed by 
> artifactId value,
> * <parameter><!\[CDATA\[$\{artifactId}]]></parameter>, replaced by value of 
> artifactId.
> Please, add a property substitution escaping mechanism.
> Thanks,
> Christophe



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to