[MPATCH-15] Expose the "binary" option as a parameter
Submitted by Heath Nielson.
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1411474 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java b/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
index c44a696..96ce9b7 100644
--- a/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
+++ b/src/main/java/org/apache/maven/plugin/patch/ApplyMojo.java
@@ -231,6 +231,13 @@
private boolean removeEmptyFiles;
/**
+ * apply --binary option to patch command line
+ * @since 1.1.2
+ */
+ @Parameter( defaultValue = "false" )
+ private boolean binary;
+
+ /**
* Apply the patches. Give preference to patchFile over patchSourceDir/patches, and preference to originalFile over
* workDir.
*/
@@ -553,6 +560,11 @@
cli.createArg().setValue( "-p" + strip );
+ if ( binary )
+ {
+ cli.createArg().setValue( "--binary" );
+ }
+
if ( ignoreWhitespace )
{
cli.createArg().setValue( "-l" );