Use pom-packaging maven project as dependency
<p>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.</p>

<p>The pom-packaging project consists of multiple submodules which are jar-packaging, analogous to:</p>

<pre><code>&lt;project ...&gt;
    &lt;groupId&gt;the.pom.project&lt;/groupId&gt;
    &lt;artifactId&gt;pom-project&lt;/artifactId&gt;
    &lt;version&gt;1.0&lt;/version&gt;
    &lt;packaging&gt;pom&lt;/packaging&gt;

    &lt;modules&gt;
            &lt;module&gt;a-pom-module&lt;/module&gt;
            &lt;module&gt;b-pom-module&lt;/module&gt;
            &lt;module&gt;c-pom-module&lt;/module&gt;
            &lt;module&gt;d-pom-module&lt;/module&gt;
            &lt;module&gt;e-pom-module&lt;/module&gt;
            &lt;module&gt;f-pom-module&lt;/module&gt;
    &lt;/modules&gt;
&lt;/project&gt;
</code></pre>

<p>And the other project depends on the submodule jars of pom-project. I write like:</p>

<pre><code>&lt;project ...&gt;
    &lt;groupId&gt;the.another.project&lt;/groupId&gt;
    &lt;artifactId&gt;another-project&lt;/artifactId&gt;
    &lt;version&gt;1.0&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;

    &lt;dependencyManagement&gt;
            &lt;dependencies&gt;
                    &lt;dependency&gt;
                            &lt;groupId&gt;the.pom.project&lt;/groupId&gt;
                            &lt;artifactId&gt;pom-project&lt;/artifactId&gt;
                            &lt;version&gt;1.0&lt;/version&gt;
                            &lt;type&gt;pom&lt;/type&gt;
                    &lt;/dependency&gt;
            &lt;/dependencies&gt;
    &lt;/dependencyManagement&gt;
&lt;/project&gt;
</code></pre>

<p>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.</p>

<p><strong>I don't hope to add all the submodules as dependences manually.</strong></p>