Skip to content
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

Assembly on Windows 10 error: requirement failed: Source file 'path' is a directory. #390

Closed
avgolubev opened this issue Jan 9, 2020 · 2 comments

Comments

@avgolubev
Copy link

avgolubev commented Jan 9, 2020

Hi.
An error appears during assembly on Windows 10:

[debug] Merging files...
[debug] Merging 'META-INF\license' with strategy 'rename'
[error] java.lang.IllegalArgumentException: requirement failed: Source file 'path_to_my_project\target\streams\_global\assemblyOption\_global\streams\assembly\ef69ba5d3d4c7e307628494fc7af678ad985b43f_58e0a7e7ff773f84d02d4f006ae9dd31ad22a0b1_da39a3ee5e6b4b0d3255bfef95601890afd80709\META-INF\license' is a directory.

But on OSX it's ok.
The problem is inside sbtassembly.MergeStrategy.rename in IO.move(f, dest).

@avgolubev
Copy link
Author

Using sbt-assembly version 0.14.10.
And full stack trace:

at scala.Predef$.require(Predef.scala:281)
at sbt.io.IO$.copyFile(IO.scala:863)
at sbt.io.IO$.move(IO.scala:1083)
at sbtassembly.MergeStrategy$$anon$7.$anonfun$apply$4(MergeStrategy.scala:105)
at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:245)
at scala.collection.Iterator.foreach(Iterator.scala:941)
at scala.collection.Iterator.foreach$(Iterator.scala:941)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
at scala.collection.IterableLike.foreach(IterableLike.scala:74)
at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
at scala.collection.TraversableLike.flatMap(TraversableLike.scala:245)
at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:242)
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:108)
at sbtassembly.MergeStrategy$$anon$7.apply(MergeStrategy.scala:98)
at sbtassembly.MergeStrategy.apply(MergeStrategy.scala:20)
at sbtassembly.Assembly$.applyStrategy$1(Assembly.scala:110)
at sbtassembly.Assembly$.$anonfun$applyStrategies$6(Assembly.scala:117)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
at scala.collection.Iterator.foreach(Iterator.scala:941)
at scala.collection.Iterator.foreach$(Iterator.scala:941)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
at scala.collection.IterableLike.foreach(IterableLike.scala:74)
at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
at scala.collection.TraversableLike.map(TraversableLike.scala:238)
at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
at scala.collection.AbstractTraversable.map(Traversable.scala:108)
at sbtassembly.Assembly$.applyStrategies(Assembly.scala:115)
at sbtassembly.Assembly$.x$1$lzycompute$1(Assembly.scala:25)
at sbtassembly.Assembly$.x$1$1(Assembly.scala:23)
at sbtassembly.Assembly$.stratMapping$lzycompute$1(Assembly.scala:23)
at sbtassembly.Assembly$.stratMapping$1(Assembly.scala:23)
at sbtassembly.Assembly$.inputs$lzycompute$1(Assembly.scala:68)
at sbtassembly.Assembly$.inputs$1(Assembly.scala:58)
at sbtassembly.Assembly$.apply(Assembly.scala:85)
at sbtassembly.Assembly$.$anonfun$assemblyTask$1(Assembly.scala:244)
at scala.Function1.$anonfun$compose$1(Function1.scala:49)
at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
at sbt.std.Transform$$anon$4.work(Transform.scala:67)
at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
at sbt.Execute.work(Execute.scala:290)
at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

@avgolubev
Copy link
Author

The problem was solved by completely deleting target directory.
Strange that clean didn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant