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 {
215215 * Set this to {@code 'true'} to skip plugin execution.
216216 * @since 2.1.8
217217 */
218- @ Parameter (property = "maven.gitcommitid.skip" , defaultValue = "false" )
218+ @ Parameter (defaultValue = "false" )
219219 private boolean skip ;
220220
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+
221234 /**
222235 * <p>Set this to {@code 'true'} to only run once in a multi-module build. This probably won't "do the right thing"
223236 * 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 {
323336 sourceCharset = Charset .defaultCharset ();
324337 }
325338
326- if (skip ) {
339+ if (skip || skipViaCommandLine ) {
327340 log .info ("skip is enabled, skipping execution!" );
328341 return ;
329342 }
You can’t perform that action at this time.
0 commit comments