I have a maven multi-module project whose parent POM states:
<modules>
<module>ui</module>
<module>controller</module> <!-- Depends on ui module -->
</modules>
The following runs fine:
project-root> mvn clean package
However problems arise if I try:
project-root/controller> mvn clean package
The error reports the ui
artifact as an unresolved dependency.
Yes, I realize that this question has been asked before. However it has no clear answer (the accepted answer for that instance is only a workaround). This behavior is explained away as a difference between dependency resolution and reactor builds. A post about Maven 3 suggests that it is resolved in that released. I am using Maven 3.0.3 and see no relief. Maven 3.0.4's release notes don't suggest a change in this behavior.
How do you handle such a situation? Is the only recourse to do a build from the project-root
every time?