Is there a way to enable two versions of the same artifact in Maven?

<dependency>
    <groupId>org.jmock</groupId>
    <artifactId>jmock</artifactId>
    <version>1.2.0</version>   
</dependency>
<!--Include Both Jmock 1&2 is cool: http://www.jmock.org/upgrade1to2.html -->
    <dependency>
      <groupId>org.jmock</groupId>
      <artifactId>jmock</artifactId>
      <version>2.5.1</version>
    </dependency>   

This does not work.

+3
source share
1 answer

Check out the dependency mediation section at http://maven.apache.org/guides/intides/introduction-to-dependency-mechanism.html . One version wins.

+4
source

Source: https://habr.com/ru/post/1787434/


All Articles