“Git fatal: ref HEAD is not a symbolic ref” while using maven release plugin

后端 未结 10 664
后悔当初
后悔当初 2020-12-23 02:58

I get the following error output while running the Maven release plugin prepare step i.e. mvn release:prepare --batch-mode -DreleaseVersion=1.1.2 -DdevelopmentVersion=

相关标签:
10条回答
  • 2020-12-23 03:14

    For Jenkins and GIT add the additional behaviour check out to specific local branch and use the Workspace Cleanup Plugin to clean your workspace to the beginning of your CI job.

    0 讨论(0)
  • 2020-12-23 03:15

    Unchecking the Use shallow clones was not sufficient in my case (I'm using Bamboo 5.7.2). I needed to also enable Force Clean Build in the Source Code Checkout task. Enabling the Use shallow clones would work for the next execution of the job, but all subsequent execution would result in the same error.

    0 讨论(0)
  • 2020-12-23 03:15

    For us the issue was with maven version specified in the pom file. Corrected the maven version specified in the pom file in accordance with the one in bamboo fixed the issue

    0 讨论(0)
  • 2020-12-23 03:27

    I have seen this problem under Bamboo used with Maven Release plug-in. I've fixed it by enabling the option 'Force Clean Build' in the 'Source Checkout' task. Bamboo says this might make the build slower, but it works and I didn't seen any significant time increase.

    0 讨论(0)
提交回复
热议问题