Question

I'm looking at a project's POM and its dependency management section lists the same artifact 3 times - each time with different classifiers/types. What does this help you achieve?

Specifically, the dependency in question is the test module of the project. Its 3 occurrences in the POM have the following form:

  1. default scope, default type, default classifier
  2. default scope, test-jar type, default classifier
  3. default scope, test-jar type, test-sources classifier
Was it helpful?

Solution

Dependency management helps organizing your dependencies in a central place. In your case, that particular artifact is going to be used in different forms in different modules:

  1. Plain dependency
  2. Share the test code with the module that depends on it (test dependency) - Same for 3
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top