Skip to content

#315: deploying the workaround used inside maven-surefire-plugin to be able to skip via configuration and commandline properly #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/main/java/pl/project13/maven/git/GitCommitIdMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,22 @@ public class GitCommitIdMojo extends AbstractMojo {
* Set this to {@code 'true'} to skip plugin execution.
* @since 2.1.8
*/
@Parameter(property = "maven.gitcommitid.skip", defaultValue = "false")
@Parameter(defaultValue = "false")
private boolean skip;


/**
* Set this to {@code 'true'} to skip plugin execution via commandline.
* NOTE / WARNING:
* Do *NOT* set this property inside the configuration of your plugin.
* Please read
* https://github.com/ktoso/maven-git-commit-id-plugin/issues/315
* to find out why.
* @since 2.2.4
*/
@Parameter(property = "maven.gitcommitid.skip", defaultValue = "false")
private boolean skipViaCommandLine;

/**
* <p>Set this to {@code 'true'} to only run once in a multi-module build. This probably won't "do the right thing"
* if your project has more than one git repository. If you use this with {@code 'generateGitPropertiesFile'},
Expand Down Expand Up @@ -323,7 +336,7 @@ public void execute() throws MojoExecutionException {
sourceCharset = Charset.defaultCharset();
}

if (skip) {
if (skip || skipViaCommandLine) {
log.info("skip is enabled, skipping execution!");
return;
}
Expand Down