Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven assembly dependency set with include doesn't pick up transitive dependencies
    primarykey
    data
    text
    <p>I'm having a spot of bother with the Maven assembly goal. I have a project which has a number of dependencies each of which may have their own transitive dependencies. If I run mvn dependency:tree than I can see all the dependencies including transitive are satisfied. </p> <p>This is not the case when I run the assembly goal.What I would like is when I add an dependency to be included, then all of its transitive dependencies are also included. In the following example I have three dependencies I would like to be included. So when the assembly is made I expected to have those dependencies and any transitive dependencies for those dependencies as well. </p> <pre><code>&lt;assembly&gt; &lt;baseDirectory&gt;${artifactId}/${artifactId}-${version}&lt;/baseDirectory&gt; &lt;formats&gt; &lt;format&gt;zip&lt;/format&gt; &lt;/formats&gt; &lt;fileSets&gt; &lt;/fileSets&gt; &lt;dependencySets&gt; &lt;dependencySet&gt; &lt;unpack&gt;false&lt;/unpack&gt; &lt;scope&gt;runtime&lt;/scope&gt; &lt;outputDirectory&gt;/lib &lt;/outputDirectory&gt; &lt;includes&gt; &lt;include&gt;com.acme.core:library-1&lt;/include&gt; &lt;include&gt;com.acme.core:library-2&lt;/include&gt; &lt;include&gt;com.acme.core:library-2&lt;/include&gt; &lt;/includes&gt; &lt;/dependencySet&gt; &lt;/dependencySets&gt; </code></pre> <p></p> <p>But if you open the the zip file you'll only find those three dependencies present which means at runtime the application is not fit for purpose due to missing libraries. I find this totally unintuitive as it goes against the behaviour one would expect from the POM. </p> <p>Has anyone encountered this problem and is there a solution?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload