Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you run <strong>mvn dependency:tree</strong> on your project you'll see where the unwanted dependency is being introduced, you can then exclude the dependency.</p> <p>This is an example of the output:</p> <pre><code>[INFO] [dependency:tree] [INFO] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT [INFO] \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha-8:compile [INFO] \- org.codehaus.plexus:plexus-velocity:jar:1.1.3:compile [INFO] \- velocity:velocity:jar:1.4:compile </code></pre> <p>To exclude a dependency, you'd do something like this:</p> <pre><code>&lt;dependency&gt; &lt;groupId&gt;sample.ProjectA&lt;/groupId&gt; &lt;artifactId&gt;Project-A&lt;/artifactId&gt; &lt;version&gt;1.0&lt;/version&gt; &lt;exclusions&gt; &lt;exclusion&gt; &lt;!-- declare the exclusion here --&gt; &lt;groupId&gt;sample.ProjectB&lt;/groupId&gt; &lt;artifactId&gt;Project-B&lt;/artifactId&gt; &lt;/exclusion&gt; &lt;/exclusions&gt; &lt;/dependency&gt; </code></pre> <p>For more details on the dependency plugin see the <a href="http://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html" rel="noreferrer">documentation</a>.</p> <p>For more details on exclusions, see the <a href="http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html" rel="noreferrer">guide</a>.</p> <p>Update: You can also use the <a href="http://m2eclipse.sonatype.org/update/" rel="noreferrer">m2eclipse</a> plugin to generate a graphical tree of the dependencies or as a graph. <a href="http://www.sonatype.com/books/m2eclipse-book/reference/figs/web/eclipse_pom-editor-depend-tree-locate.png" rel="noreferrer">dependency tree screenshot http://www.sonatype.com/books/m2eclipse-book/reference/figs/web/eclipse_pom-editor-depend-tree-locate.png</a> <a href="http://www.sonatype.com/books/m2eclipse-book/reference/figs/web/eclipse_pom-editor-graph.png" rel="noreferrer">dependency graph screenshot http://www.sonatype.com/books/m2eclipse-book/reference/figs/web/eclipse_pom-editor-graph.png</a></p>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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