Maven reactor builds in order that doesn't satisfy all dependencies
I installed all your projects with all versions set to 1.0
here. Then I changed the versions as you stated and got the same error.
After changing the reactor
POM to:
<modules>
<module>jar1</module>
<module>jar2</module>
<module>jar3</module>
</modules>
... the build succeeded.
I looked at Guide to Working with Multiple Modules, Reactor Sorting and the last option there is:
- the order declared in the
<modules>
element (if no other rule applies)
After reading the next sentence:
Note that only "instantiated" references are used -
dependencyManagement
andpluginManagement
elements will not cause a change to the reactor sort order
- I restored the
reactor
POM - I commented the
<dependencyManagement>
section in theparent
POM and added<version>
to thejar2
andjar3
POMs explicitly
and the build succeeded with:
[INFO] Reactor Build Order
[INFO]
[INFO] jar3
[INFO] jar1
[INFO] jar2
[INFO] reactor