Reputation: 491
Can I use maven dependency with 2 versions? E.g. - try with first dependency, if not found then try with next one...
I think this is not possible with maven range.
Example:
<dependency>
<groupId>com.x</groupId>
<artifactId>ae.zt</artifactId>
<version>12.1_bugfix_AE-12, 12.1</version>
</dependency>
Here it should first try with version 2.1_bugfix_AE-12, and only if the version was not found it should try with version 12.1.
Upvotes: 0
Views: 64
Reputation: 35805
No, this is not possible with Maven.
I wonder: Which problem do you want to solve? If 12.1 is "good enough", why use the other one?
Furthermore, any automatism would mean that you do not really know which version was included.
Upvotes: 3