Note that there are some explanatory texts on larger screens.

plurals
  1. POManaging Maven multimodule build while inheriting from parent pom
    text
    copied!<p>In a nutshell, what I am trying to do is build a bunch of libraries and applications, all Maven projects, all at once. From what I understand a way to accomplish this just in one command line run of <code>mvn package</code> would be to create a multimodule project that will list each module that I would like to build, throw them in the Maven reactor, and build.</p> <p>Following examples in the Maven book it seems that normally a multimodule <code>pom</code> sits in a directory above the individual modules. However it is also normally the case that a parent <code>pom</code> sits in a directory above the modules, which raises the question, is it normally the case that a multimodule build should also be a parent? I think not; however I wonder why I am running into this funny design quirk.</p> <p>So, I'm wondering the right way to set this up. I see the following conventions / requirements:</p> <ul> <li>The multimodule <code>pom</code> must have knowledge of where the other modules live on disc. Since it is actually doing the build from source it can't simply rely on already installed versions (since it's installing them!)</li> <li>The parent doesn't actually have to be a physical directory up although that would be preferable. I see this as the convention best to break.</li> <li>Really the individual libraries/application shouldn't even need to know they are being built as part of a multimodule build.</li> </ul> <p>How is this usually set up in a multimodule build? Is there a simpler way to manage building multiple Maven projects all at once?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload