On Fri, 2016-05-27 at 11:14 +0200, Oliver Lietz wrote: > > I don't think there is support in Maven 3 for unit tests using a > different > version than for compile. Not sure if other build tools can handle > different > versions of dependencies for compile and test.
Maven 3 is unable to do that. I can't say anything for other build systems. > > So my preferred answers to eliminate outdated dependencies in tests: > > 1. use minimal version for compile and current version for test > (how?) > 2. use current version for compile and test > 3. use current version for compile and test and carefully expand > import range We seem to be discussing 'test' but I think we need to separate unit tests stored in the same Maven projects and integration tests. a) Integration tests should use the same dependencies as the launchpad. After all, the launchpad is what we ship and things should work fine in that setup. If other parties want different combinations, they're free to define those combinations and test it themselves. b) Unit tests may aim to use the same dependencies as the launchpad. I am not thoroughly convinced of the value, given that unit tests only touch the surface of an API. Chances of not finding out issues due to a missed upgrade of commons-lang are way smaller that missing an upgrade to oak-core ( for instance ). Also, it's quite troublesome to keep all versions of all modules in sync with the launchpad. All that manual work is bound to get mistakes for - again, IMO - little gain. So I would say that if we want to align unit test dependencies with the launchpad versions we should have: 1. An automatic way of defining dependency versions 2. A way of separating unit test from compile dependencies Thanks, Robert