question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Found duplicate (but equal) classes in multiple 3.2.0 artifacts

See original GitHub issue

I upgraded my project from io.rest-assured:rest-assured version 3.1.1 to 3.2.0 and my builds started complaining of duplicate classes present in multiple artifacts:

[WARNING] Found duplicate (but equal) classes in [io.rest-assured:json-path:3.2.0, io.rest-assured:rest-assured-common:3.2.0, io.rest-assured:rest-assured:3.2.0, io.rest-assured:xml-path:3.2.0]:
[WARNING]   io.restassured.exception.PathException
[WARNING]   io.restassured.internal.assertion.AssertParameter
[WARNING]   io.restassured.internal.assertion.Assertion
[WARNING]   io.restassured.internal.assertion.AssertionSupport
[WARNING]   io.restassured.internal.assertion.EndToEndQuoteFragmentEscaper
[WARNING]   io.restassured.internal.assertion.GetAtPathFragmentEscaper
[WARNING]   io.restassured.internal.assertion.HyphenQuoteFragmentEscaper
[WARNING]   io.restassured.internal.assertion.PathFragmentEscaper
[WARNING]   io.restassured.internal.classpath.ClassPathResolver
[WARNING]   io.restassured.internal.mapper.ObjectDeserializationContextImpl
[WARNING]   io.restassured.internal.path.ObjectConverter
[WARNING]   io.restassured.mapper.DataToDeserialize
[WARNING]   io.restassured.mapper.ObjectDeserializationContext
[WARNING]   io.restassured.mapper.factory.ObjectMapperFactory
[WARNING]   io.restassured.mapper.resolver.ObjectMapperResolver
[WARNING] Found duplicate (but equal) classes in [io.rest-assured:json-path:3.2.0, io.rest-assured:rest-assured:3.2.0]:
[WARNING]   io.restassured.internal.path.json.ConfigurableJsonSlurper
[WARNING]   io.restassured.internal.path.json.JSONAssertion
[WARNING]   io.restassured.internal.path.json.JsonPrettifier
[WARNING]   io.restassured.internal.path.json.mapping.JsonObjectDeserializer
[WARNING]   io.restassured.internal.path.json.mapping.JsonPathGsonObjectDeserializer
[WARNING]   io.restassured.internal.path.json.mapping.JsonPathJackson1ObjectDeserializer
[WARNING]   io.restassured.internal.path.json.mapping.JsonPathJackson2ObjectDeserializer
[WARNING]   io.restassured.mapper.factory.DefaultGsonObjectMapperFactory
[WARNING]   io.restassured.mapper.factory.DefaultJackson1ObjectMapperFactory
[WARNING]   io.restassured.mapper.factory.DefaultJackson2ObjectMapperFactory
[WARNING]   io.restassured.mapper.factory.GsonObjectMapperFactory
[WARNING]   io.restassured.mapper.factory.Jackson1ObjectMapperFactory
[WARNING]   io.restassured.mapper.factory.Jackson2ObjectMapperFactory
[WARNING]   io.restassured.path.json.JsonPath
[WARNING]   io.restassured.path.json.config.JsonParserType
[WARNING]   io.restassured.path.json.config.JsonPathConfig
[WARNING]   io.restassured.path.json.exception.JsonPathException
[WARNING]   io.restassured.path.json.mapping.JsonPathObjectDeserializer
[WARNING] Found duplicate (but equal) classes in [io.rest-assured:rest-assured:3.2.0, io.rest-assured:xml-path:3.2.0]:
[WARNING]   io.restassured.internal.path.xml.GroovyNodeSerializer
[WARNING]   io.restassured.internal.path.xml.NodeBase
[WARNING]   io.restassured.internal.path.xml.NodeChildrenImpl
[WARNING]   io.restassured.internal.path.xml.NodeImpl
[WARNING]   io.restassured.internal.path.xml.XMLAssertion
[WARNING]   io.restassured.internal.path.xml.XmlEntity
[WARNING]   io.restassured.internal.path.xml.XmlPrettifier
[WARNING]   io.restassured.internal.path.xml.XmlRenderer
[WARNING]   io.restassured.internal.path.xml.mapping.XmlObjectDeserializer
[WARNING]   io.restassured.internal.path.xml.mapping.XmlPathJaxbObjectDeserializer
[WARNING]   io.restassured.mapper.factory.DefaultJAXBObjectMapperFactory
[WARNING]   io.restassured.mapper.factory.JAXBObjectMapperFactory
[WARNING]   io.restassured.path.xml.XmlPath
[WARNING]   io.restassured.path.xml.config.XmlParserType
[WARNING]   io.restassured.path.xml.config.XmlPathConfig
[WARNING]   io.restassured.path.xml.element.Node
[WARNING]   io.restassured.path.xml.element.NodeChildren
[WARNING]   io.restassured.path.xml.element.PathElement
[WARNING]   io.restassured.path.xml.exception.XmlPathException
[WARNING]   io.restassured.path.xml.mapping.XmlPathObjectDeserializer

Is this intentional?

CC // @larrysteinke

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
ponzianicommented, Feb 13, 2019

It looks like the only good solution for this issue, is a refactoring to avoid split packages. After that, the <Import-Package> statements can be refined to only contain the packages from the bundles itselves.

https://twitter.com/milendyankov/status/1095631397316976640

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven build [WARNING] we have a duplicate class
I've looked into my local m2 repo, I have two classes there in commons-logging-api jar, LogFactoryImpl.class and LogFactoryImpl$1.class. Same as all the classes...
Read more >
[#3860] - Duplicate classes in jasperreports.jar - v5.6.x
Maven's Shade Plugin detectс that some class files are present in two or more JAR files. The JARs where overlapping classes are detected...
Read more >
Apache Maven Dependency Plugin – Project Dependencies
The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for...
Read more >
Change Log - Okio
All artifacts now share the same name (like com.squareup.okio:okio:3.0.0-alpha.10 ) for both Kotlin/JVM and Kotlin Multiplatform.
Read more >
A Guide to Maven Artifact Classifiers - Baeldung
Learn about artifact classifiers in Maven and understand the various ... It distinguishes the artifacts built from the same POM but ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found