Continuum

Continuum does not respect build order for flat projects

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.1-beta-3
  • Fix Version/s: 1.1-beta-4
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP/2003 Server, Maven 2.0.7
  • Complexity:
    Intermediate
  • Number of attachments :
    1

Description

When adding maven 2 projects with flat project layout continuum sorts the projects build sequence by alphabet thus braking builds. Previous version did respect reactor build sequence and '--non-recursive' option allowed to build flat projects independently but still in the right order. This is a very blocking issue for us because we are forced atm to use flat project structure.

Activity

Hide
Emmanuel Venisse added a comment -

When Continuum determine the build order, he don't know if it is a flat project or a standard structure. It look only at dependencies in POMs to determine which projects must be built before an other.
If it build projects in alphabet order it isn't because you use a flat structure but something else.

what is the cron expression for your schedule?
do you have a cycle in your dependencies (check your logs when projects are put in queue)?

Show
Emmanuel Venisse added a comment - When Continuum determine the build order, he don't know if it is a flat project or a standard structure. It look only at dependencies in POMs to determine which projects must be built before an other. If it build projects in alphabet order it isn't because you use a flat structure but something else. what is the cron expression for your schedule? do you have a cycle in your dependencies (check your logs when projects are put in queue)?
Hide
Siarhei Dudzin added a comment -

We use default schedule, same happens if I just use "build all projects" in a group, it just builds from top to bottom (thus list order defines the build order).

We have the following dependencies (all flat structure):

A (parent), has modules listed in the following order: B, C, D, E
B (ear), has dependencies on: C (war), D(ejb)
C (war) has dependencies on D (type ejb, scope provided), E (type jar)
D (ejb) has dependencies on E (jar)
E (jar) has no other dependencies

As you can see there are not circular dependencies (otherwise maven would not build I imagine).

The parent project has modules listed like this:

<module>../E</module>
<module>../D</module>
<module>../C</module>
<module>../B</module>

Each sub project has a relative path to the parent pom:

<relativePath>../A/pom.xml</relativePath>

I have the same project working in beta 2 only because it sorted the modules in the right order (still if I add an extra module to the group it does not reorder them but adds at the end thus forcing me to delete the projects from continuum and re-add them). I have not figured another way to build flat projects in continuum.

Show
Siarhei Dudzin added a comment - We use default schedule, same happens if I just use "build all projects" in a group, it just builds from top to bottom (thus list order defines the build order). We have the following dependencies (all flat structure): A (parent), has modules listed in the following order: B, C, D, E B (ear), has dependencies on: C (war), D(ejb) C (war) has dependencies on D (type ejb, scope provided), E (type jar) D (ejb) has dependencies on E (jar) E (jar) has no other dependencies As you can see there are not circular dependencies (otherwise maven would not build I imagine). The parent project has modules listed like this: <module>../E</module> <module>../D</module> <module>../C</module> <module>../B</module> Each sub project has a relative path to the parent pom: <relativePath>../A/pom.xml</relativePath> I have the same project working in beta 2 only because it sorted the modules in the right order (still if I add an extra module to the group it does not reorder them but adds at the end thus forcing me to delete the projects from continuum and re-add them). I have not figured another way to build flat projects in continuum.
Hide
Siarhei Dudzin added a comment -

Small correction, the reactor build order is specified as I have given in the example with <module/> sections (sorry was a bit misleading in the beginning).

Show
Siarhei Dudzin added a comment - Small correction, the reactor build order is specified as I have given in the example with <module/> sections (sorry was a bit misleading in the beginning).
Hide
Emmanuel Venisse added a comment -

maven and Continuum don't use the order in the modules list to found the build order, all is based on dependencies analyze.

Can you attach a sample project that reproduce your issue?

Show
Emmanuel Venisse added a comment - maven and Continuum don't use the order in the modules list to found the build order, all is based on dependencies analyze. Can you attach a sample project that reproduce your issue?
Hide
Siarhei Dudzin added a comment -

Ok, attaching the example project. As you can see it adds the projects in alphabetic order. Another problem is that relative both paths and scm connection url for sub-projects are also not respected - I have to change scm urls in continuum for each project except project 'a' (the parent project). Project a is also the project I add (as parent ) to continuum.

While reactor build order (log from maven):

[INFO] Reactor build order:
[INFO] a
[INFO] e
[INFO] d
[INFO] c
[INFO] b

This is the order what I get in continuum:

Project Name
a
b
c
d
e

Hope this helps.

Show
Siarhei Dudzin added a comment - Ok, attaching the example project. As you can see it adds the projects in alphabetic order. Another problem is that relative both paths and scm connection url for sub-projects are also not respected - I have to change scm urls in continuum for each project except project 'a' (the parent project). Project a is also the project I add (as parent ) to continuum. While reactor build order (log from maven): [INFO] Reactor build order: [INFO] a [INFO] e [INFO] d [INFO] c [INFO] b This is the order what I get in continuum: Project Name a b c d e Hope this helps.
Hide
Siarhei Dudzin added a comment -

I've used file system in scm info, so you would need to modify it for all modules, for the rest it should work out of the box.

Show
Siarhei Dudzin added a comment - I've used file system in scm info, so you would need to modify it for all modules, for the rest it should work out of the box.
Hide
Emmanuel Venisse added a comment -

The build order is correct on your test project. I get this in logs:

jvm 1    | 2007-10-22 11:42:49,343 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'a' with build definition 'default maven2 buildDefinition' - id=6).
jvm 1    | 2007-10-22 11:42:49,609 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'e' with build definition 'default maven2 buildDefinition' - id=6).
jvm 1    | 2007-10-22 11:42:49,687 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'd' with build definition 'default maven2 buildDefinition' - id=6).
jvm 1    | 2007-10-22 11:42:49,750 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'c' with build definition 'default maven2 buildDefinition' - id=6).
jvm 1    | 2007-10-22 11:42:49,953 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'b' with build definition 'default maven2 buildDefinition' - id=6).

I don't know where you see the order a,b, c, d, e, if it is in the project group summary page, it is normal because projects are sorted in alphabetical order and this list is independant of the build order

Show
Emmanuel Venisse added a comment - The build order is correct on your test project. I get this in logs:
jvm 1    | 2007-10-22 11:42:49,343 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'a' with build definition 'default maven2 buildDefinition' - id=6).
jvm 1    | 2007-10-22 11:42:49,609 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'e' with build definition 'default maven2 buildDefinition' - id=6).
jvm 1    | 2007-10-22 11:42:49,687 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'd' with build definition 'default maven2 buildDefinition' - id=6).
jvm 1    | 2007-10-22 11:42:49,750 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'c' with build definition 'default maven2 buildDefinition' - id=6).
jvm 1    | 2007-10-22 11:42:49,953 [SocketListener0-0] INFO  org.apache.maven.continuum.Continuum:default  - Enqueuing 'b' with build definition 'default maven2 buildDefinition' - id=6).
I don't know where you see the order a,b, c, d, e, if it is in the project group summary page, it is normal because projects are sorted in alphabetical order and this list is independant of the build order

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: