Skip to content
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

release-finish: unable to delete release branch #350

Open
jenslauterbach opened this issue May 13, 2022 · 1 comment
Open

release-finish: unable to delete release branch #350

jenslauterbach opened this issue May 13, 2022 · 1 comment

Comments

@jenslauterbach
Copy link

Hi 👋 ,

I have been banging my head against my CI/CD pipeline for a few days now and can't figure out how to get my release-finish job to succeed.

Current behaviour

When my CI/CD pipeline runs release-finish, I get the following error:

[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.18.0:release-finish (default-cli) on project aem-pipeline-test: release-finish: warning: not deleting branch 'release/1.1.0' that is not yet merged to
[ERROR]          'refs/remotes/origin/release/1.1.0', even though it is merged to HEAD.
[ERROR] error: The branch 'release/1.1.0' is not fully merged.
[ERROR] If you are sure you want to delete it, run 'git branch -D release/1.1.0'.

I have created a dedicated test project. There were no changes made to any of the branches. I am just running my CI/CD pipeline and let the plugin do its magic ✨ .

Expected behaviour

I expect that when I finish a release the branch is deleted.

Configuration

Plugin version: 1.18

Plugin configuration:

<configuration>
    <installProject>false</installProject>
    <verbose>true</verbose>

    <gitFlowConfig>
        <productionBranch>main</productionBranch>
        <developmentBranch>develop</developmentBranch>
    </gitFlowConfig>
</configuration>

Details

The simplified version of my pipeline is that the user runs a build on the develop branch. At the end of the build the user can start a release using a manually triggered job. This will create a release branch for which I can run another build. At the end of the build of the release branch, the user has the option to finish the release with another manually triggered job.

Start Release

On branch develop the following command is run:

mvn gitflow:release-start -DuseSnapshotInRelease=true -DcommitDevelopmentVersionAtStart=true -DversionDigitToIncrement=1 -DpushRemote=true

This creates a new release/x.y.z branch in Gitlab (remote).

Finish Release

To finish the release, the following command is run on the release/x.y.z branch:

mvn gitflow:release-finish -DuseSnapshotInRelease=true -DcommitDevelopmentVersionAtStart=true -DversionDigitToIncrement=1

Logs

👉 Click here to show full log
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Pipeline Test                                                  [pom]
[INFO] Pipeline Test :: Test Module                                   [pom]
[INFO] Pipeline Test :: Test Module :: Core                        [bundle]
[INFO] Pipeline Test :: Test Module :: Package            [content-package]
[INFO] 
[INFO] ------------< com.example.pipeline:pipeline-test >-------------
[INFO] Building Pipeline Test 1.2.0-SNAPSHOT                          [1/4]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- gitflow-maven-plugin:1.18.0:release-finish (default-cli) @ pipeline-test ---
[INFO] Checking for uncommitted changes.
"release/1.2.0"
[INFO] Checking out 'release/1.2.0' branch.
Your branch is up to date with 'origin/release/1.2.0'.
[INFO] Checking for SNAPSHOT versions in dependencies.
[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0-SNAPSHOT
[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0-SNAPSHOT
[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0-SNAPSHOT
[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0-SNAPSHOT
[INFO] Fetching remote branch 'origin release/1.2.0'.
[INFO] Comparing local branch 'release/1.2.0' with remote 'origin/release/1.2.0'.
0	0
[INFO] Local branch 'develop' doesn't exist. Trying to fetch and check it out from 'origin'.
[INFO] Fetching remote branch 'origin develop'.
[INFO] Creating a new branch 'develop' from 'origin/develop' and checking it out.
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
[INFO] Fetching remote branch 'origin develop'.
[INFO] Comparing local branch 'develop' with remote 'origin/develop'.
0	0
[INFO] Local branch 'main' doesn't exist. Trying to fetch and check it out from 'origin'.
[INFO] Fetching remote branch 'origin main'.
[INFO] Creating a new branch 'main' from 'origin/main' and checking it out.
Branch 'main' set up to track remote branch 'main' from 'origin'.
[INFO] Fetching remote branch 'origin main'.
[INFO] Comparing local branch 'main' with remote 'origin/main'.
0	0
[INFO] Checking out 'release/1.2.0' branch.
Your branch is up to date with 'origin/release/1.2.0'.
[INFO] Cleaning and testing the project.
INFO Scanning for projects...
WARNING Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0-SNAPSHOT
INFO ------------------------------------------------------------------------
INFO Reactor Build Order:
INFO 
INFO Pipeline Test                                              [pom]
INFO Pipeline Test :: Test Module                                   [pom]
INFO Pipeline Test :: Test Module :: Core                        [bundle]
INFO Pipeline Test :: Test Module :: Package            [content-package]
INFO 
INFO ------------< com.example.pipeline:pipeline-test >-------------
INFO Building Pipeline Test 1.2.0-SNAPSHOT                          [1/4]
INFO --------------------------------[ pom ]---------------------------------
INFO 
INFO --- maven-clean-plugin:3.0.0:clean (default-clean) @ pipeline-test ---
INFO 
INFO --- build-helper-maven-plugin:3.0.0:parse-version (parse-version-of-java.version-property) @ pipeline-test ---
INFO 
INFO --- maven-enforcer-plugin:1.4.1:enforce (enforce-java) @ pipeline-test ---
INFO 
INFO --- maven-enforcer-plugin:1.4.1:enforce (ban-maven-scr-plugin) @ pipeline-test ---
INFO 
INFO --- git-commit-id-plugin:2.2.2:revision (default) @ pipeline-test ---
INFO 
INFO --- maven-bundle-plugin:3.3.0:manifest (scr-metadata) @ pipeline-test ---
WARNING Ignoring project type pom - supportedProjectTypes = [jar, bundle]
INFO 
INFO ------< com.example.pipeline.test:pipeline-test-module >-------
INFO Building Pipeline Test :: Test Module 1.2.0-SNAPSHOT           [2/4]
INFO --------------------------------[ pom ]---------------------------------
INFO 
INFO --- maven-clean-plugin:3.0.0:clean (default-clean) @ pipeline-test-module ---
INFO 
INFO --- build-helper-maven-plugin:3.0.0:parse-version (parse-version-of-java.version-property) @ pipeline-test-module ---
INFO 
INFO --- maven-enforcer-plugin:1.4.1:enforce (enforce-java) @ pipeline-test-module ---
INFO 
INFO --- maven-enforcer-plugin:1.4.1:enforce (ban-maven-scr-plugin) @ pipeline-test-module ---
INFO 
INFO --- git-commit-id-plugin:2.2.2:revision (default) @ pipeline-test-module ---
INFO 
INFO --- maven-bundle-plugin:3.3.0:manifest (scr-metadata) @ pipeline-test-module ---
WARNING Ignoring project type pom - supportedProjectTypes = [jar, bundle]
INFO 
INFO ----< com.example.pipeline.test:pipeline-test-module-core >----
INFO Building Pipeline Test :: Test Module :: Core 1.2.0-SNAPSHOT   [3/4]
INFO -------------------------------[ bundle ]-------------------------------
INFO 
INFO --- maven-clean-plugin:3.0.0:clean (default-clean) @ pipeline-test-module-core ---
INFO 
INFO --- build-helper-maven-plugin:3.0.0:parse-version (parse-version-of-java.version-property) @ pipeline-test-module-core ---
INFO 
INFO --- maven-enforcer-plugin:1.4.1:enforce (enforce-java) @ pipeline-test-module-core ---
INFO 
INFO --- maven-enforcer-plugin:1.4.1:enforce (ban-maven-scr-plugin) @ pipeline-test-module-core ---
INFO 
INFO --- git-commit-id-plugin:2.2.2:revision (default) @ pipeline-test-module-core ---
INFO 
INFO --- maven-resources-plugin:3.0.2:resources (default-resources) @ pipeline-test-module-core ---
INFO Using 'UTF-8' encoding to copy filtered resources.
INFO skip non existing resourceDirectory /builds/pipeline-test/test-module/core/src/main/jcr_root
INFO skip non existing resourceDirectory /builds/pipeline-test/test-module/core/src/main/META-INF/vault/definition
INFO skip non existing resourceDirectory /builds/pipeline-test/test-module/core/src/main/resources
INFO 
INFO --- maven-compiler-plugin:3.6.1:compile (default-compile) @ pipeline-test-module-core ---
INFO Changes detected - recompiling the module!
INFO Compiling 1 source file to /builds/pipeline-test/test-module/core/target/classes
INFO 
INFO --- maven-bundle-plugin:3.3.0:manifest (scr-metadata) @ pipeline-test-module-core ---
INFO 
INFO --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ pipeline-test-module-core ---
INFO Not copying test resources
INFO 
INFO --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ pipeline-test-module-core ---
INFO Not compiling test sources
INFO 
INFO --- maven-surefire-plugin:2.22.2:test (default-test) @ pipeline-test-module-core ---
INFO Tests are skipped.
INFO 
INFO --< com.example.pipeline.test:pipeline-test-module-package >---
INFO Building Pipeline Test :: Test Module :: Package 1.2.0-SNAPSHOT [4/4]
INFO --------------------------[ content-package ]---------------------------
INFO 
INFO --- maven-clean-plugin:3.0.0:clean (default-clean) @ pipeline-test-module-package ---
INFO 
INFO --- build-helper-maven-plugin:3.0.0:parse-version (parse-version-of-java.version-property) @ pipeline-test-module-package ---
INFO 
INFO --- maven-enforcer-plugin:1.4.1:enforce (enforce-java) @ pipeline-test-module-package ---
INFO 
INFO --- maven-enforcer-plugin:1.4.1:enforce (ban-maven-scr-plugin) @ pipeline-test-module-package ---
INFO 
INFO --- git-commit-id-plugin:2.2.2:revision (default) @ pipeline-test-module-package ---
INFO 
INFO --- maven-resources-plugin:3.0.2:resources (default-resources) @ pipeline-test-module-package ---
INFO Using 'UTF-8' encoding to copy filtered resources.
INFO skip non existing resourceDirectory /builds/pipeline-test/test-module/package/src/main/jcr_root
INFO skip non existing resourceDirectory /builds/pipeline-test/test-module/package/src/main/META-INF/vault/definition
INFO skip non existing resourceDirectory /builds/pipeline-test/test-module/package/src/main/resources
INFO 
INFO --- maven-compiler-plugin:3.6.1:compile (default-compile) @ pipeline-test-module-package ---
INFO No sources to compile
INFO 
INFO --- content-package-maven-plugin:0.5.1:check-signature (default-check-signature) @ pipeline-test-module-package ---
INFO No signature defined. Skipping signature check.
INFO 
INFO --- maven-bundle-plugin:3.3.0:manifest (scr-metadata) @ pipeline-test-module-package ---
WARNING Ignoring project type content-package - supportedProjectTypes = [jar, bundle]
INFO 
INFO --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ pipeline-test-module-package ---
INFO Not copying test resources
INFO 
INFO --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ pipeline-test-module-package ---
INFO Not compiling test sources
INFO 
INFO --- maven-surefire-plugin:2.22.2:test (default-test) @ pipeline-test-module-package ---
INFO Tests are skipped.
INFO ------------------------------------------------------------------------
INFO Reactor Summary for Pipeline Test 1.2.0-SNAPSHOT:
INFO 
INFO Pipeline Test .................................. SUCCESS [  5.834 s]
INFO Pipeline Test :: Test Module ................... SUCCESS [  0.096 s]
INFO Pipeline Test :: Test Module :: Core ........... SUCCESS [  3.409 s]
INFO Pipeline Test :: Test Module :: Package ........ SUCCESS [  1.232 s]
INFO ------------------------------------------------------------------------
INFO BUILD SUCCESS
INFO ------------------------------------------------------------------------
INFO Total time:  14.521 s
INFO Finished at: 2022-05-13T16:55:34Z
INFO ------------------------------------------------------------------------
[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0-SNAPSHOT
[INFO] Updating version(s) to '1.2.0'.
INFO Scanning for projects...
WARNING Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0-SNAPSHOT
INFO ------------------------------------------------------------------------
INFO Reactor Build Order:
INFO 
INFO Pipeline Test                                              [pom]
INFO Pipeline Test :: Test Module                                   [pom]
INFO Pipeline Test :: Test Module :: Core                        [bundle]
INFO Pipeline Test :: Test Module :: Package            [content-package]
INFO 
INFO ------------< com.example.pipeline:pipeline-test >-------------
INFO Building Pipeline Test 1.2.0-SNAPSHOT                          [1/4]
INFO --------------------------------[ pom ]---------------------------------
INFO 
INFO --- versions-maven-plugin:2.8.1:set (default-cli) @ pipeline-test ---
INFO Local aggregation root: /builds/pipeline-test
INFO Processing change of com.example.pipeline:pipeline-test:1.2.0-SNAPSHOT -> 1.2.0
INFO Processing com.example.pipeline:pipeline-test
INFO     Updating project com.example.pipeline:pipeline-test
INFO         from version 1.2.0-SNAPSHOT to 1.2.0
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module
INFO     Updating parent com.example.pipeline:pipeline-test
INFO         from version 1.2.0-SNAPSHOT to 1.2.0
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module-core
INFO     Updating parent com.example.pipeline.test:pipeline-test-module
INFO         from version 1.2.0-SNAPSHOT to 1.2.0
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module-package
INFO     Updating parent com.example.pipeline.test:pipeline-test-module
INFO         from version 1.2.0-SNAPSHOT to 1.2.0
INFO 
INFO ------------------------------------------------------------------------
INFO Reactor Summary for Pipeline Test 1.2.0-SNAPSHOT:
INFO 
INFO Pipeline Test .................................. SUCCESS [  1.255 s]
INFO Pipeline Test :: Test Module ................... SKIPPED
INFO Pipeline Test :: Test Module :: Core ........... SKIPPED
INFO Pipeline Test :: Test Module :: Package ........ SKIPPED
INFO ------------------------------------------------------------------------
INFO BUILD SUCCESS
INFO ------------------------------------------------------------------------
INFO Total time:  4.775 s
INFO Finished at: 2022-05-13T16:55:43Z
INFO ------------------------------------------------------------------------

[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0
[INFO] Committing changes.
[release/1.2.0 0436eac] Update for next development version
 4 files changed, 4 insertions(+), 4 deletions(-)
[INFO] Checking out 'main' branch.
Your branch is up to date with 'origin/main'.
[INFO] Merging (--no-ff) 'release/1.2.0' branch.
Merge made by the 'recursive' strategy.
 pom.xml                     | 2 +-
 test-module/core/pom.xml    | 2 +-
 test-module/package/pom.xml | 2 +-
 test-module/pom.xml         | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0
[INFO] Creating '1.2.0' tag.
[INFO] Checking out 'develop' branch.
Your branch is up to date with 'origin/develop'.
[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.3.0-SNAPSHOT
[INFO] Updating version(s) to '1.2.0'.
INFO Scanning for projects...
WARNING Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.3.0-SNAPSHOT
INFO ------------------------------------------------------------------------
INFO Reactor Build Order:
INFO 
INFO Pipeline Test                                              [pom]
INFO Pipeline Test :: Test Module                                   [pom]
INFO Pipeline Test :: Test Module :: Core                        [bundle]
INFO Pipeline Test :: Test Module :: Package            [content-package]
INFO 
INFO ------------< com.example.pipeline:pipeline-test >-------------
INFO Building Pipeline Test 1.3.0-SNAPSHOT                          [1/4]
INFO --------------------------------[ pom ]---------------------------------
INFO 
INFO --- versions-maven-plugin:2.8.1:set (default-cli) @ pipeline-test ---
INFO Local aggregation root: /builds/pipeline-test
INFO Processing change of com.example.pipeline:pipeline-test:1.3.0-SNAPSHOT -> 1.2.0
INFO Processing com.example.pipeline:pipeline-test
INFO     Updating project com.example.pipeline:pipeline-test
INFO         from version 1.3.0-SNAPSHOT to 1.2.0
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module
INFO     Updating parent com.example.pipeline:pipeline-test
INFO         from version 1.3.0-SNAPSHOT to 1.2.0
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module-core
INFO     Updating parent com.example.pipeline.test:pipeline-test-module
INFO         from version 1.3.0-SNAPSHOT to 1.2.0
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module-package
INFO     Updating parent com.example.pipeline.test:pipeline-test-module
INFO         from version 1.3.0-SNAPSHOT to 1.2.0
INFO 
INFO ------------------------------------------------------------------------
INFO Reactor Summary for Pipeline Test 1.3.0-SNAPSHOT:
INFO 
INFO Pipeline Test .................................. SUCCESS [  1.354 s]
INFO Pipeline Test :: Test Module ................... SKIPPED
INFO Pipeline Test :: Test Module :: Core ........... SKIPPED
INFO Pipeline Test :: Test Module :: Package ........ SKIPPED
INFO ------------------------------------------------------------------------
INFO BUILD SUCCESS
INFO ------------------------------------------------------------------------
INFO Total time:  5.101 s
INFO Finished at: 2022-05-13T16:55:52Z
INFO ------------------------------------------------------------------------

[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0
[INFO] Committing changes.
[develop 06d319d] Update develop to production version to avoid merge conflicts
 4 files changed, 4 insertions(+), 4 deletions(-)
[INFO] Merging (--no-ff) '1.2.0' branch.
Merge made by the 'recursive' strategy.
[INFO] Updating version(s) to '1.3.0-SNAPSHOT'.
INFO Scanning for projects...
WARNING Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.2.0
INFO ------------------------------------------------------------------------
INFO Reactor Build Order:
INFO 
INFO Pipeline Test                                              [pom]
INFO Pipeline Test :: Test Module                                   [pom]
INFO Pipeline Test :: Test Module :: Core                        [bundle]
INFO Pipeline Test :: Test Module :: Package            [content-package]
INFO 
INFO ------------< com.example.pipeline:pipeline-test >-------------
INFO Building Pipeline Test 1.2.0                                   [1/4]
INFO --------------------------------[ pom ]---------------------------------
INFO 
INFO --- versions-maven-plugin:2.8.1:set (default-cli) @ pipeline-test ---
INFO Local aggregation root: /builds/pipeline-test
INFO Processing change of com.example.pipeline:pipeline-test:1.2.0 -> 1.3.0-SNAPSHOT
INFO Processing com.example.pipeline:pipeline-test
INFO     Updating project com.example.pipeline:pipeline-test
INFO         from version 1.2.0 to 1.3.0-SNAPSHOT
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module
INFO     Updating parent com.example.pipeline:pipeline-test
INFO         from version 1.2.0 to 1.3.0-SNAPSHOT
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module-core
INFO     Updating parent com.example.pipeline.test:pipeline-test-module
INFO         from version 1.2.0 to 1.3.0-SNAPSHOT
INFO 
INFO Processing com.example.pipeline.test:pipeline-test-module-package
INFO     Updating parent com.example.pipeline.test:pipeline-test-module
INFO         from version 1.2.0 to 1.3.0-SNAPSHOT
INFO 
INFO ------------------------------------------------------------------------
INFO Reactor Summary for Pipeline Test 1.2.0:
INFO 
INFO Pipeline Test .................................. SUCCESS [  0.975 s]
INFO Pipeline Test :: Test Module ................... SKIPPED
INFO Pipeline Test :: Test Module :: Core ........... SKIPPED
INFO Pipeline Test :: Test Module :: Package ........ SKIPPED
INFO ------------------------------------------------------------------------
INFO BUILD SUCCESS
INFO ------------------------------------------------------------------------
INFO Total time:  4.747 s
INFO Finished at: 2022-05-13T16:56:00Z
INFO ------------------------------------------------------------------------

[WARNING] Failed to build parent project for com.example.pipeline:pipeline-test:pom:1.3.0-SNAPSHOT
[INFO] Committing changes.
[develop e6153ac] Update develop version back to pre-merge state
 4 files changed, 4 insertions(+), 4 deletions(-)
[INFO] Pushing 'main' branch to 'origin'.
Branch 'main' set up to track remote branch 'main' from 'origin'.
[INFO] Pushing 'develop' branch to 'origin'.
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
[INFO] Deleting remote branch 'release/1.2.0' from 'origin'.
[WARNING] There were some problems deleting remote branch 'release/1.2.0' from 'origin'.
[INFO] Deleting 'release/1.2.0' branch.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Pipeline Test 1.2.0-SNAPSHOT:
[INFO] 
[INFO] Pipeline Test .................................. FAILURE [ 51.187 s]
[INFO] Pipeline Test :: Test Module ................... SKIPPED
[INFO] Pipeline Test :: Test Module :: Core ........... SKIPPED
[INFO] Pipeline Test :: Test Module :: Package ........ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  55.352 s
[INFO] Finished at: 2022-05-13T16:56:03Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.18.0:release-finish (default-cli) on project pipeline-test: release-finish: warning: not deleting branch 'release/1.2.0' that is not yet merged to
[ERROR]          'refs/remotes/origin/release/1.2.0', even though it is merged to HEAD.
[ERROR] error: The branch 'release/1.2.0' is not fully merged.
[ERROR] If you are sure you want to delete it, run 'git branch -D release/1.2.0'.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.18.0:release-finish (default-cli) on project pipeline-test: release-finish
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoFailureException: release-finish
    at com.amashchenko.maven.plugin.gitflow.GitFlowReleaseFinishMojo.execute (GitFlowReleaseFinishMojo.java:392)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoFailureException: warning: not deleting branch 'release/1.2.0' that is not yet merged to
         'refs/remotes/origin/release/1.2.0', even though it is merged to HEAD.
error: The branch 'release/1.2.0' is not fully merged.
If you are sure you want to delete it, run 'git branch -D release/1.2.0'.

    at com.amashchenko.maven.plugin.gitflow.AbstractGitFlowMojo.executeCommand (AbstractGitFlowMojo.java:1382)
    at com.amashchenko.maven.plugin.gitflow.AbstractGitFlowMojo.executeGitCommand (AbstractGitFlowMojo.java:1308)
    at com.amashchenko.maven.plugin.gitflow.AbstractGitFlowMojo.gitBranchDelete (AbstractGitFlowMojo.java:943)
    at com.amashchenko.maven.plugin.gitflow.GitFlowReleaseFinishMojo.execute (GitFlowReleaseFinishMojo.java:389)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
section_end:1652460964:step_script
section_start:1652460964:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1652460966:cleanup_file_variables
ERROR: Job failed: exit code 1
@aleksandr-m
Copy link
Owner

@jenslauterbach I've tested releasing with your commands, and everything seems to work for me.

Have you resolved previous issue with detached head? Maybe this one is also related to checkout process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants