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

execute "mvn clean" and "mvn install" separately in build plan

    • Icon: Suggestion Suggestion
    • Resolution: Duplicate
    • None
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      as opposed to specifying |clean install| as goals in a build plan which leads to
      $ mvn clean install

      the maven targets should be separated so there are 2 or more iteration of maven: |clean | install | which would lead to:
      $ mvn clean
      $ mvn install

      This ensures that all modules are cleaned before the install. Otherwise clean install is run on a module by module basis.

            [BAM-3171] execute "mvn clean" and "mvn install" separately in build plan

            AntonA added a comment -

            I think what Rene says will work for Bamboo 2.7.

            If this is not sufficient for some reason, I think the request for this functionality is captured in BAM-1410, so I will resolve this issue as a duplicate.

            AntonA added a comment - I think what Rene says will work for Bamboo 2.7. If this is not sufficient for some reason, I think the request for this functionality is captured in BAM-1410 , so I will resolve this issue as a duplicate.

            Then here Project A would have its own plan with presumably 1 Stage and 1 Job and Project B would depend on it.

            OR

            Both Projects in the Same plan where Plan A is in 1 Stage and Plan B is in the other stage.

            OR

            write an additional maven goal to wrap-up your lifecycle if you want to drive it inside your CI.

            Rene Medellin [Atlassian] added a comment - Then here Project A would have its own plan with presumably 1 Stage and 1 Job and Project B would depend on it. OR Both Projects in the Same plan where Plan A is in 1 Stage and Plan B is in the other stage. OR write an additional maven goal to wrap-up your lifecycle if you want to drive it inside your CI.

            I do not agree!
            Instead of using

            mvn clean ; mvn install

            I would perfer use the example:

            mvn install; mvn deploy

            Imagine two projects:

            • Parent project
              • Project A
              • Project B depending on A

            Now imagine that project B contains some tests that depends on project A and are failing due to a change on project A. If you do (on the parent project)

            mvn install ; mvn deploy
            

            The install phase will fail on project B and deploy will not be called.
            If you execute

            mvn install deploy (or simply mvn deploy)
            

            The project A will be deployed even if project B is failing.

            Samuel Vetsch added a comment - I do not agree! Instead of using mvn clean ; mvn install I would perfer use the example: mvn install; mvn deploy Imagine two projects: Parent project Project A Project B depending on A Now imagine that project B contains some tests that depends on project A and are failing due to a change on project A. If you do (on the parent project) mvn install ; mvn deploy The install phase will fail on project B and deploy will not be called. If you execute mvn install deploy (or simply mvn deploy) The project A will be deployed even if project B is failing.

            My 5 cents:
            As Ulrich noticed there is a technical difference betweeen mvn clean; mvn install and mvn clean install. However a well constructed project shall not be vulnerable to this difference. All Bamboo builds are being build and tested using a mvn clean install command.

            Krystian Brazulewicz added a comment - My 5 cents: As Ulrich noticed there is a technical difference betweeen mvn clean; mvn install and mvn clean install . However a well constructed project shall not be vulnerable to this difference. All Bamboo builds are being build and tested using a mvn clean install command.

              Unassigned Unassigned
              ukuhnhardt Ulrich Kuhnhardt [Atlassian]
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: