Joomla Extensions Demo

Support

Do not submit a bug report if you need technical support or have questions.

Forums

Post your suggestions ask for help in the community forums

Contact Me

Missing images/links, any comments, suggestions, need help? Contact me

Skype

Need desperately help?
Skype Me™! But dont abuse of it!

List conflicting dependencies in the Maven reactor

apache_maven

The Maven Dependency Plugin among other things include a dependency:analyze-duplicate

The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location.

This Apache Maven plugin is really feature rich and provide a lot of interesting goals:

  • dependency:analyze analyzes the dependencies of this project and determines which are: used and declared; used and undeclared; unused and declared.
  • dependency:analyze-dep-mgt analyzes your projects dependencies and lists mismatches between resolved dependencies and those listed in your dependencyManagement section.
  • dependency:analyze-only is the same as analyze, but is meant to be bound in a pom. It does not fork the build and execute test-compile.
  • dependency:analyze-report analyzes the dependencies of this project and produces a report that summarises which are: used and declared; used and undeclared; unused and declared.
  • dependency:analyze-duplicate analyzes the dependencies/ and dependencyManagement/ tags in the pom.xml and determines the duplicate declared dependencies.
  • dependency:build-classpath tells Maven to output the path of the dependencies from the local repository in a classpath format to be used in java -cp. The classpath file may also be attached and installed/deployed along with the main artifact.
  • dependency:copy takes a list of artifacts defined in the plugin configuration section and copies them to a specified location, renaming them or stripping the version if desired. This goal can resolve the artifacts from remote repositories if they don't exist in local.
  • dependency:copy-dependencies takes the list of project direct dependencies and optionally transitive dependencies and copies them to a specified location, stripping the version if desired. This goal can also be run from the command line.
  • dependency:get downloads a single artifact transitively from a specified remote repository.
  • dependency:go-offline tells Maven to resolve everything this project is dependent on (dependencies, plugins, reports) in preparation for going offline.
  • dependency:list alias for resolve that lists the dependencies for this project.
  • dependency:properties set a property for each project dependency containing the to the artifact on the file system.
  • dependency:purge-local-repository tells Maven to clear all dependency-artifact files out of the local repository, and optionally re-resolve them.
  • dependency:resolve tells Maven to resolve all dependencies and displays the version.
  • dependency:resolve-plugins Tells Maven to resolve plugins and their dependencies.
  • dependency:sources tells Maven to resolve all dependencies and their source attachments, and displays the version.
  • dependency:tree displays the dependency tree for this project.
  • dependency:unpack removes the project dependencies from the local repository, and optionally re-resolve them.
  • dependency:unpack-dependencies like copy-dependencies but unpacks

It can be use to make the build failing (There is another way to do this using the enforcer plugin as well)

To detect duplicate dependencies just run against your pom

mvn org.apache.maven.plugins:maven-dependency-plugin:2.2:analyze-duplicate

When you have found the duplicate you can query and analyze why it was included by running

mvn dependency:tree -Dverbose -Dincludes=:xerces*::

or use M2Eclipse dependencies graph or dependency tree that support highlighting and query with wildcards as well. I like especially this solution because I can right click on any dependencies and select “add exclusions” and let M2Eclipse modify the pom.xml for me.

eclipse_pom-editor-depend-treeeclipse_pom-editor-graph-radial

You might also like:
Apache Maven copy local file to a remote server server using
39 days ago
Apache Maven copy local file to a remote server server using
I will show you in an Apache Maven configuration file how to copy files to server each time the pa
Apache M2Eclipse: Get rid of Duplicate resources when openin
45 days ago
Apache M2Eclipse: Get rid of Duplicate resources when openin
In this small post, I’ll show you how to remove duplicated resources in the Open Resource view o
Apache Maven 3 Cookbook
187 days ago
Apache Maven 3 Cookbook
  First a big thanks to Packt Publishing for having sent me this book to review! I did enj
Apache Maven 3 Cookbook Review
233 days ago
Apache Maven 3 Cookbook Review
Thanks to Packt Publishing for having sent me this book to review. I will publish a review in the
Break Maven build when there is a dependency conflict
349 days ago
Break Maven build when there is a dependency conflict
Scenarios You want to control Maven during dependency resolution and break the build i
OSGi-Bundle with the Maven-Bundle-Plugin
350 days ago
OSGi-Bundle with the Maven-Bundle-Plugin
OSGi (Open Service Gateway Initiative) is a Java framework for developing and deploying modu
Apache Maven Cargo deploy with Tomcat 7
360 days ago
Apache Maven Cargo deploy with Tomcat 7
Following the post about Deploy to Tomcat 6 using Maven, here is a ready to use example with the
Speeding up Apache Maven Builds
606 days ago
Speeding up Apache Maven Builds
The obvious things to do first in no particular order Use a better build server, CPU power is c
blog comments powered by Disqus
Category: Apache Maven

Donations

Thank You for supporting my work
Subscribe to me on YouTube

Latest Articles

  • In this series of post I will outline some common techniques to help Joomla extensions development. As you know Jooml... ...
  • CedTag  has been updated to version 2.5.3 and correct a lot of bugs and contains some nice features. CedTag is t... ...
  • CedThumbnails has been updated to version 2.5.5 and contains 1 new features for both Joomla 1.7 and Joomla 2.5. For ex... ...
  • CedSmugmug  has been updated to version 2.5.2 and correct some bugs and contains some nice features. CedSmugmug&... ...
  • If you want an extra gigabyte of storage on your Dropbox account, the online cloud service invites you to compete in i... ...

Subscribe

Latest Comments

Popular Posts

rockettheme advertisement

dropbox logo

Help Us & Leave Feedback!

  • Do you have an excellent article idea you would like to read about here? Share it!
  • Do you have some interesting tips how we could improve our site?
  • Something missing here? Help us make this blog a better place, leave feedback!
We would love to hear from you! Be active! Write us now!