Closed GoogleCodeExporter closed 9 years ago
Either can work. However, if you wish to use ^ in Debian, you may need to
experiment with
<regexFlags>
<regexFlag>UNIX_LINES</regexFlag>
</regexFlags>
in your configuration. See the [UsageGuide] for more information on this.
Original comment by baker.st...@gmail.com
on 8 Aug 2010 at 10:50
Hi Baker,
I just tried the UNIX_LINES flag but without success.
Here is my configuration:
<profile>
<id>pre</id>
<build>
<plugins>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<!-- <phase>prepare-package</phase> //Not working because of maven 2.0.9 version. Available in Maven 2.1 -->
<phase>process-resources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<encoding>UTF-8</encoding>
<basedir>target/classes</basedir>
<filesToInclude>
database.properties
</filesToInclude>
<tokenValueMap>regex.conf</tokenValueMap>
<regexFlags>
<regexFlag>UNIX_LINES</regexFlag>
</regexFlags>
</configuration>
</plugin>
</plugins>
</build>
</profile>
And my regex.conf substitution file contains the following:
^db.url=.*
db.url=jdbc:mysql://localhost:3306/testDB
++
Original comment by reda.abdi
on 9 Aug 2010 at 5:18
Sorry for the late response.
Try out this config:
<configuration>
<basedir>target/classes</basedir>
<file>database.properties</file>
<token>^db.url=.*</token>
<value>db.url=jdbc:mysql://localhost:3306/testDB</value>
<regexFlags>
<regex>MULTILINE</regex>
</regexFlags>
</configuration>
I suspect the tokenValueMap parameter has a problem with a hidden leading
character which is being considered in the regex match.
Either don't use the option for now, or add TWO blank lines at the start of
regex.conf (these will be considered a blank token/value pair and have no
effect).
Original comment by baker.st...@gmail.com
on 11 Aug 2010 at 12:39
[deleted comment]
I have released a new version which I believe has fixed this bug.
Please update to version 1.3.2
Original comment by baker.st...@gmail.com
on 21 Aug 2010 at 3:08
[deleted comment]
Note: If your file contains multiple lines, you should add to your config:
<regexFlags>
<regexFlag>MULTILINE</regexFlag>
</regexFlags>
Original comment by baker.st...@gmail.com
on 21 Aug 2010 at 3:46
Just issue clean up.
Original comment by baker.st...@gmail.com
on 17 Sep 2012 at 12:42
Original issue reported on code.google.com by
reda.abdi
on 8 Aug 2010 at 1:38