简体   繁体   中英

I got a dependency in my pom which is in conflict with a other

Now theres a conflict in my pom, we already have the jersery-container-servlet and I'm using the dependency from paymill in my pom which is this one:

<dependency>
      <groupId>com.paymill</groupId>
      <artifactId>paymill-java</artifactId>
      <version>5.0.0</version>
    </dependency>

now theres a conflict between those two and at the end it seems like all h2k-locator and h2k-api is ommited and therefore I get multiple errors.....

is there a way in eclipse I could solve this because I want to use the h2k-locator and h2k-api from my jersey-container-servlet since its a newer version

You can use the maven exclude mechanism.

<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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM