[JIRA] (WTOOL-63) Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin

81 views
Skip to first unread message

Alexander Muthmann (JIRA)

unread,
May 8, 2020, 3:48:07 AM5/8/20
to wcm-i...@googlegroups.com
Alexander Muthmann created WTOOL-63:
---------------------------------------

Summary: Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin
Key: WTOOL-63
URL: https://wcm-io.atlassian.net/browse/WTOOL-63
Project: wcm.io Tooling
Issue Type: New Feature
Components: Maven
Reporter: Alexander Muthmann


The jgitflow-maven-plugin is not maintained anymore, the last commit was made 2015. There are some issues that are open and most likely will not be fixed, espacially the out-dated TLS / SSH support.

Due to this bug (https://ecosystem.atlassian.net/browse/MJF-301) it's no longer possible to use a Github Repository with SSH but you need to fallback to https.

I'd recomment to use the actively maintained [gitflow-maven-plugin|https://github.com/aleksandr-m/gitflow-maven-plugin] instead. It provides the required configurations currently used and some additional ones (e.g. automatic push of the changed branches & tags).

What are your thoughts [~accountid:557058:f70c42ba-d23b-44a5-a5ec-dfe7100c7eeb]?



--
This message was sent by Atlassian Jira
(v1001.0.0-SNAPSHOT#100126)

Der Steffen (JIRA)

unread,
May 8, 2020, 5:08:01 AM5/8/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21144#comment-21144 ]

Der Steffen commented on WTOOL-63:
----------------------------------

+1 , jgitflow-maven-plugin also stopped accepting our gitlab server's certificate recently

I also stumbled upon the alternative that Alex linked to when searching for a replacement, but didn't yet try if it does indeed work well with our projects.

> Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin
> ------------------------------------------------------------------

Stefan Seifert (JIRA)

unread,
May 12, 2020, 9:05:59 AM5/12/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert reassigned WTOOL-63:
-----------------------------------

Assignee: Stefan Seifert

> Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin
> ------------------------------------------------------------------
>
> Key: WTOOL-63
> URL: https://wcm-io.atlassian.net/browse/WTOOL-63
> Project: wcm.io Tooling
> Issue Type: New Feature
> Components: Maven
> Reporter: Alexander Muthmann
> Assignee: Stefan Seifert

Stefan Seifert (JIRA)

unread,
May 12, 2020, 10:11:53 AM5/12/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert reassigned WTOOL-63:
-----------------------------------

Assignee: (was: Stefan Seifert)

i did some quick tests with it on multi-module AEM projects and encountered some issues which may be difficult to solve.

i used this plugin configuration for testing:
{code:xml}
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.14.0</version>
<configuration>
<installProject>true</installProject>
<verbose>true</verbose>
<pushRemote>false</pushRemote>
<commitMessagePrefix>[gitflow] </commitMessagePrefix>
</configuration>
</plugin>
{code}

1. multi module project set up with https://wcm.io/tooling/maven/archetypes/aem/
using {{gitflow:release}} or {{gitflow:release-start}} and {{gitflow:release-finish}} worked fine and completed, however *it failed to update the versions of the submodules* - it updated only the root pom (aggregator pom) which is completely useless

2. multi module project https://github.com/adobe/aem-project-archetype
using {{gitflow:release}} or {{gitflow:release-finish}} failed during the project build with a strange error which does not occur when doing a simple "mvn clean install" on the command line
{noformat}
[ERROR] Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:generate-metadata (default-generate-metadata) on project mysite.ui.content: java.io.FileNotFoundException: C:\temp\myproject3\ui.apps\target\classes (Zugriff verweigert)
{noformat}
Zugriff verweigert = Access denied

3. more cosmetic: the plugin automatically detects the next development version by just updating the last digit. it's not possible to pass this interactively. this is fine for most project setups, but there are some cases where this pattern does not work and the new version has to be set manually. it would be nice to enter the next development version interactively with the default incrementation as default, as it is implemented in maven-release-plugin and jgitflow-maven-plugin

---

esp. #1 is a blocker. there seems to be some (old) PRs around this, i did nod dig deeper into it.
https://github.com/aleksandr-m/gitflow-maven-plugin/pull/132
https://github.com/aleksandr-m/gitflow-maven-plugin/issues/130

#2 has to be debugged in detail whether it's a problem in the gitflow plugin or the jackrabbit filevault plugin.

#3 is probably acceptable as it only affects few projects

---

in general it should also considered if the "old" gitflow approach is really required, of if just {{maven-release-plugin}} can be used with a simpler branching model.

> Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin
> ------------------------------------------------------------------
>
> Key: WTOOL-63
> URL: https://wcm-io.atlassian.net/browse/WTOOL-63
> Project: wcm.io Tooling
> Issue Type: New Feature
> Components: Maven
> Reporter: Alexander Muthmann
>

Stefan Seifert (JIRA)

unread,
May 13, 2020, 6:21:08 AM5/13/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21152#comment-21152 ]

Stefan Seifert commented on WTOOL-63:
-------------------------------------

i've just detected that {{gitflow-maven-plugin}} is delegating updating the versions to {{versions-maven-plugin}}, and thus it's possible to fix problem #1 by adding:
{code:xml}
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<configuration>
<processAllModules>true</processAllModules>
</configuration>
</plugin>
{code}

Stefan Seifert (JIRA)

unread,
May 13, 2020, 8:15:21 AM5/13/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert reassigned WTOOL-63:
-----------------------------------

Assignee: Stefan Seifert

another problem: unlike jgitflow-maven-plugin and maven-release-plugin the gitflow-maven-plugin does not activate the {{release-profile}} - it does not even support a config parameter for that.

i filed an issues on github [#231|https://github.com/aleksandr-m/gitflow-maven-plugin/issues/231], but also figured out a workaround (described there) which supports special configuration in the release profile e.g. for code signing (important for releases to maven central).

> Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin
> ------------------------------------------------------------------
>
> Key: WTOOL-63
> URL: https://wcm-io.atlassian.net/browse/WTOOL-63
> Project: wcm.io Tooling
> Issue Type: New Feature
> Components: Maven
> Reporter: Alexander Muthmann
> Assignee: Stefan Seifert

Stefan Seifert (JIRA)

unread,
May 13, 2020, 8:38:45 AM5/13/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21156#comment-21156 ]

Stefan Seifert commented on WTOOL-63:
-------------------------------------

filed another issue for setting the next development version: [#232|https://github.com/aleksandr-m/gitflow-maven-plugin/issues/232]

it's possible to use the versionDigitToIncrement parameter to influence which digit should be incremented, but this as well works only for "normal" version numbers.

Stefan Seifert (JIRA)

unread,
May 13, 2020, 3:28:48 PM5/13/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert resolved WTOOL-63.
---------------------------------
Fix versions: Global Parent 33
Resolution: Fixed

full support for gitflow-maven-plugin is implemented in global-parent 33 / aem-global-parent 1.4.10 (not yet released).

i've manged to find solutions for all problems above, the only open issue is the setting of the next development version for edge cases.

i've also written a how-to article how to migrate to gitflow-maven-plugin: https://wcm-io.atlassian.net/wiki/x/AQBFY

> Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin
> ------------------------------------------------------------------
>
> Key: WTOOL-63
> URL: https://wcm-io.atlassian.net/browse/WTOOL-63
> Project: wcm.io Tooling
> Issue Type: New Feature
> Components: Maven
> Reporter: Alexander Muthmann
> Assignee: Stefan Seifert
> Fix For: Global Parent 33

Alexander Muthmann (JIRA)

unread,
May 14, 2020, 2:53:50 AM5/14/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21159#comment-21159 ]

Alexander Muthmann commented on WTOOL-63:
-----------------------------------------

Oh, that was fast, thanks\!

Masoud Rozati (JIRA)

unread,
May 14, 2020, 5:53:45 AM5/14/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21160#comment-21160 ]

Masoud Rozati commented on WTOOL-63:
------------------------------------

We use the jgitflow flag \{\{noDeploy}} in our release pipelines to prevent pushing artifacts to artifact repository before release is completed successfully.
[https://bitbucket.org/atlassian/jgit-flow/wiki/goals/release-finish#\!nodeploy|https://bitbucket.org/atlassian/jgit-flow/wiki/goals/release-finish#!nodeploy]
This is especially useful in multi-module projects, because if the release fails on one of the modules, you have a half release in your repo and most repos do not allow re-deployment of the same version.

Since gitflow plugin does not have this flag, it would be great if we introduce a property in the global-parent to switch off the {{postReleaseGoals}} without having to override the config in each project

Masoud Rozati (JIRA)

unread,
May 14, 2020, 5:54:48 AM5/14/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21160#comment-21160 ]

Masoud Rozati edited comment on WTOOL-63 at 5/14/20 9:54 AM:
-------------------------------------------------------------

We use the jgitflow flag {{noDeploy}} in our release pipelines to prevent pushing artifacts to artifact repository before release is completed successfully.
[https://bitbucket.org/atlassian/jgit-flow/wiki/goals/release-finish#\!nodeploy|https://bitbucket.org/atlassian/jgit-flow/wiki/goals/release-finish#!nodeploy]
This is especially useful in multi-module projects, because if the release fails on one of the modules, you have a half release in your repo and most repos do not allow re-deployment of the same version.

Since gitflow plugin does not have this flag, it would be great if we introduce a property in the global-parent to switch off the {{postReleaseGoals}} without having to override the config in each project


was (Author: mrozati):

Stefan Seifert (JIRA)

unread,
May 14, 2020, 9:10:59 AM5/14/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21162#comment-21162 ]

Stefan Seifert commented on WTOOL-63:
-------------------------------------

i think it's difficult to provide replacement for all jgitflow-maven-plugin parameters esp. when the semantic applies to a different concept than the gitflow-maven-plugin. however i've updated to POM to allow easy override of our preconfigured settings via maven properties.

example to change the goals to be executed after the release to not include the deploy goal:
{noformat}
mvn -D"gitflow.postReleaseGoals"="clean install" gitflow:release
{noformat}

Stefan Seifert (JIRA)

unread,
May 20, 2020, 9:37:36 AM5/20/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert reopened WTOOL-63:
---------------------------------

there is one nasty issue left which occurs when releasing a sub-module that is part of a local aggregator - in this case the gitflow-release-plugin updates other versions as well that are outside the directory of what is intended to be released.

the source of the problem is again delegating to {{versions-maven-plugin}}, the problem seems to exactly match with this issue [#82|https://github.com/mojohaus/versions-maven-plugin/issues/82]. the problem may affect all projects which do not release everything in the git repository but only parts of it of the same aggregator.

a rather cosmetic problem is also [#321|https://github.com/mojohaus/versions-maven-plugin/issues/321] where poms with slightly invalid XML are ignored without notice during release.

> Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin
> ------------------------------------------------------------------
>
> Key: WTOOL-63
> URL: https://wcm-io.atlassian.net/browse/WTOOL-63
> Project: wcm.io Tooling
> Issue Type: New Feature
> Components: Maven
> Reporter: Alexander Muthmann
> Assignee: Stefan Seifert
> Fix For: Global Parent 33
>
>
> The jgitflow-maven-plugin is not maintained anymore, the last commit was made 2015. There are some issues that are open and most likely will not be fixed, espacially the out-dated TLS / SSH support.
> Due to this bug (https://ecosystem.atlassian.net/browse/MJF-301) it's no longer possible to use a Github Repository with SSH but you need to fallback to https.
> I'd recomment to use the actively maintained [gitflow-maven-plugin|https://github.com/aleksandr-m/gitflow-maven-plugin] instead. It provides the required configurations currently used and some additional ones (e.g. automatic push of the changed branches & tags).
> What are your thoughts [~accountid:557058:f70c42ba-d23b-44a5-a5ec-dfe7100c7eeb]?



--
This message was sent by Atlassian Jira
(v1001.0.0-SNAPSHOT#100127)

Stefan Seifert (JIRA)

unread,
Aug 10, 2020, 9:23:43 AM8/10/20
to wcm-i...@googlegroups.com

[ https://wcm-io.atlassian.net/browse/WTOOL-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert resolved WTOOL-63.
---------------------------------
Fix versions: (was: Global Parent 33)
Global Parent 35
Resolution: Fixed

the outstanding issues in {{versions-maven-plugin}} are fixed and version 2.8.1 is included in the next version of global-parent 35.
with this gitflow-maven-plugin should be fully supported even in scenarios where are multiple release artifacts in a single git repo.

> Consider replacing jgitflow-maven-plugin with gitflow-maven-plugin
> ------------------------------------------------------------------
>
> Key: WTOOL-63
> URL: https://wcm-io.atlassian.net/browse/WTOOL-63
> Project: wcm.io Tooling
> Issue Type: New Feature
> Components: Maven
> Reporter: Alexander Muthmann
> Assignee: Stefan Seifert
> Fix For: Global Parent 35
>
>
> The jgitflow-maven-plugin is not maintained anymore, the last commit was made 2015. There are some issues that are open and most likely will not be fixed, espacially the out-dated TLS / SSH support.
> Due to this bug (https://ecosystem.atlassian.net/browse/MJF-301) it's no longer possible to use a Github Repository with SSH but you need to fallback to https.
> I'd recomment to use the actively maintained [gitflow-maven-plugin|https://github.com/aleksandr-m/gitflow-maven-plugin] instead. It provides the required configurations currently used and some additional ones (e.g. automatic push of the changed branches & tags).
> What are your thoughts [~accountid:557058:f70c42ba-d23b-44a5-a5ec-dfe7100c7eeb]?



--
This message was sent by Atlassian Jira
(v1001.0.0-SNAPSHOT#100142)
Reply all
Reply to author
Forward
0 new messages