java.lang.UnsupportedOperationException during build
sw-samuraj opened this issue · 2 comments
sw-samuraj commented
I'm trying to build stags
in following environment:
$ uname -a
MSYS_NT-6.1 PRGLAP4LNL4H2 2.8.2(0.313/5/3) 2017-07-14 08:19 x86_64 Msys
$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (Zulu 8.21.0.1-win64) (build 1.8.0_131-b11)
OpenJDK 64-Bit Server VM (Zulu 8.21.0.1-win64) (build 25.131-b11, mixed mode)
$ sbt sbt-version
[info] Loading global plugins from C:\Users\vkotacka\.sbt\0.13\plugins
[info] Loading project definition from C:\msys64\home\vkotacka\projects\scala\stags\project
[info] Set current project to root (in build file:/C:/msys64/home/vkotacka/projects/scala/stags/)
[info] stags/*:sbtVersion
[info] 0.13.15
[info] cli/*:sbtVersion
[info] 0.13.15
[info] root/*:sbtVersion
[info] 0.13.15
and I'm receiving following exception:
$ pwd
/home/vkotacka/projects/scala/stags
$ bin/install
[info] Loading global plugins from C:\Users\vkotacka\.sbt\0.13\plugins
[info] Loading project definition from C:\msys64\home\vkotacka\projects\scala\stags\project
[info] Set current project to root (in build file:/C:/msys64/home/vkotacka/projects/scala/stags/)
[success] Total time: 32 s, completed Aug 10, 2017 4:15:57 PM
[info] Updating {file:/C:/msys64/home/vkotacka/projects/scala/stags/}cli...
[info] Resolving jline#jline;2.14.3 ...
[info] Done updating.
[info] Compiling 5 Scala sources to C:\msys64\home\vkotacka\projects\scala\stags\cli\target\scala-2.12\classes...
[info] Including: inline_2.12-1.8.0.jar
[info] Including: fastparse_2.12-0.4.3.jar
[info] Including: parsers_2.12-1.8.0.jar
[info] Run completed in 61 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] No tests were executed.
[info] Including: scala-library.jar
[info] Including: semantic_2.12-1.8.0.jar
[info] Including: scalapb-runtime_2.12-0.6.0-pre2.jar
[info] Including: fastparse-utils_2.12-0.4.3.jar
[info] Including: trees_2.12-1.8.0.jar
[info] Including: inputs_2.12-1.8.0.jar
[info] Including: io_2.12-1.8.0.jar
[info] Including: tokens_2.12-1.8.0.jar
[info] Including: lenses_2.12-0.4.10.jar
[info] Including: tokenizers_2.12-1.8.0.jar
[info] Including: protobuf-java-3.2.0.jar
[info] Including: common_2.12-1.8.0.jar
[info] Including: sourcecode_2.12-0.1.3.jar
[info] Including: dialects_2.12-1.8.0.jar
[info] Including: scalameta_2.12-1.8.0.jar
[info] Including: scopt_2.12-3.5.0.jar
[info] Including: quasiquotes_2.12-1.8.0.jar
[info] Including: transversers_2.12-1.8.0.jar
[info] Checking every *.class/*.jar file's SHA-1.
[info] Merging files...
[warn] Merging 'META-INF\MANIFEST.MF' with strategy 'discard'
[warn] Merging 'META-INF\maven\com.google.protobuf\protobuf-java\pom.properties' with strategy 'discard'
[warn] Merging 'META-INF\maven\com.google.protobuf\protobuf-java\pom.xml' with strategy 'discard'
[warn] Strategy 'discard' was applied to 3 files
[info] SHA-1: 5ebb1d25dde4c4e768527ee7f0b0788963b69ea7
[info] Packaging C:\msys64\home\vkotacka\projects\scala\stags\cli\target\scala-2.12\stags-0.2.5-SNAPSHOT ...
[info] Done packaging.
java.lang.UnsupportedOperationException
at java.nio.file.Files.setPosixFilePermissions(Files.java:2044)
at $4ecf29e3788409d1bf40$$anonfun$cli$13.apply(build.sbt:62)
at $4ecf29e3788409d1bf40$$anonfun$cli$13.apply(build.sbt:45)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
[error] (cli/*:dist) java.lang.UnsupportedOperationException
[error] Total time: 51 s, completed Aug 10, 2017 4:16:47 PM
pjrt commented
Yeah I was actually going to remove that whole bin/install
thing. It is an old thing from before I got maven and coursier to run (I never even tried running it on a non-unix machine).
If you want to install it, I recommend coursier (see the README for how to do it). If this is because you want to run a modified version locally, call sbt cli/assembly
and make a script that uses the assembled jar.
It looks like, for you, the path is:
C:\msys64\home\vkotacka\projects\scala\stags\cli\target\scala-2.12\stags-0.2.5-SNAPSHOT
sw-samuraj commented
Alright. Installation via coursier has worked.