Continuum
  1. Continuum
  2. CONTINUUM-1915

Continuum 1.2 does not build the project when it has changes in sub-modules and the m2 build is recursive

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2.3
    • Component/s: Integration - Maven 2
    • Labels:
      None
    • Environment:
      Linux
    • Complexity:
      Intermediate
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      Log shows:
      2008-10-01 18:00:04,701 [pool-1-thread-1] INFO action#update-working-directory-from-scm - Updated 2 files.
      2008-10-01 18:00:04,732 [pool-1-thread-1] INFO buildController - Merging SCM results
      2008-10-01 18:00:05,011 [pool-1-thread-1] INFO continuumBuildExecutor#maven2 - Changes are only in sub-modules.
      2008-10-01 18:00:05,019 [pool-1-thread-1] INFO buildController - No changes in the current project, not building

      In continuum, the working copy looks like this

      • parent-md
      • mycommon
      • myintegration
      • mybusiness
      • mydo
      • pom.xml

      the pom.xml is used for adding project into continuum

      the pom.xml consist of those projects

      <modules>
      <module>parent-md</module>
      <module>mycommon</module>
      <module>myintegration</module>
      <module>mybusiness</module>
      <module>mydo</module>
      </modules>

      parent-md is the parentpom for all project listed

      After developer making changes in sub-modules ex: myintegration in SVN, continuum detects the changes during schedule run but nothing gets built even myintegration itslef. This model works well in 1.1.

      Now all of our 10+ projects with 50+ sub-modules in total stop building by schedule.

        Issue Links

          Activity

          Hide
          apache maillist added a comment -

          by the way, when I add the project, I checked "For multi modules project, load only root as recursive build", otherwise, continuum checks out all child projects as a flat structure.

          Show
          apache maillist added a comment - by the way, when I add the project, I checked "For multi modules project, load only root as recursive build", otherwise, continuum checks out all child projects as a flat structure.
          Hide
          Wendy Smoak added a comment -

          Linking to CONTINUUM-1807 - this was an intentional change in Continuum 1.2

          ... and the discussion thread http://www.nabble.com/Continuum-1.2-build-does-not-build-the-project-when-it-has-change-in-sub-modules-td19770898.html

          Show
          Wendy Smoak added a comment - Linking to CONTINUUM-1807 - this was an intentional change in Continuum 1.2 ... and the discussion thread http://www.nabble.com/Continuum-1.2-build-does-not-build-the-project-when-it-has-change-in-sub-modules-td19770898.html
          Hide
          Geert Pante added a comment -

          So, just to be clear: you have a recursive build, so in Continuum you only see the 10 top projects?
          Then it's logical that your sub-module will never be built separately.
          But the change in CONTINUUM-1807 should not apply for you: you probably want to launch your recursive build.

          Wendy, can you check if the change in CONTINUUM-1807 makes an exception for recursive builds?
          The change in CONTINUUM-1807 may only affect non-recursive builds.

          I don't know if there's an easy way to parse build definitions to detect if they're recursive or not. Maybe just looking for the absence of "--non-recursive" will do.

          Show
          Geert Pante added a comment - So, just to be clear: you have a recursive build, so in Continuum you only see the 10 top projects? Then it's logical that your sub-module will never be built separately. But the change in CONTINUUM-1807 should not apply for you: you probably want to launch your recursive build. Wendy, can you check if the change in CONTINUUM-1807 makes an exception for recursive builds? The change in CONTINUUM-1807 may only affect non-recursive builds. I don't know if there's an easy way to parse build definitions to detect if they're recursive or not. Maybe just looking for the absence of "--non-recursive" will do.
          Hide
          apache maillist added a comment -

          Yes, I see 10 top projects; all sub modules are showing only on the "working copy" for each project. I have taken out "--non-recursive". The situation we have now is the developer changed code in sub module, nothing get built even for the sub module that was changed.

          Show
          apache maillist added a comment - Yes, I see 10 top projects; all sub modules are showing only on the "working copy" for each project. I have taken out "--non-recursive". The situation we have now is the developer changed code in sub module, nothing get built even for the sub module that was changed.
          Hide
          Larvell Jones added a comment - - edited

          shouldBuild in MavenTwoBuildExecutor is using incorrect logic to determine if build is recursive.

          boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) && !(
                      buildDefinition.getArguments().indexOf( "-N" ) < 0 ||
                          buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 );
          

          Should be:

          boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) && (
                      buildDefinition.getArguments().indexOf( "-N" ) < 0 && 
                          buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 );
          
          Show
          Larvell Jones added a comment - - edited shouldBuild in MavenTwoBuildExecutor is using incorrect logic to determine if build is recursive. boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) && !( buildDefinition.getArguments().indexOf( "-N" ) < 0 || buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 ); Should be: boolean isRecursive = StringUtils.isNotEmpty( buildDefinition.getArguments() ) && ( buildDefinition.getArguments().indexOf( "-N" ) < 0 && buildDefinition.getArguments().indexOf( "--non-recursive" ) < 0 );
          Hide
          Johan Larsson added a comment -

          Thanks for the start! But that will just make it build all the time, because the isRecursive check is to early in the method and if the arguments is empty it will not think it can be recursive.

          I have attachad a diff which at least on my side seems to work as expected.

          Show
          Johan Larsson added a comment - Thanks for the start! But that will just make it build all the time, because the isRecursive check is to early in the method and if the arguments is empty it will not think it can be recursive. I have attachad a diff which at least on my side seems to work as expected.
          Hide
          Johan Larsson added a comment -

          Fix for isRecursive issue. Diff is against continuum-1.2.2.

          Show
          Johan Larsson added a comment - Fix for isRecursive issue. Diff is against continuum-1.2.2.
          Hide
          Olivier Lamy added a comment -

          fix in 1.2.x branch rev 723119
          merge in trunk rev 723121
          Attached patch not used

          Show
          Olivier Lamy added a comment - fix in 1.2.x branch rev 723119 merge in trunk rev 723121 Attached patch not used

            People

            • Assignee:
              Olivier Lamy
              Reporter:
              apache maillist
            • Votes:
              6 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: