pingidentity / scim2

The UnboundID SCIM 2.0 SDK for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

duplicate class "com.unboundid.scim2.common.utils.Version" betwen scim2-sdk-client and scim2-sdk-common

hauntingEcho opened this issue · comments

When attempting to build a fat jar which uses the scim2-sdk-client library, maven gives the following warning:

[WARNING] scim2-sdk-client-2.1.3.jar, scim2-sdk-common-2.1.3.jar define 1 overlapping classes:
[WARNING]   - com.unboundid.scim2.common.utils.Version
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/

When classes have naming conflicts, it is undefined which is loaded. While it looks like the file is identical between them, this leaves an opening for issues if they do diverge.

Since scim2-sdk-client imports scim2-sdk-common, the class can just be deleted from scim2-sdk-client.

This issue still appears for me on version 2.2.1
`

    <dependency>
        <groupId>com.unboundid.product.scim2</groupId>
        <artifactId>scim2-sdk-client</artifactId>
        <version>2.2.1</version>
    </dependency>

the warning:
[WARNING] Found duplicate and different classes in [com.unboundid.product.scim2:scim2-sdk-client:2.2.1, com.unboundid.product.scim2:scim2-sdk-common:2.2.1]:
[WARNING] com.unboundid.scim2.common.utils.Version
[WARNING] Found duplicate classes/resources in compile classpath.
[WARNING] Found duplicate and different classes in [com.unboundid.product.scim2:scim2-sdk-client:2.2.1, com.unboundid.product.scim2:scim2-sdk-common:2.2.1]:
[WARNING] com.unboundid.scim2.common.utils.Version
[WARNING] Found duplicate classes/resources in runtime classpath.
[WARNING] Found duplicate and different classes in [com.unboundid.product.scim2:scim2-sdk-client:2.2.1, com.unboundid.product.scim2:scim2-sdk-common:2.2.1]:
[WARNING] com.unboundid.scim2.common.utils.Version
[WARNING] Found duplicate classes/resources in test classpath.
`

this is really a duplicate of #91 - closing this ticket