Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven2: dependency set to compile not added to war
    text
    copied!<p>I have a multi module project consisting of several jar modules and a war module. When I do mvn package, the war is created but one dependency (javax.mail) is not included in the lib folder of the war. The dependency is set to compile is the main pom. The war is not dependent from the mail.jar but a module.jar is. When I do mvn dependency:tree, the three looks fine to me. Running in debug does not show me anything wrong either.</p> <p>Anyone has an idea?</p> <p>BB Peter</p> <p>Edit: in the master POM I have</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;javax.mail&lt;/groupId&gt; &lt;artifactId&gt;mail&lt;/artifactId&gt; &lt;version&gt;1.4.1&lt;/version&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; </code></pre> <p>as a managed dependency. The module jar has the dependency as follows:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;javax.mail&lt;/groupId&gt; &lt;artifactId&gt;mail&lt;/artifactId&gt; &lt;/dependency&gt; </code></pre> <p>The war module has no dependency to javax.mail.</p> <p>Edit2:</p> <p>I do override the war plugin in the master pom like this:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt; &lt;version&gt;2.1&lt;/version&gt; &lt;configuration&gt; &lt;warName&gt;${war.name}&lt;/warName&gt; &lt;archive&gt; &lt;manifest&gt; &lt;addDefaultImplementationEntries&gt;true&lt;/addDefaultImplementationEntries&gt; &lt;/manifest&gt; &lt;manifestEntries&gt; &lt;Implementation-Build&gt;${buildNumber}&lt;/Implementation-Build&gt; &lt;/manifestEntries&gt; &lt;/archive&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre>
 

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