Github user neykov commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/753#issuecomment-122256865
I don't agree it's a hack - it relies on documented maven behaviour.
1) Maven doesn't provide a mechanism to declare a build-time dependency.
Adding a dependency to the `jsgui` war file means that it will be included in
all project which include `launcher` as a (transitive) dependency. Also it will
appear everywhere dependencies are copied (i.e. when using assembly plugin, as
the dist project does). To avoid this `jsgui` would have to be excluded from
each dependency to `launcher` which is far from ideal (this includes downstream
projects).
2) From
http://maven.apache.org/guides/mini/guide-multiple-modules.html#Reactor_Sorting
on build order sorting:
```
the order declared in the <modules> element (if no other rule applies)
```
Having in mind 1 & 2 I decided that defining the build order in the reactor
is the best option.
The solution is a nuisance of course - it shifts the responsibility to keep
the build order on the developers, but it's not that big of a deal. Any
suggestions to improve it are welcome.
As for breaking the alphabetical sorting - I find it easier to find the
projects if they follow build order, but that's a bike shedding discussion and
not the reason for the reorder. Some of the modules had to be pulled down to
let jsgui build on time. As for examples and QA - it's nice to have dist built
as soon as possible when developing, while having the leaf projects built
afterwards to confirm the successful changes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---