0

I have a project with two versions of the same jar and the problem is that it is causing a jar conflict.

[WARNING] org.apache.cxf.transports.http.configuration.package-info scanned from multiple locations: jar:file:///private/var/folders/rw/9_fr4s6s01d5vcykl3fqkd7d3j59v0/T/jetty-0.0.0.0-0-attache-api-rest.war-_api-any-2999199381910928390.dir/webapp/WEB-INF/lib/cxf-rt-transports-http-3.1.12.jar!/org/apache/cxf/transports/http/configuration/package-info.class, jar:file:///private/var/folders/rw/9_fr4s6s01d5vcykl3fqkd7d3j59v0/T/jetty-0.0.0.0-0-attache-api-rest.war-_api-any-2999199381910928390.dir/webapp/WEB-INF/lib/cxf-rt-transports-http-3.1.4.jar!/org/apache/cxf/transports/http/configuration/package-info.class

I wanted to remove the previous version and I know how to remove it using exclusions, but I am not able to find the cxf-rt-transports-http-3.1.4.jar in pom.xml dependency hierarchy so that I could found out from where this transitive dependency is actually coming.

Edit : Screenshot of dependency Hierarchy in STS4

Nishtha garg
  • 73
  • 1
  • 7
  • If you have build this project with Maven, there something wrong going on. Maven takes care that only one version of a jar can enter an application, unless something unusual happens (e.g. the jar changed groupId between the versions). So in Maven you _cannot_ have two different versions of a jar with the same groupId/artifactId. – J Fabian Meier Oct 18 '19 at 13:10
  • That I know, but my question is how to resolve that. – Nishtha garg Oct 23 '19 at 12:09

1 Answers1

0

You can try to find the dependency from eclipse dependency graph, Below is the SS to search for a specific jar in the project.

enter image description here

If there is more than one version of a jar, you would be seeing 2 different versions of the jar with a different parent library. You can exclude the other from there by right-clicking on it and selecting exclude option.

rns
  • 1,047
  • 10
  • 25