title: Maven and dependent modules
body: <p>Colleagues have been touting the wonders of maven and its magical dependency stuff but I'm finding that it fails at what I would consider the obvious use.</p>
  
  <p>Suppose I have a root folder with a master POM.</p>
  
  <p>Then underneath I have some projects, call them A and B</p>
  
  <p>B requires A and so the POM in the B folder has the appropriate dependency entry in it</p>
  
  <p>Now, back in the root folder, in a profile, I specify that I want to build B.</p>
  
  <p>When I perform the usual    mvn clean install, I get a failure because A was not built.</p>
  
  <p>My friends tell me I have to specify both A and B in that main profile in the root. </p>
  
  <p>But isn't the whole point of dependency management that maven sees B, goes to the B POM file where it sees the dependency on A and so it should go build A automatically.</p>