Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-7904

mvn release:prepare fails with 'Cannot prepare the release because you have local modifications'

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Highest Highest
    • None
    • None
    • None
    • None

      Can't perform maven release prepare.

      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Cannot prepare the release because you have local modifications :
      [build-number.txt:unknown]

      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch

      Maven job parameters:

      clean release:prepare -Darguments='-Dmaven.test.skip=true' --batch-mode

      Also tried
      clean release:prepare -Darguments='-Dmaven.test.skip=true'

            [BAM-7904] mvn release:prepare fails with 'Cannot prepare the release because you have local modifications'

            If build-number.txt is checked in, you will need to delete it from the repository. After that you have to ensure that build-number.txt does not get checked in to svn.

            For the given project. Change to the project root directory and make sure it's deleted from the repository first.

            svn revert build-number.txt
            svn delete build-number.txt
            

            If build-number.txt isn't n the repository, you will get errors you can ignore.

            Then ensure it doesn't get checked in any more.

            svn propedit svn:ignore build-number.txt
            svn -m 'ingore build-number.txt' commit
            

            To set this globally, you need to make 'build-number.txt' you will need to modify the svn server configuration. See svn documentation for the Runtime Configuration Area for specifics, but the configuration line should be something like:

            global-ignores = build-number.txt
            

            Lou Springer added a comment - If build-number.txt is checked in, you will need to delete it from the repository. After that you have to ensure that build-number.txt does not get checked in to svn. For the given project. Change to the project root directory and make sure it's deleted from the repository first. svn revert build-number.txt svn delete build-number.txt If build-number.txt isn't n the repository, you will get errors you can ignore. Then ensure it doesn't get checked in any more. svn propedit svn:ignore build-number.txt svn -m 'ingore build-number.txt' commit To set this globally, you need to make 'build-number.txt' you will need to modify the svn server configuration. See svn documentation for the Runtime Configuration Area for specifics, but the configuration line should be something like: global-ignores = build-number.txt

            JohnV added a comment -

            Louis, What did you do specifically I can't get it to work.

            JohnV added a comment - Louis, What did you do specifically I can't get it to work.

            AntonA added a comment -

            Thanks for the update.

            AntonA added a comment - Thanks for the update.

            This is a dup of http://jira.atlassian.com/browse/BAM-5527

            I have been able to successfully mitigate the issue by adding build-number.txt to svn:ignore.

            Lou Springer added a comment - This is a dup of http://jira.atlassian.com/browse/BAM-5527 I have been able to successfully mitigate the issue by adding build-number.txt to svn:ignore.

              Unassigned Unassigned
              12f4729fb845 Lou Springer
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: