I have several maven modules: common, A, B, C. I wonder if it is possible to include the common module as a compilation unit in the other three modules.
I tried this by declaring the common module with
<packaging>pom</packaging>
and in module A, I included common as a dependency:
<dependencies>
<dependency>
<groupId>group.id</groupId>
<artifactId>common</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
However, when I do
mvn clean compile
on the whole project, there is an error thrown when compiling module A:
Could not transfer artifact group.id:common:jar:1.0 from ..
It is trying to download the get the common dependency from the maven remote repository. I do not want to do that: I do not want to install common module on the local or remote repository. I just want to compile common and include the compiled classes in the other modules.
It is possible to do that? I am also using spring boot.