Search code examples
javamavenspring-data-rest

override maven dependency with local library


In my pom.xml I want to include

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-rest-webmvc</artifactId>
    <version>2.2.1.RELEASE</version>
</dependency>

Unfortunately this library is not being pulled because it depends on:

-> spring-data-rest-core 2.2.1
-> org.atteo.evo-inflector 1.2
-> org.atteo.parent 1.10

The last one (org.atteo.parent) has an issue fixed in 1.11 (@see: https://github.com/atteo/parent/commit/8f8db3004cb89d61b22e8348dcc4935a051b5529).

What is the best way around this issue? I already tried to hack a little around (this means manually adding the org.atteo.parent dependency to the pom in a newer version, but this is neither elegant nor does it work).


Solution

  • It seems you want to remove the "org.atteo.parent" from the dependencies, is that right? If that's the case, try this:

    <dependency>
      ...
      <exclusions>
        <exclusion>
          <groupId>org.atteo.parent</groupId>
          <artifactId>1.10</artifactId>
        </exclusion>
      </exclusions> 
    </dependency>