File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/main/java/pl/project13/maven/git Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -215,9 +215,22 @@ public class GitCommitIdMojo extends AbstractMojo {
215
215
* Set this to {@code 'true'} to skip plugin execution.
216
216
* @since 2.1.8
217
217
*/
218
- @ Parameter (property = "maven.gitcommitid.skip" , defaultValue = "false" )
218
+ @ Parameter (defaultValue = "false" )
219
219
private boolean skip ;
220
220
221
+
222
+ /**
223
+ * Set this to {@code 'true'} to skip plugin execution via commandline.
224
+ * NOTE / WARNING:
225
+ * Do *NOT* set this property inside the configuration of your plugin.
226
+ * Please read
227
+ * https://github.com/ktoso/maven-git-commit-id-plugin/issues/315
228
+ * to find out why.
229
+ * @since 2.2.4
230
+ */
231
+ @ Parameter (property = "maven.gitcommitid.skip" , defaultValue = "false" )
232
+ private boolean skipViaCommandLine ;
233
+
221
234
/**
222
235
* <p>Set this to {@code 'true'} to only run once in a multi-module build. This probably won't "do the right thing"
223
236
* if your project has more than one git repository. If you use this with {@code 'generateGitPropertiesFile'},
@@ -323,7 +336,7 @@ public void execute() throws MojoExecutionException {
323
336
sourceCharset = Charset .defaultCharset ();
324
337
}
325
338
326
- if (skip ) {
339
+ if (skip || skipViaCommandLine ) {
327
340
log .info ("skip is enabled, skipping execution!" );
328
341
return ;
329
342
}
You can’t perform that action at this time.
0 commit comments