Don't worry, and my reviews aren't restricted to rookies, only to projects
I understand :)
Robert
On Mon, 25 Mar 2013 22:11:38 +0100, Baptiste MATHUS <[email protected]>
wrote:
Yup, agreed it's far better. I had found many forum discussions about it,
but not that precise jira.
I agree this is better to just say it's maven core responsibility to
prevent having that code.
I'll revert the commit.
Thanks a lot for the notification. It's a good thing you watch out for
rooky misbehaviours ;-).
Cheers
2013/3/25 Robert Scholte <[email protected]>
I'm not really happy with this (long) parameter and I think it is
actually
a Maven core problem, which will be fixed with the next release. See
https://jira.codehaus.org/**browse/MNG-5380<https://jira.codehaus.org/browse/MNG-5380>
Robert
On Mon, 25 Mar 2013 21:13:10 +0100, <[email protected]> wrote:
Revision:
18073
Author:
baptiste
Date:
2013-03-25 15:13:09 -0500 (Mon, 25 Mar 2013)
Log Message
A bit more natural I guess: replace unbreakable spaces with normal
spaces, as it's likely to be used as a workaround for spaces
replacement.
See MBUILDHELPER-34
Modified Paths
trunk/mojo/build-helper-maven-**plugin/src/it/mbuildhelper-53-**
somespaces/verify.groovy
trunk/mojo/build-helper-maven-**plugin/src/main/java/org/**
codehaus/mojo/buildhelper/**RegexPropertyMojo.java
Diff
Modified:
trunk/mojo/build-helper-maven-**plugin/src/it/mbuildhelper-53-*
*somespaces/verify.groovy
(18072 => 18073)
---
trunk/mojo/build-helper-maven-**plugin/src/it/mbuildhelper-53-**somespaces/verify.groovy
2013-03-24 20:48:10 UTC (rev 18072)
+++
trunk/mojo/build-helper-maven-**plugin/src/it/mbuildhelper-53-**somespaces/verify.groovy
2013-03-25 20:13:09 UTC (rev 18073)
@@ -3,6 +3,6 @@
String text = file.getText("utf-8");
-assert text.contains('define property propname = "hi
\u00A0\u00A0\u00A0"') , "text=<"+text+">"
+assert text.contains('define property propname = "hi "') ,
"text=<"+text+">"
return true;
Modified: trunk/mojo/build-helper-maven-**plugin/src/main/java/org/**
codehaus/mojo/buildhelper/**RegexPropertyMojo.java
(18072 => 18073)
--- trunk/mojo/build-helper-maven-**plugin/src/main/java/org/**
codehaus/mojo/buildhelper/**RegexPropertyMojo.java
2013-03-24 20:48:10 UTC (rev 18072)
+++ trunk/mojo/build-helper-maven-**plugin/src/main/java/org/**
codehaus/mojo/buildhelper/**RegexPropertyMojo.java
2013-03-25 20:13:09 UTC (rev 18073)
@@ -76,11 +76,23 @@
private boolean failIfNoMatch;
/**
+ * Used as a workaround to MBUILDHELPER-34.
+ * By default, unbreakable spaces passed in replacement will be
replaced with normal spaces.
+ * If this is not desired, set this property to false (defaults to
true).
+ */
+ @Parameter( defaultValue = "true" )
+ private boolean unbreakableSpaceReplacementAsN**ormalSpace;
+
+ /**
* {@inheritDoc}
*/
public void execute()
throws MojoExecutionException, MojoFailureException
{
+ if ( StringUtils.isNotEmpty( replacement ) &&
unbreakableSpaceReplacementAsN**ormalSpace )
+ {
+ replacement = replacement.replace( '\u00A0', ' ' );
+ }
Pattern pattern;
try
{
To unsubscribe from this list please visit:
http://xircles.codehaus.org/**manage_email<http://xircles.codehaus.org/manage_email>
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
------------------------------**------------------------------**---------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/**manage_email<http://xircles.codehaus.org/manage_email>
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email