When declaring dependencies in maven, can you specify the minimum version the project depends on to, but have mvn exec
use the latest binaries.
When building a library, I would like to export to minimal set of dependencies (e.g. JUnit 4.0), but always want to use the latest dependencies myself (e.g. JUnit 4.8.1).
You can manage version ranges for each dependency for instance:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>[4.0,)</version>
<scope>test</scope>
</dependency>
It means you expect at least version 4.0 of junit but latest version will be used when available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With