Skip to content

Commit 1c6a4cc

Browse files
committed
1.18.0 release
1 parent 122f178 commit 1c6a4cc

File tree

7 files changed

+86
-29
lines changed

7 files changed

+86
-29
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## v1.18.0 (2022-02-20)
4+
5+
### Breaking changes
6+
7+
* Changed default branch to merge during release. Now tag or production branch will be merged to development branch. To restore previous behavior and merge release branch use `noBackMerge` parameter - [#213](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/213)
8+
* Changed default branch to merger during hotfix. Now tag or production branch will be merged to development branch. To restore previous behavior and merge hotfix branch use `noBackMergeHotfix` parameter - [#328](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/328)
9+
* Changed default versions of internal plugins `versions-maven-plugin` and `tycho-versions-plugin`. Now it is set in the code and can be modified with properties - [#330](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/330)
10+
11+
### ---
12+
13+
* Added new `version-update` goal - [#269](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/269)
14+
* Improved getting current version of the project - [#324](https://github.com/aleksandr-m/gitflow-maven-plugin/pull/324)
15+
* Added check for SNAPSHOT dependency in parent project definition - [#64](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/64)
16+
* Added ability to use [Maven version policy](https://maven.apache.org/maven-release/maven-release-api/apidocs/org/apache/maven/shared/release/policy/version/VersionPolicy.html) - [#235](https://github.com/aleksandr-m/gitflow-maven-plugin/pull/236)
17+
* Added checkout from remote for development branch in `feature-start` goal - [#322](https://github.com/aleksandr-m/gitflow-maven-plugin/pull/322)
18+
* Added ability to add [push-options](https://git-scm.com/docs/git-push#Documentation/git-push.txt--oltoptiongt) to git push - [#319](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/319)
19+
320
## v1.17.0 (2021-12-07)
421

522
* Fixed and improved error messages in `feature-start` goal - [#306](https://github.com/aleksandr-m/gitflow-maven-plugin/issues/306)

README.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The plugin is available from Maven Central.
2323
<plugin>
2424
<groupId>com.amashchenko.maven.plugin</groupId>
2525
<artifactId>gitflow-maven-plugin</artifactId>
26-
<version>1.17.0</version>
26+
<version>1.18.0</version>
2727
<configuration>
2828
<!-- optional configuration -->
2929
</configuration>
@@ -42,6 +42,7 @@ The plugin is available from Maven Central.
4242
- `gitflow:hotfix-start` - Starts a hotfix branch and updates version(s) to hotfix version.
4343
- `gitflow:hotfix-finish` - Merges a hotfix branch.
4444
- `gitflow:support-start` - Starts a support branch from the production tag.
45+
- `gitflow:version-update` - Updates version in release or support branch, optionally tagging and pushing it to the remote repository.
4546
- `gitflow:help` - Displays help information.
4647

4748

@@ -61,10 +62,17 @@ To configure this plugin to use single branch model, such as GitHub Flow, just s
6162

6263
That's it!
6364

65+
6466
# Maven Wrapper support
6567

6668
The plugin will automatically use Maven Wrapper for internal Maven goals if plugin is started with the wrapper.
6769

70+
71+
# Internal Maven plugins
72+
73+
The `versions-maven-plugin` and `tycho-versions-plugin` are used internally to update versions and properties of the project. To change versions of internal plugins use `versionsMavenPluginVersion` and `tychoVersionsPluginVersion` properties respectively.
74+
75+
6876
# Eclipse Plugins build with Tycho
6977

7078
Since version `1.1.0` this plugin supports Eclipse plugin projects which are build with [Tycho](https://eclipse.org/tycho/).
@@ -182,13 +190,21 @@ Since `1.2.1` commit messages can be changed in plugin's configuration section i
182190

183191
<tagHotfixMessage>Tag hotfix</tagHotfixMessage>
184192
<tagReleaseMessage>Tag release</tagReleaseMessage>
193+
<tagVersionUpdateMessage>Tag version update</tagVersionUpdateMessage>
185194

186195
<!-- Migration Note: This was called <updateDevToAvoidConflitsMessage> in version 1.11.0, but has been deprecated in favour of the correctly spelt one below. -->
187196
<updateDevToAvoidConflictsMessage>Update develop to production version to avoid merge conflicts</updateDevToAvoidConflictsMessage>
188197
<updateDevBackPreMergeStateMessage>Update develop version back to pre-merge state</updateDevBackPreMergeStateMessage>
189198
190199
<updateReleaseToAvoidConflictsMessage>Update release to hotfix version to avoid merge conflicts</updateReleaseToAvoidConflictsMessage>
191200
<updateReleaseBackPreMergeStateMessage>Update release version back to pre-merge state</updateReleaseBackPreMergeStateMessage>
201+
202+
<updateFeatureBackMessage>Update feature branch back to feature version</updateFeatureBackMessage>
203+
<featureFinishIncrementVersionMessage>Increment feature version</featureFinishIncrementVersionMessage>
204+
205+
<supportStartMessage>Update versions for support branch</supportStartMessage>
206+
207+
<versionUpdateMessage>Update versions</versionUpdateMessage>
192208
</commitMessages>
193209
</configuration>
194210

@@ -240,14 +256,6 @@ The default value is `false` (i.e. the project will be tested before merging bra
240256

241257
All `release` goals have `allowSnapshots` parameter which controls whether SNAPSHOT dependencies are allowed. The default value is `false` (i.e. build fails if there SNAPSHOT dependency in project).
242258

243-
The `gitflow:release-finish` and `gitflow:release` goals have `digitsOnlyDevVersion` parameter which will remove qualifiers from the next development version if set to `true`.
244-
For example, if the release version is `1.0.0-Final` then development version will be `1.0.1-SNAPSHOT`.
245-
The default value is `false` (i.e. qualifiers will be preserved in next development version).
246-
247-
The `gitflow:release-finish` and `gitflow:release` goals have `versionDigitToIncrement` parameter which controls which digit to increment in the next development version. Starts from zero.
248-
For example, if the release version is `1.2.3.4` and `versionDigitToIncrement` is set to `1` then the next development version will be `1.3.0.0-SNAPSHOT`.
249-
If not set or set to not valid value defaults to increment last digit in the version.
250-
251259
The `gitflow:release-start` and `gitflow:release-finish` have `commitDevelopmentVersionAtStart` parameter which controls whether the next development version is set and committed at start or after finish.
252260
By default the value is `false` which means that the next development version is set on the development branch after the release branch has been merged onto the development branch when finishing the release.
253261
This has the benefit of being able to easily cancel the release process simply by deleting the release branch.
@@ -276,8 +284,22 @@ The `gitflow:hotfix-finish` goal supports the parameter `skipMergeDevBranch` whi
276284

277285
The `gitflow:hotfix-finish` goal supports the parameter `skipMergeProdBranch` which prevents merging the hotfix branch into the production branch and deletes the hotfix branch leaving only the tagged commit. Useful, along with `skipMergeDevBranch`, to allow hotfixes to very old code that are not applicable to current development.
278286

287+
The `gitflow:release-finish` and `gitflow:hofix-finish` goals have `noBackMerge` and `noBackMergeHotfix` parameters respectively. They control which branch is merged to development branch. If set to `true` then release or hotfix branch will be merged to development branch. If set to `false` and tag is present (`skipTag` parameter is set to `false`) then tag will be merged. If there is no tag then production branch will be merged to development branch.
288+
289+
### Versioning
290+
291+
The `gitflow:release-finish` and `gitflow:release` goals have `digitsOnlyDevVersion` parameter which will remove qualifiers from the next development version if set to `true`.
292+
For example, if the release version is `1.0.0-Final` then development version will be `1.0.1-SNAPSHOT`.
293+
The default value is `false` (i.e. qualifiers will be preserved in next development version).
294+
295+
The `gitflow:release-finish` and `gitflow:release` goals have `versionDigitToIncrement` parameter which controls which digit to increment in the next development version. Starts from zero.
296+
For example, if the release version is `1.2.3.4` and `versionDigitToIncrement` is set to `1` then the next development version will be `1.3.0.0-SNAPSHOT`.
297+
If not set or set to not valid value defaults to increment last digit in the version.
298+
279299
The `gitflow:hotfix-start` goal has `hotfixVersionDigitToIncrement` parameter which controls which digit to increment in the hotfix version. Starts from zero.
280300

301+
Versioninig can be controlled by using [Maven version policy](https://maven.apache.org/maven-release/maven-release-api/apidocs/org/apache/maven/shared/release/policy/version/VersionPolicy.html) implementation. Create appropriate implementation and add it as dependency to the project, use `projectVersionPolicyId` parameter to set policy id to use. If policy is set then other parameters controlling the generation of version are ignored (i.e. `digitsOnlyDevVersion`, `versionDigitToIncrement`).
302+
281303
Version update of all modules ignoring groupId and artifactId can be forced by setting `versionsForceUpdate` parameter to `true`. The default value is `false`.
282304

283305
### Remote interaction
@@ -291,6 +313,8 @@ At the end of the `-start` goals newly created branch (release / feature / hotfi
291313

292314
The default remote name is `origin`. It can be customized with `<gitFlowConfig><origin>custom_origin</origin></gitFlowConfig>` configuration in pom.xml.
293315

316+
Git [push-options](https://git-scm.com/docs/git-push#Documentation/git-push.txt--oltoptiongt) can be added to push command with the `gitPushOptions` parameter. Multiple options can be added separated with a space e.g. `-DgitPushOptions="merge_request.create merge_request.target=develop merge_request.label='Super feature'"`.
317+
294318
### Rebase, Merge, Fast Forward, Squash
295319

296320
Release branch can be rebased instead of merged by setting `releaseRebase` parameter to `true`. The default value is `false` (i.e. merge will be performed).

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<artifactId>gitflow-maven-plugin</artifactId>
2222
<packaging>maven-plugin</packaging>
2323
<name>gitflow-maven-plugin</name>
24-
<version>1.17.1-SNAPSHOT</version>
24+
<version>1.18.0</version>
2525

2626
<description>The Git-Flow Maven Plugin supports various Git workflows, including Vincent Driessen's successful Git branching model and GitHub Flow. This plugin runs Git and Maven commands from the command line. Supports Eclipse Plugins build with Tycho.</description>
2727

src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,30 @@ public abstract class AbstractGitFlowMojo extends AbstractMojo {
186186
@Parameter(property = "updateOutputTimestamp", defaultValue = "true")
187187
private boolean updateOutputTimestamp = true;
188188

189+
/**
190+
* The role-hint for the
191+
* {@link org.apache.maven.shared.release.policy.version.VersionPolicy}
192+
* implementation used to calculate the project versions. If a policy is set
193+
* other parameters controlling the generation of version are ignored
194+
* (digitsOnlyDevVersion, versionDigitToIncrement).
195+
*
196+
* @since 1.18.0
197+
*/
198+
@Parameter(property = "projectVersionPolicyId")
199+
private String projectVersionPolicyId;
200+
189201
/**
190202
* Version of versions-maven-plugin to use.
203+
*
204+
* @since 1.18.0
191205
*/
192206
@Parameter(property = "versionsMavenPluginVersion", defaultValue = "2.8.1")
193207
private String versionsMavenPluginVersion = "2.8.1";
194208

195209
/**
196210
* Version of tycho-versions-plugin to use.
211+
*
212+
* @since 1.18.0
197213
*/
198214
@Parameter(property = "tychoVersionsPluginVersion", defaultValue = "0.24.0")
199215
private String tychoVersionsPluginVersion = "0.24.0";
@@ -203,6 +219,8 @@ public abstract class AbstractGitFlowMojo extends AbstractMojo {
203219
* Multiple options can be added separated with a space e.g.
204220
* <code>-DgitPushOptions="merge_request.create merge_request.target=develop
205221
* merge_request.label='Super feature'"</code>
222+
*
223+
* @since 1.18.0
206224
*/
207225
@Parameter(property = "gitPushOptions")
208226
private String gitPushOptions;
@@ -218,17 +236,6 @@ public abstract class AbstractGitFlowMojo extends AbstractMojo {
218236
@Parameter(property = "gitExecutable")
219237
private String gitExecutable;
220238

221-
/**
222-
* The role-hint for the {@link org.apache.maven.shared.release.policy.version.VersionPolicy}
223-
* implementation used to calculate the project versions.
224-
* If a policy is set other parameters controlling the generation of version are ignored
225-
* (digitsOnlyDevVersion, versionDigitToIncrement).
226-
*
227-
* @since 1.18.0
228-
*/
229-
@Parameter(property = "projectVersionPolicyId")
230-
private String projectVersionPolicyId;
231-
232239
/** Maven session. */
233240
@Parameter(defaultValue = "${session}", readonly = true)
234241
protected MavenSession mavenSession;

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowHotfixFinishMojo.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,13 @@ public class GitFlowHotfixFinishMojo extends AbstractGitFlowMojo {
129129
private boolean skipMergeDevBranch = false;
130130

131131
/**
132-
* Controls which branch is merged to develop branch. If set to
133-
* <code>true</code> then hotfix branch will be merged to develop. If set to
134-
* <code>false</code> and tag is present ({@link #skipTag} is set to
132+
* Controls which branch is merged to development branch. If set to
133+
* <code>true</code> then hotfix branch will be merged to development branch. If
134+
* set to <code>false</code> and tag is present ({@link #skipTag} is set to
135135
* <code>false</code>) then tag will be merged. If there is no tag then
136-
* production branch will be merged to develop.
136+
* production branch will be merged to development branch.
137137
*
138+
* @since 1.18.0
138139
*/
139140
@Parameter(property = "noBackMergeHotfix", defaultValue = "false")
140141
private boolean noBackMergeHotfix = false;

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowReleaseFinishMojo.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,13 @@ public class GitFlowReleaseFinishMojo extends AbstractGitFlowMojo {
168168
private boolean skipReleaseMergeProdBranch = false;
169169

170170
/**
171-
* Controls which branch is merged to develop branch. If set to
172-
* <code>true</code> then release branch will be merged to develop. If set to
173-
* <code>false</code> and tag is present ({@link #skipTag} is set to
171+
* Controls which branch is merged to development branch. If set to
172+
* <code>true</code> then release branch will be merged to development branch.
173+
* If set to <code>false</code> and tag is present ({@link #skipTag} is set to
174174
* <code>false</code>) then tag will be merged. If there is no tag then
175-
* production branch will be merged to develop.
175+
* production branch will be merged to development branch.
176176
*
177+
* @since 1.18.0
177178
*/
178179
@Parameter(property = "noBackMerge", defaultValue = "false")
179180
private boolean noBackMerge = false;

src/main/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionUpdateMojo.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@
3333
* Updates version in release or support branch, optionally tagging and pushing
3434
* it to the remote repository.
3535
*
36+
* @since 1.18.0
3637
*/
3738
@Mojo(name = "version-update", aggregator = true)
3839
public class GitFlowVersionUpdateMojo extends AbstractGitFlowMojo {
3940
/**
4041
* Whether to push to the remote.
4142
*
43+
* @since 1.18.0
4244
*/
4345
@Parameter(property = "pushRemote", defaultValue = "false")
4446
private boolean pushRemote;
@@ -47,34 +49,39 @@ public class GitFlowVersionUpdateMojo extends AbstractGitFlowMojo {
4749
* Branch to start update in non-interactive mode. Release branch or one of the
4850
* support branches.
4951
*
52+
* @since 1.18.0
5053
*/
5154
@Parameter(property = "fromBranch")
5255
private String fromBranch;
5356

5457
/**
5558
* The version to use in non-interactive mode.
5659
*
60+
* @since 1.18.0
5761
*/
5862
@Parameter(property = "updateVersion")
5963
private String updateVersion;
6064

6165
/**
6266
* Which digit to increment in the next version. Starts from zero.
6367
*
68+
* @since 1.18.0
6469
*/
6570
@Parameter(property = "updateVersionDigitToIncrement")
6671
private Integer updateVersionDigitToIncrement;
6772

6873
/**
6974
* Whether to skip tagging the release in Git.
7075
*
76+
* @since 1.18.0
7177
*/
7278
@Parameter(property = "skipTag", defaultValue = "false")
7379
private boolean skipTag = false;
7480

7581
/**
7682
* Whether to make a GPG-signed tag.
7783
*
84+
* @since 1.18.0
7885
*/
7986
@Parameter(property = "gpgSignTag", defaultValue = "false")
8087
private boolean gpgSignTag = false;

0 commit comments

Comments
 (0)