-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF
in actor / osgiBundle
#986
Comments
@mdedetrich Would you like to take a view? |
Don't know why, but won't happen on my laptop, can you provider more information? |
@Roiocam to reproduce: 1) sbt shell
2) project bench-jmh
3) Jmh/run -i 3 -wi 3 -f1 -t1 .*ZipWithIndexBenchmark.* |
Yep, that's what I did before. Those ERROR don't appear on my laptop. |
I think it may need |
refs: sbt/sbt-osgi#113 This blockme to run any jmh on windows :( |
This seems to be windows related, I am also not experiencing any issues. |
The issue: sbt/sbt-assembly#80 may help with this issue. |
I have doubts that this is the core issue, its over 11 years old and our issue is unique to windows which to me indicates the problem is elsewhere. |
@He-Pin What I would recommend is changing the version in https://github.com/apache/incubator-pekko/blob/main/project/plugins.sbt#L16 until you hit a point where you can no longer replicate the issue. |
broken.
works.
works. I think the duplicate file comes from |
So I believe the relevant change is sbt/sbt-osgi#81, i.e. moving from BND to JVM jar tools to re-create the final osgi jar bundle. @He-Pin Can you change https://github.com/apache/incubator-pekko/blob/main/project/plugins.sbt#L16 to 0.9.7 and https://github.com/apache/incubator-pekko/blob/main/project/OSGi.scala#L46 to false and let me know if you still get problems (or not)? If you are not getting issues when setting |
@mdedetrich I just updated my comments. the must be another |
@He-Pin In that case I would have a look at https://github.com/sbt/sbt-osgi/pull/81/files#diff-2530a9c505dd4cb34217eb195d5db3cab065049f033db306f485078da72edd5dR81-R93 and make a PR against sbt-osgi with the fix. It should be quite understandable what that code is doing. I don't know how/why Windows is bringing in its own |
@mdedetrich I can do that on weekend, but why not a merge strategy? and user can then rewrite as what they want. |
Because thats a hack that is not solving the core problem which is diverging behaviour on Windows, there shouldn't be any duplicate files in the first place and the I would suggest to solve it properly which is figuring out the difference of Windows vs Linux/MacOS and making sure it behaves the same. In the meantime you can set |
SBT currently can't download the sbt plugin sources, so I can't debug, or you can publish a new sbt-osgi which can print the detail of the conflict files. I don't think that's a hack, it's a fix for Windows users/contributors. |
Everyone has this issue. The way that sbt-plugins are developed/debugged is by using manual log/println statements (see https://www.scala-sbt.org/1.x/docs/Howto-Logging.html#Log+messages+in+a+task for how to log in a setting/task) and using Alternately you can write a sbt-scripted test for
I would help but I don't have a windows machine on hand. The best I can do for now is make a simple sbt-scripted test for |
A merge strategy with conflict file can let me choose which one to keep |
If you have duplicate files that are being packaged that is a critical issue with how you are packaging a jar. The reason why |
@He-Pin Found the core problem and I have a PR for the solution (see sbt/sbt-osgi#115). Just needs to get reviewed and then I can merge + deploy the fix. |
Error when try to execute:
The text was updated successfully, but these errors were encountered: