play framework(scala)에 reactjs를 실행시킬려면 sbt-reactjs를 사용해야 한다.

addSbtPlugin("com.github.ddispaltro" % "sbt-reactjs" % "0.6.8")


이 때 sbt version 은 1.0을 사용할 수 없다. 즉 sbt-reactjs를 못찾는다는 문구가 나온다. 


sbt.version=0.13.15



그래서 sbt.version을 1.0에서 0.13으로 내리니. 다음과 같은 에러가 많이 발생한다.



Error wrapping InputStream in GZIPInputStream: java.util.zip.ZipException: Not in GZIP format

at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)

at sbt.WrapUsing.open(Using.scala:34)

at sbt.Using.apply(Using.scala:23)

at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:877)

at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:876)

at sbt.Using.apply(Using.scala:24)

at sbt.IO$.gzipFileIn(IO.scala:876)

at sbt.Sync$.readUncaught(Sync.scala:88)

at sbt.Sync$.readInfo(Sync.scala:84)

at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:28)

at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)

at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:948)

at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:944)

at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:35)

at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:34)

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:745)

Caused by: java.util.zip.ZipException: Not in GZIP format

at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:165)

at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)

at sbt.Using$$anonfun$gzipInputStream$1.apply(Using.scala:84)

at sbt.Using$$anonfun$gzipInputStream$1.apply(Using.scala:84)

at sbt.Using$$anon$1.openImpl(Using.scala:51)

at sbt.WrapUsing$$anonfun$open$2.apply(Using.scala:34)

at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)

at sbt.WrapUsing.open(Using.scala:34)

at sbt.Using.apply(Using.scala:23)

at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:877)

at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:876)

at sbt.Using.apply(Using.scala:24)

at sbt.IO$.gzipFileIn(IO.scala:876)

at sbt.Sync$.readUncaught(Sync.scala:88)

at sbt.Sync$.readInfo(Sync.scala:84)

at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:28)

at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)

at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:948)

at sbt.Defaults$$anonfun$copyResourcesTask$1.apply(Defaults.scala:944)

at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:35)

at scala.Function4$$anonfun$tupled$1.apply(Function4.scala:34)

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:745)

[error] (compile:copyResources) Error wrapping InputStream in GZIPInputStream: java.util.zip.ZipException: Not in GZIP format





그래서 프로젝트 홈에서 다음 커맨드로 target 디렉토리의 모든 소스를 삭제하니. 잘 동작한다. 


find . -name target -exec rm -r "{}" \;




그런데. org.webjars.npm#minimatch 버전을 다운을 받을 수 없다고 나온다. 



plugin.sbt 파일에 다음을 추가해서 컴파일 제외시키고.. 

addSbtPlugin("com.github.ddispaltro" % "sbt-reactjs" % "0.6.8" 
                        exclude ("org.webjars.npm", "minimatch"))



build.sbt에 minimatch 라이브러리 3.0.0를 강제로 의존성을 갖게 한다.

dependencyOverrides += "org.webjars.npm" % "minimatch" % "3.0.0"


잘 동작한다...





Posted by 김용환 '김용환'