Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-1061

Not able to stop version increment in pom.xml with the release prepare

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5.3
    • None
    • prepare
    • None

    Description

      Hello Team,

      Here is my requirement:

      I have two profiles (32 Bit and 64 Bit) in my pom.xml. And I want them to be executed one by one and expecting (tasks release prepare and release perform) them to push build artifacts in artifact repository.

      • Expected points :
        • For 32 Bit and 64 Bit separate .jar will be created with the same version (1.0) as per below expected directory structure.

      -->ABC

          --> 32 Bit

                  --> 1.0
                          ABC_32Bit-1.0.jar
         --> 64 Bit

                 --> 1.0

                        ABC_64Bit-1.0.jar

      • Problem facing : 
        • We have a Bamboo plan with two tasks. 
        • 1. for 32 Bit -->release:prepare release:perform -P "32Bit,!64Bit" 
        • 2. for 64 Bit -->release:prepare release:perform -P "!32Bit,64Bit" 
        • But, when task 1 for 32 Bit is getting executed it increment the version number (2.0) in pom.xml file. Pushes the builds in artifacts repository with the notation (ABC_32Bit-1.0.jar)
        • 64 Bit task uses that newly updated pom.xml file with (2.0), it creates build on that version. And updates the version (3.0) in pom.xml file. Pushes the builds in artifacts repository with the notation (ABC_64Bit-2.0.jar)
        • So, finally we get directory structure as below, which is not expected.

      --> ABC    

           --> 32 Bit

                  --> 1.0
                          ABC_32Bit-1.0.jar
            --> 64 Bit

                   --> 2.0

                        ABC_64Bit-2.0.jar

      I have even tried to use release:rollback command in between above mentioned tasks. After executing 32 Bit task to make pom.xml file fresh (before executing 32 Bit profile) for executing 64 Bit profile to avoid version increment in pom.xml.
      Again it is not working and giving error as "cannot restore from a missing backup POM" 

      • 1. for 32 Bit -->release:prepare release:perform -P "32Bit,!64Bit" 
      • 2. release:rollback
      • 3. for 64 Bit -->release:prepare release:perform -P "!32Bit,64Bit"

      Hope you guys got my problem. If not feel free to open discussion.

      Thanks

      Attachments

        Activity

          People

            Unassigned Unassigned
            n.ramani Nikunj Ramani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: