So I have a dependency:
<dependency>
<groupId>com.foo</groupId>
<artifactId>foo</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
I need this dependency to be in version 2.4 at some times and at 2.2 at other times. Is there a way to choose just before runtime which version it's going to run, or maybe a maven command to do so?
And given the scope is provided, if I just set the version to 2.2, when provided with the 2.4 version will it work?