You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This worked correctly in sbt-assembly 1.2.0, and got broken with 2.0.0.
The text was updated successfully, but these errors were encountered:
piotrp
changed the title
Local files from META-INF/services/ hide files from dependencies (2.0.0 regression)
Files from project's sources overwrite merged dependencies (2.0.0 regression)
Nov 19, 2023
Issue is still present in 2.3.1, when building on Windows.
I uploaded a simple standalone test to https://github.com/piotrp/sbt-assembly-issue-513: META-INF/services/javax.mail.Provider should contain multiple entries, but it gets overwritten by file from repository.
Build log indicates that parent file is not seen by sbt-assembly, so nothing gets merged - file from project dependencies is ignored.
I'm facing the same problem. If I put a custom file in src/resources/META-INF/services of my project, it overwrites the result of merging multiple third-party src/resources/META-INF/services directory files with the same name, whereas all files must be merged, including my custom one.
Is there a workaround for this? Any plans for a fix?
Presence of a file in META-INF/services/ makes sbt-assembly completely ignore the same file present in dependencies.
To verify this I modified bit tests in src/sbt-test/merging:
Add
mustContain(dir / "META-INF" / "services" / "srv", Seq("srv1", "srv2"))
to check rules in build.sbtPrepare test data:
Now we can verify that tests pass:
So far so good, now let's add a file to local project:
And re-run tests with check rule changed to
mustContain(dir / "META-INF" / "services" / "srv", Seq("srv0", "srv1", "srv2"))
:This worked correctly in sbt-assembly 1.2.0, and got broken with 2.0.0.
The text was updated successfully, but these errors were encountered: