kingerpku / maven-replacer-plugin

Automatically exported from code.google.com/p/maven-replacer-plugin
MIT License
0 stars 0 forks source link

XPath in Replacements leads to Duplicate Substitution of Value #95

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. given the pom attached, run `mvn replacer:replace -Dreplacer.newfoo=baz`

What is the expected output? What do you see instead?

I would expect `<foo>baz</foo>`, but I see `<foo>bazbaz</foo>`

What version of the product are you using?

1.5.3

Please provide any additional information below.

Maven 3.0.5, sample POM file attached

Original issue reported on code.google.com by torben.k...@gmail.com on 11 Aug 2014 at 9:34

Attachments:

GoogleCodeExporter commented 8 years ago
I changed the pom.xml to below and worked as expected. 

<configuration>
           <file>pom.xml</file>
           <replacements>
             <replacement>
               <xpath>/project/properties/foo/text()</xpath>
               <token>${foo}</token>
               <value>${replacer.newfoo}</value>
             </replacement>      
           </replacements>
         </configuration>

Original comment by srinivas...@gmail.com on 2 Sep 2014 at 12:33

GoogleCodeExporter commented 8 years ago
Okay, looks like it's working then.
I'll close this off.

Original comment by baker.st...@gmail.com on 13 Oct 2014 at 1:32