jmporterog / maven-replacer-plugin

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

Replacement values are not correctly interpreted when some characters are present (\t,\n, ...) #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Use a configuration like this
<replacements>
  <replacement>
    <token>test_token</token>
    <value>
      test_token\nwith carriage return\tand tab
    </value>
  </replacement>
</replacements>

Let's say the input file is:
test_token

The expected output in the result file would be:
test_token
with carriage return    and tab

The current output is:
test_tokennwith carriage returntand tab

It seems that the anti slashes are stripped and not interpreted as escape 
characters.

I'm using the 1.3.5 version of the plugin.

Thanks! (and thank you for this mojo)

Original issue reported on code.google.com by benoit.l...@gmail.com on 11 Jan 2011 at 4:10

GoogleCodeExporter commented 9 years ago
Hi benoit.luttringer,

I will have a look into this defect for you.

Thanks,
-- Steven

Original comment by baker.st...@gmail.com on 13 Jan 2011 at 9:28

GoogleCodeExporter commented 9 years ago
Ok thanks.
Just a precision: the plugin should take care of the case where we want to 
really insert say a "\t" string, maybe by escaping it like "\\t" in the value 
field of the plugin configuration.

Original comment by benoit.l...@gmail.com on 13 Jan 2011 at 9:39

GoogleCodeExporter commented 9 years ago

Original comment by baker.st...@gmail.com on 16 Jan 2011 at 1:33

GoogleCodeExporter commented 9 years ago
Finished development for this Issue and it will be in next release if there are 
no problems with it.

You can test it if you'd like by following the InstallationGuide and/or 
reviewing the test project's source at: 
http://code.google.com/p/maven-replacer-plugin/source/browse/#svn%2Ftest-plugin-
use

I hope this helps,
-- Steven

Original comment by baker.st...@gmail.com on 17 Jan 2011 at 10:01

GoogleCodeExporter commented 9 years ago
I just published a release candidate under version 1.3.6-RC1 if you would like 
to try it (currently waiting for it to be processed with Sonatype).

-- Steven

Original comment by baker.st...@gmail.com on 17 Jan 2011 at 10:45

GoogleCodeExporter commented 9 years ago
I have just tried the release candidate. The new behavior is fine and it's good 
to have the choice with the unescape property.
Thank you very much.

Original comment by benoit.l...@gmail.com on 17 Jan 2011 at 1:34

GoogleCodeExporter commented 9 years ago
Just issue clean up.

Original comment by baker.st...@gmail.com on 17 Sep 2012 at 12:45