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=
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.
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.
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
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.