Skip to content

Commit

Permalink
Fixed META-INF handling in JarOps.jar (#2142)
Browse files Browse the repository at this point in the history
Pull request: #2142
  • Loading branch information
lefou authored Nov 26, 2022
1 parent ef89feb commit b7df8a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions main/api/src/mill/api/JarOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ trait JarOps {
assert(inputPaths.iterator.forall(os.exists(_)))

if (includeDirs) {
seen.add(os.sub / "META-INF")
val entry = new JarEntry("META-INF/")
entry.setTime(curTime)
jarStream.putNextEntry(entry)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dummy Licence
1 change: 1 addition & 0 deletions main/test/src/eval/JavaCompileJarTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ object JavaCompileJarTests extends TestSuite {
|test/FooTwo.class
|readme.md
|hello.txt
|META-INF/License
|""".stripMargin
assert(jarContents.linesIterator.toSeq == expectedJarContents.linesIterator.toSeq)

Expand Down

0 comments on commit b7df8a4

Please sign in to comment.