We have a project that recently switched from ant and crappy CLI tools to maven,
our current structure is:
- parent
- main-project:
- sub-module-A:
- sub-module-B:
Each one of these projects is in it's own repository and they are linked through pom files parent has all three projects defined in tags and main-project defines both sub modules as dependencies.
the issue at hand:
Since main-project is where I deploy the site (in this case) I want to make sure that the sources of both modules are updated when I run it which means I want to compile if needed both sub modules when I run mvn install
on the main-project.
I tried using mvn-exec-plugin to build both but it's not actually building anything.
Any idea how to fix this?
edit: I am running mvn appengine:run
from main-project
and want the sources from sub-modules A and B to install if needed
Assuming your
main-project
has dependencies onsub-module-A
andsub-module-B
and the parent has all projects as modules, i. e.parent
main-project
Then, you can build the
parent
project withor using shortcuts for the options
With these options only the
main-project
and all its dependencies (which are somewhere in theparent
's modules) are built.See this and this for more information.