现在我的pom中存在冲突,我们已经有了jersery-container-servlet,我在我的pom中使用了paymill的依赖项,即这个:
<dependency>
<groupId>com.paymill</groupId>
<artifactId>paymill-java</artifactId>
<version>5.0.0</version>
</dependency>
现在这两者之间存在冲突,最后似乎省略了所有 H2K 定位器和 H2K-API,因此我收到多个错误.....
在 Eclipse 中有没有办法解决这个问题,因为我想使用我的 jersey-container-servlet 中的 h2k 定位器和 h2k-api,因为它是较新的版本
您可以使用 maven 排除机制。
<dependency>
<groupId>com.paymill</groupId>
<artifactId>paymill-java</artifactId>
<version>5.0.0</version>
<exclusions>
<exclusion> <!-- declare the exclusion here -->
<groupId>org.glassfish.hk2</groupId>
<artifactId>hk2-locator</artifactId>
</exclusion>
<exclusion> <!-- declare the exclusion here -->
<groupId>org.glassfish.hk2</groupId>
<artifactId>hk2-api</artifactId>
</exclusion>
</exclusions>
</dependency>