You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michał (JIRA)" <ji...@apache.org> on 2018/05/21 10:51:00 UTC

[jira] [Comment Edited] (MASSEMBLY-887) Magically merged conflicting classpath

    [ https://issues.apache.org/jira/browse/MASSEMBLY-887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16482393#comment-16482393 ] 

Michał edited comment on MASSEMBLY-887 at 5/21/18 10:50 AM:
------------------------------------------------------------

I am actually trying to report, what you have described as correct:
{code:java}
The dependency is properly mediated. {code}
How do you know it is done correctly? Could you please share it with me?

------------

I see a classpath error of (f.e)
 * com.boundary:high-scale-lib:1.0.6 (dependency of org.apache.cassandra:cassandra-all:3.4)
 * com.github.stephenc.high-scale-lib:high-scale-lib:1.1.2 (dependency of  com.netflix.astyanax:astyanax-core:3.9.0)

Since they both contain some classes, like
 * org/cliffc/high_scale_lib/NonBlockingSetInt.class

 

SBT is only here for reference, since it reports what I think should be reported.
I would like to understand how maven-assembly-plugin solves it automatically, since to me it looks like a place for potential error.

 

 


was (Author: atais):
I am actually trying to report, what you have described as correct:
{code:java}
The dependency is properly mediated. {code}
How do you know it is done correctly? Could you please share it with me?

------------

I see a classpath error of (f.e)
 * com.boundary:high-scale-lib:1.0.6 (dependency of org.apache.cassandra:cassandra-all:3.4)
 * com.github.stephenc.high-scale-lib:high-scale-lib:1.1.2 (dependency of  com.netflix.astyanax:astyanax-core:3.9.0)

Since they both contain some classes, like
 * org/cliffc/high_scale_lib/NonBlockingSetInt.class

 

SBT is only here for reference, since it reports what I think should be reported.
I woule like to understand how maven-assembly-plugin solves it automatically.

 

> Magically merged conflicting classpath 
> ---------------------------------------
>
>                 Key: MASSEMBLY-887
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-887
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>          Components: component descriptor
>    Affects Versions: 3.1.0
>            Reporter: Michał
>            Priority: Major
>
> I have found this issue, while migrating a project from Maven to SBT.
> To describe the problem I have created an example project with dependencies that I found to behave differently, depending on the build tool.
> [https://github.com/atais/mvn-sbt-assembly]
>  
> The only dependencies are (sbt style)
> {code:java}
> "com.netflix.astyanax" % "astyanax-cassandra" % "3.9.0", 
> "org.apache.cassandra" % "cassandra-all" % "3.4",{code}
> and what I do not understand is, why {{mvn package}} creates the fat jar successfully, while {{sbt assembly}} gives conflicts:
> {code:java}
> [error] 39 errors were encountered during merge [error] java.lang.RuntimeException: deduplicate: different file contents found in the following: [error] /home/siatkowskim/.ivy2/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.7.7.jar:org/apache/commons/logging/<some classes> [error] /home/siatkowskim/.ivy2/cache/commons-logging/commons-logging/jars/commons-logging-1.1.1.jar:org/apache/commons/logging/<some classes> ... [error] /home/siatkowskim/.ivy2/cache/com.github.stephenc.high-scale-lib/high-scale-lib/jars/high-scale-lib-1.1.2.jar:org/cliffc/high_scale_lib/<some classes> [error] /home/siatkowskim/.ivy2/cache/com.boundary/high-scale-lib/jars/high-scale-lib-1.0.6.jar:org/cliffc/high_scale_lib/<some classes> ...{code}
> *{{So I wonder, how come this plugin overcomes this conflicts?}}*
> {{I have also created a SO question, if one would like to earn some points: [https://stackoverflow.com/questions/50249818/why-maven-assembly-works-when-sbt-assembly-find-conflicts]}}
> {{ }}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)