Open GoogleCodeExporter opened 9 years ago
[deleted comment]
Can you post all the configuration?
Also, make sure to use: <regex>true</regex> when using a token containing regex
for matching.
Original comment by baker.st...@gmail.com
on 13 Oct 2014 at 1:31
I have downgraded to 1.5.2 and relative paths do work in that version.
The configuration I use is as follows. For testing I added the pattern "^.*$"
with an empty string as replacement value, which I think should yield a file
with empty lines. But it does not. The other patterns match, yielding some
empty lines in the output file.
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<file>target/feature/feature.xml</file>
<regex>true</regex>
<replacements>
<replacement>
<token>^.*$</token>
<value></value>
</replacement>
<replacement>
<!-- For whatever reason, the plugin refuses to match '<', '>', '^', and '$'. CDATA section or not. -->
<token>.*titan-.*/${titan.version}./bundle.</token>
<value></value>
</replacement>
<replacement>
<!-- For whatever reason, the plugin refuses to match '<', '>', '^', and '$'. CDATA section or not. -->
<token>.*camel-uldap.*/${project.version}./bundle.</token>
<value></value>
</replacement>
</replacements>
</configuration>
</plugin>
Original comment by ralf.viv...@gmail.com
on 14 Oct 2014 at 2:54
I have exactly the same problem.
I want to remove all spaces at each line before a tag with the following
configuration:
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<basedir>${project.build.directory}</basedir>
<filesToInclude>${project.build.finalName}/WEB-INF/views/**/*.jsp</filesToInclude>
<token>>\s*<</token>
<value>><</value>
<regex>true</regex>
<regexFlags>
<regexFlag>MULTILINE</regexFlag>
</regexFlags>
</configuration>
</plugin>
Doesn't work...so it's exactly the same...
Original comment by marcmust...@googlemail.com
on 16 Mar 2015 at 2:09
Original issue reported on code.google.com by
ralf.viv...@gmail.com
on 12 Oct 2014 at 2:22