objective::
give::
3 projects
AA, BB, CC
; under developing.AA
= master projectCC
depends onBB
requirement::
I dont want to modify the subprojects.
I want to manage the dependency in a master project
AA
.ie: add dependency through the
pom
inAA
, not inBB or CC
.
problem::
so I use Maven module
, and I tried this, didnt work::
- link the modules together in
AA
.
<modules>
<module>../BB</module>
<module>../CC</module>
</modules>
- but then,
CC
is not able to importClassB
fromBB
.

=> How can I make CC
depends on BB
when only editing the pom
in AA
?
the common solution (that I try to avoid)::
I do know that, if I add dependency in the pom of CC
, everything is fine, but I dont want to do this::
- add dependency in the pom of
CC
<dependencies>
<dependency>
<groupId>GG</groupId>
<artifactId>BB</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
- now,
CC
is able to importClassB
fromBB
.

btw: some online answers say you need
maven install
then add thejar
.here, I dont want to build a
jar
ofBB
. (as it wouldnt & dont-need-to produce ajar
even if you use the "common solution" I wrote above.)cuz
BB
is under developing, it will be constantly modified.even if I use
jar
, I dont see how it helps in my case.
(in this case, the master project
AA
for<parent>
inCC
may not even be needed.)
Some resource that I looked through, I dont know why in my case it doesnt work::
Did I understand Maven module
wrong?
How do I add a project as a dependency of another project?
https://www.jetbrains.com/help/idea/maven-support.html#maven_multi_module
how to add dependency of other maven project to my current maven project in java eclipse?
How can a maven project depend on another local maven project?