Here is a my file system setup:
.m2/ <--- Local Directory
app/
pom.xml
module1/
module2/
module3/
target/ <--- Package directory
Question A
In the parent pom.xml
, it has a dependency that all the modules depend upon. Though, when it goes into compile
phase, module2
will need to depend on something that just compiled in module1
and module3
needs to depend on something in module2
. How would you go about doing this without making two or three "maven projects"? Is it possible to run the compile
, install
, and package
phases on each module individually one at a time (I'd rather do this solution)?
Question B
Also, I know when you install
the module, all the "stuff" is updated and added to the local repo. When you are in the compile
phase, by default, it grabs all the stuff it needs to depend on from the local repo (Correct if I'm wrong). Also, if I were able to achieve Question A, instead of using the local repo to obtain all the information needed for my dependencies, it possible use those same files from the packaged target
directory instead?
Can these questions be answered by a simple pom manipulation and/or adding a plug-in? If this is possible, how would I go about doing this?