Just a few quick tips - Running the following from anywhere within the build tree will give you a good indication of how dependencies are are related, and also what is required for the current level:

mvn dependency:analyze -DcheckDuplicateClasses

mvn dependency:tree

Anything like '[WARNING] Unused declared dependencies found:' should be ignored unless you definately know it should be excluded - often libraries are loaded dynamically and it is impossible for maven to decipher.

However, take note of anything like '[WARNING] Used undeclared dependencies found:'. This means the dependency should be explicitly declared (where exactly is always open to question, but the rule of thumb should be 'as high as possible' in the pom tree).

If a dependency is dependent on other libraries (using, mvn dependency:tree) then you should always exclude them and explicitly declare the ones you want or need to keep.

Andy.

Reply via email to