Hi all,

There are still several version anomalies in the final assembly so here is what I am currently doing in order to resolve the dependencies:

mvn dependency:tree -Dverbose

This provides a nice dep tree to analyse issues - It's also a good way to work out excludes. There are still a lot of missing excludes. If a library depends on other libraries it is better to write the excludes, and then explicitly declare includes with the required versions. This prevents any externally resolved dependency changes 'quietly' affecting the stability of the build. All versioned dependencies should be pushed up the parent pom tree as high as possible into dependency management. A top level pom defines the actual 'version', with child poms defining usages and scopes (a child pom should not declare a version except when the dependency is atomic across the multi-module project).

Note: The examples are all standalone projects, and define their own dependencies and versions - There should still be an effort to keep dependency versions the same across the board.

mvn dependency:copy-dependencies -DoutputDirectory="D:\Temp\deps"

This copies absolutely all dependencies to the specified location, which makes it easy to see what is duplicated (There is a list option if you don't want to write files). There are still several duplicates and version mismatches in the current tree which need to be eliminated. With this list it is quite easy to search for and work out which poms are the culprits. Running the goal without the 'outputDirectory' creates a /target/dependency in every project, which makes finding jar locations easy.

dependency:analyze-dep-mgt

This shows up dependency management issues, of which there are also currently 
quite a few.

All these commands really need to be run from bottom up and top down in every project directory to iron out all conflicts - Quite a lot of work, but will be worth it in the end to get a really clean build.

Any suggestions and or help will be appreciated. I hope to get most of this 
done be the end of the coming weekend.

Andy.

Reply via email to