Given
<modules>
<module>A</module>
<module>B</module>
</module>
</modules>
in a parent pom.xml
. And in B/pom.xml
<dependency>
<groupId>foo.bar</groupId>
<artifactId>A</artifactId>
</dependency>
Then - what is the process here? It feels "wrong" to need to do
mvn -pl A clean package install
and then
mvn -pl B clean package
in order to get the A dependency of B available before building the latter. It seems maven should know how to sort this out. What am I missing?
Update In response to (good) questions from @Tunaki
Both A and B have :
<parent>
<groupId>org.myco.mypkg</groupId>
<artifactId>parent</artifactId>
<version>1.0.0</version>
</parent>
And the GAV is correct for A and also correctly referenced in B
<groupId>org.myco.mypkg</groupId>
<artifactId>A</artifactId>
<name>Name of A</name>
<version>1.0.0</version>