EventStore.JVM icon indicating copy to clipboard operation
EventStore.JVM copied to clipboard

Cannot bundle eventstoreJVM

Open ghostbuster91 opened this issue 5 years ago • 3 comments

Hi, while trying to execute assemblyPackageDependency I'm getting following error:

[error] 7 errors were encountered during merge
[error] stack trace is suppressed; run last client / assemblyPackageDependency for the full output
[error] stack trace is suppressed; run last examples / assemblyPackageDependency for the full output
[error] stack trace is suppressed; run last assemblyPackageDependency for the full output
[error] (client / assemblyPackageDependency) deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/compiler/plugin.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/compiler/plugin.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/descriptor.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/descriptor.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/duration.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/duration.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/field_mask.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/field_mask.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/struct.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/struct.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/timestamp.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/timestamp.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/type.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/type.proto
[error] (examples / assemblyPackageDependency) deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/compiler/plugin.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/compiler/plugin.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/descriptor.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/descriptor.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/duration.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/duration.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/field_mask.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/field_mask.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/struct.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/struct.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/timestamp.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/timestamp.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/type.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/type.proto
[error] (assemblyPackageDependency) deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/compiler/plugin.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/compiler/plugin.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/descriptor.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/descriptor.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/duration.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/duration.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/field_mask.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/field_mask.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/struct.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/struct.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/timestamp.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/timestamp.proto
[error] deduplicate: different file contents found in the following:
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.7.1/protobuf-java-3.7.1.jar:google/protobuf/type.proto
[error] /home/kghost/.cache/coursier/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-protobuf-v3_2.13/2.6.8/akka-protobuf-v3_2.13-2.6.8.jar:google/protobuf/type.proto
[error] Total time: 53 s, completed Aug 4, 2020, 11:10:55 AM
[IJ]sbt:root> 

It used to work fine prior to this version (7.2.0)

ghostbuster91 avatar Aug 04 '20 09:08 ghostbuster91

Not sure what caused this, but perhaps https://github.com/akka/akka/pull/29014 is related as we bumped akka from 2.6.1 to 2.6.8. I have never used assemblyPackageDependency.

ahjohannessen avatar Aug 04 '20 10:08 ahjohannessen

Yes it is, but I think that it used to work before only by coincidence. It seems like the proto files in akka are not being shaded and conflict emerges whenever there is a mismatch between any of these files and proto files included by other version of google-protobuf library. In other words it used to work because the proto files were equal.

I'm trying to prove that theory, once succeed I will open an issue in akka.

ghostbuster91 avatar Aug 04 '20 11:08 ghostbuster91

As a workaround one can specify a mergeStrategy to drop those files as they are only useful during compile-time or update protobufVersion to 3.11.4 which is the same as the one in akka.

ghostbuster91 avatar Aug 04 '20 14:08 ghostbuster91