diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureFinishMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureFinishMojo.java index c590c5f5..3b1a97b1 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureFinishMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureFinishMojo.java @@ -35,10 +35,24 @@ @Mojo(name = "feature-finish", aggregator = true) public class GitFlowFeatureFinishMojo extends AbstractGitFlowMojo { - /** Whether to keep feature branch after finish. */ + /** + * Whether to keep feature branch after finish. + * + * @deprecated 1.13.0 Use {@link #keepBranchFeature} + */ @Parameter(property = "keepBranch", defaultValue = "false") + @Deprecated private boolean keepBranch = false; + + /** + * Whether to keep feature branch after finish. + * + * @since 1.13.0 + */ + @Parameter(property = "keepBranchFeature", defaultValue = "false") + private boolean keepBranchFeature = false; + /** * Whether to skip calling Maven test goal before merging the branch. * @@ -60,10 +74,20 @@ public class GitFlowFeatureFinishMojo extends AbstractGitFlowMojo { * Whether to push to the remote. * * @since 1.3.0 + * @deprecated 1.13.0 Use {@link #pushRemoteFeatureFinish} */ + @Deprecated @Parameter(property = "pushRemote", defaultValue = "true") private boolean pushRemote; + /** + * Whether to push to the remote. + * + * @since 1.13.0 + */ + @Parameter(property = "pushRemoteFeatureFinish", defaultValue = "true") + private boolean pushRemoteFeatureFinish = true; + /** * Feature name to use in non-interactive mode. * @@ -153,15 +177,15 @@ public void execute() throws MojoExecutionException, MojoFailureException { mvnCleanInstall(); } - if (pushRemote) { + if (pushRemoteFeatureFinish) { gitPush(gitFlowConfig.getDevelopmentBranch(), false); - if (!keepBranch) { + if (!keepBranchFeature) { gitPushDelete(featureBranchName); } } - if (!keepBranch) { + if (!keepBranchFeature) { if (featureSquash) { // git branch -D feature/... gitBranchDeleteForce(featureBranchName); diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureStartMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureStartMojo.java index 2b0642be..0a742c55 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureStartMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowFeatureStartMojo.java @@ -56,10 +56,20 @@ public class GitFlowFeatureStartMojo extends AbstractGitFlowMojo { * Whether to push to the remote. * * @since 1.6.0 + * @deprecated 1.13.0 Use {@link #pushRemoteFeatureStart} */ + @Deprecated @Parameter(property = "pushRemote", defaultValue = "false") private boolean pushRemote; + /** + * Whether to push to the remote. + * + * @since 1.13.0 + */ + @Parameter(property = "pushRemoteFeatureStart", defaultValue = "false") + private boolean pushRemoteFeatureStart = false; + /** * Feature name to use in non-interactive mode. * @@ -153,7 +163,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { mvnCleanInstall(); } - if (pushRemote) { + if (pushRemoteFeatureStart) { gitPush(gitFlowConfig.getFeatureBranchPrefix() + featureBranchName, false); } diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixFinishMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixFinishMojo.java index dcfc269c..3765bee7 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixFinishMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixFinishMojo.java @@ -41,10 +41,24 @@ public class GitFlowHotfixFinishMojo extends AbstractGitFlowMojo { @Parameter(property = "skipTag", defaultValue = "false") private boolean skipTag = false; - /** Whether to keep hotfix branch after finish. */ + /** + * Whether to keep hotfix branch after finish. + * + * @deprecated 1.13.0 Use {@link #keepBranchHotfix} + * + */ + @Deprecated @Parameter(property = "keepBranch", defaultValue = "false") private boolean keepBranch = false; + /** + * Whether to keep hotfix branch after finish. + * + * @since 1.13.0 + */ + @Parameter(property = "keepBranchHotfix", defaultValue = "false") + private boolean keepBranchHotfix = false; + /** * Whether to skip calling Maven test goal before merging the branch. * @@ -57,10 +71,20 @@ public class GitFlowHotfixFinishMojo extends AbstractGitFlowMojo { * Whether to push to the remote. * * @since 1.3.0 + * @deprecated 1.13.0 Use {@link #pushRemoteHotfixFinish} */ + @Deprecated @Parameter(property = "pushRemote", defaultValue = "true") private boolean pushRemote; + /** + * Whether to push to the remote. + * + * @since 1.3.0 + */ + @Parameter(property = "pushRemoteHotfixFinish", defaultValue = "true") + private boolean pushRemoteHotfixFinish = true; + /** * Maven goals to execute in the hotfix branch before merging into the * production or support branch. @@ -315,7 +339,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { mvnCleanInstall(); } - if (pushRemote) { + if (pushRemoteHotfixFinish) { if (supportBranchName != null) { gitPush(supportBranchName, !skipTag); } else { @@ -329,12 +353,12 @@ && notSameProdDevName()) { // if no release branch } } - if (!keepBranch) { + if (!keepBranchHotfix) { gitPushDelete(hotfixBranchName); } } - if (!keepBranch) { + if (!keepBranchHotfix) { if (skipMergeProdBranch){ //force delete as upstream merge is skipped gitBranchDeleteForce(hotfixBranchName); diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixStartMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixStartMojo.java index 6d6e18d3..71fad489 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixStartMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixStartMojo.java @@ -42,10 +42,20 @@ public class GitFlowHotfixStartMojo extends AbstractGitFlowMojo { * Whether to push to the remote. * * @since 1.6.0 + * @deprecated 1.13.0 Use {@link #pushRemoteHotfixStart} */ + @Deprecated @Parameter(property = "pushRemote", defaultValue = "false") private boolean pushRemote; + /** + * Whether to push to the remote. + * + * @since 1.13.0 + */ + @Parameter(property = "pushRemoteHotfixStart", defaultValue = "false") + private boolean pushRemoteHotfixStart = false; + /** * Branch to start hotfix in non-interactive mode. Production branch or one of * the support branches. @@ -246,7 +256,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { mvnCleanInstall(); } - if (pushRemote) { + if (pushRemoteHotfixStart) { gitPush(hotfixBranchName, false); } } catch (CommandLineException e) { diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseFinishMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseFinishMojo.java index d389a7d2..9f146110 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseFinishMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseFinishMojo.java @@ -37,10 +37,23 @@ public class GitFlowReleaseFinishMojo extends AbstractGitFlowMojo { @Parameter(property = "skipTag", defaultValue = "false") private boolean skipTag = false; - /** Whether to keep release branch after finish. */ + /** + * Whether to keep release branch after finish. + * + * @deprecated 1.13.0 Use {@link #keepBranchRelease} + */ @Parameter(property = "keepBranch", defaultValue = "false") + @Deprecated private boolean keepBranch = false; + /** + * Whether to keep release branch after finish. + * + * @since 1.13.0 + */ + @Parameter(property = "keepBranchRelease", defaultValue = "false") + private boolean keepBranchRelease = false; + /** * Whether to skip calling Maven test goal before merging the branch. * @@ -78,10 +91,20 @@ public class GitFlowReleaseFinishMojo extends AbstractGitFlowMojo { * Whether to push to the remote. * * @since 1.3.0 + * @deprecated 1.13.0 Use {@link #pushRemoteReleaseFinish} */ + @Deprecated @Parameter(property = "pushRemote", defaultValue = "true") private boolean pushRemote; + /** + * Whether to push to the remote. + * + * @since 1.13.0 + */ + @Parameter(property = "pushRemoteReleaseFinish", defaultValue = "true") + private boolean pushRemoteReleaseFinish = true; + /** * Whether to use --ff-only option when merging. * @@ -331,18 +354,18 @@ public void execute() throws MojoExecutionException, MojoFailureException { mvnCleanInstall(); } - if (pushRemote) { + if (pushRemoteReleaseFinish) { gitPush(gitFlowConfig.getProductionBranch(), !skipTag); if (notSameProdDevName()) { gitPush(gitFlowConfig.getDevelopmentBranch(), !skipTag); } - if (!keepBranch) { + if (!keepBranchRelease) { gitPushDelete(releaseBranch); } } - if (!keepBranch) { + if (!keepBranchRelease) { // git branch -d release/... gitBranchDelete(releaseBranch); } diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseMojo.java index 41b9a9a8..83b48980 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseMojo.java @@ -76,10 +76,20 @@ public class GitFlowReleaseMojo extends AbstractGitFlowMojo { * Whether to push to the remote. * * @since 1.3.0 + * @deprecated 1.13.0 {@link #pushRemoteRelease} */ + @Deprecated @Parameter(property = "pushRemote", defaultValue = "true") private boolean pushRemote; + /** + * Whether to push to the remote. + * + * @since 1.13.0 + */ + @Parameter(property = "pushRemoteRelease", defaultValue = "true") + private boolean pushRemoteRelease = true; + /** * Release version to use instead of the default next release version in non * interactive mode. @@ -323,7 +333,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { mvnCleanInstall(); } - if (pushRemote) { + if (pushRemoteRelease) { gitPush(gitFlowConfig.getProductionBranch(), !skipTag); if (notSameProdDevName()) { gitPush(gitFlowConfig.getDevelopmentBranch(), !skipTag); diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseStartMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseStartMojo.java index 6f82e5c4..d0b1c24d 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseStartMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseStartMojo.java @@ -72,10 +72,20 @@ public class GitFlowReleaseStartMojo extends AbstractGitFlowMojo { * Whether to push to the remote. * * @since 1.6.0 + * @deprecated 1.13.0 Use {@link #pushRemoteReleaseStart} */ @Parameter(property = "pushRemote", defaultValue = "false") + @Deprecated private boolean pushRemote; + /** + * Whether to push to the remote. + * + * @since 1.13.0 + */ + @Parameter(property = "pushRemoteReleaseStart", defaultValue = "false") + private boolean pushRemoteReleaseStart = false; + /** * Whether to commit development version when starting the release (vs when * finishing the release which is the default). Has effect only when there @@ -232,7 +242,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { mvnCleanInstall(); } - if (pushRemote) { + if (pushRemoteReleaseStart) { if (commitDevelopmentVersionAtStart) { gitPush(gitFlowConfig.getDevelopmentBranch(), false); } diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowSupportStartMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowSupportStartMojo.java index 580c5c44..98f36fe9 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowSupportStartMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowSupportStartMojo.java @@ -37,10 +37,20 @@ public class GitFlowSupportStartMojo extends AbstractGitFlowMojo { * Whether to push to the remote. * * @since 1.6.0 + * @deprecated 1.13.0 Use {@link #pushRemoteSupport} */ + @Deprecated @Parameter(property = "pushRemote", defaultValue = "true") private boolean pushRemote; + /** + * Whether to push to the remote. + * + * @since 1.13.0 + */ + @Parameter(property = "pushRemoteSupport", defaultValue = "true") + private boolean pushRemoteSupport = true; + /** * Tag name to use in non-interactive mode. * @@ -108,7 +118,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { mvnCleanInstall(); } - if (pushRemote) { + if (pushRemoteSupport) { gitPush(gitFlowConfig.getSupportBranchPrefix() + tag, false); } } catch (CommandLineException e) {