I'm consulting a question on using pom-packaging maven project as dependency in another project. I tried reading the documentation of maven and searching online, but I found few solution.
The pom-packaging project consists of multiple submodules which are jar-packaging, analogous to:
<project ...>
<groupId>the.pom.project</groupId>
<artifactId>pom-project</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<modules>
<module>a-pom-module</module>
<module>b-pom-module</module>
<module>c-pom-module</module>
<module>d-pom-module</module>
<module>e-pom-module</module>
<module>f-pom-module</module>
</modules>
</project>
And the other project depends on the submodule jars of pom-project. I write like:
<project ...>
<groupId>the.another.project</groupId>
<artifactId>another-project</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>the.pom.project</groupId>
<artifactId>pom-project</artifactId>
<version>1.0</version>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
</project>
I tried to add the pom project as dependency, aiming to add all the submodule jars into the classpath of another project, but it seems not to work for me.
I don't hope to add all the submodules as dependences manually.