Skip to content

Production mode not working #16

@thibaultmeyer

Description

@thibaultmeyer

Hi

I use sbt uglify 1.0.3 on Java Play 2.4.3.

Everything is working on activator run but the pipeline crash with activator stage or activator dist.

It appear that plugin create a folder application.js.min rather than a file .

I've created a topic about this issue : https://groups.google.com/forum/#!topic/play-framework/11Wi5QEV5FU

build.sbt

UglifyKeys.uglifyOps := { js =>
  Seq((js.sortBy(_._2), "application.min.js"))
}

UglifyKeys.uglifyOps in Assets := { js =>
  Seq((js.sortBy(_._2), "application.min.js"))
}

pipelineStages := Seq(uglify)

pipelineStages in Assets := Seq(uglify)

Output

[info] Loading project definition from C:\Users\thiba\Documents\Programmation\io-payintech\project
[info] Set current project to io-payintech (in build file:/C:/Users/Thibault%20Meyer/Documents/Programmation/io-payintech/)
[info] Wrote C:\Users\thiba\Documents\Programmation\io-payintech\target\scala-2.11\io-payintech_2.11-release.pom
[info] Main Scala API documentation to C:\Users\thiba\Documents\Programmation\io-payintech\target\scala-2.11\api...
[info] Compiling 1 Scala source to C:\Users\thiba\Documents\Programmation\io-payintech\target\scala-2.11\classes...
[info] Optimizing 1 JavaScript(s) with Uglify
[info]
[info] Optimizing 1 JavaScript(s) with Uglify
[error] (node) util.error is deprecated. Use console.error instead.
[error] ERROR: can't read file: C:\Users\thiba\Documents\Programmation\io-payintech\target\web\uglify\build\application.min.js
[info]
[info] Packaging C:\Users\thiba\Documents\Programmation\io-payintech\target\scala-2.11\io-payintech_2.11-release.jar ...
model contains 120 documentable templates
[info] Done packaging.
[info] Main Scala API documentation successful.
[info] Packaging C:\Users\thiba\Documents\Programmation\io-payintech\target\scala-2.11\io-payintech_2.11-release-javadoc.jar ...
[info] Done packaging.
com.typesafe.sbt.jse.SbtJsTask$JsTaskFailure: (node) util.error is deprecated. Use console.error instead.
ERROR: can't read file: C:\Users\thiba\Documents\Programmation\io-payintech\target\web\uglify\build\application.min.js

        at com.typesafe.sbt.jse.SbtJsTask$$anonfun$com$typesafe$sbt$jse$SbtJsTask$$executeJsOnEngine$1.apply(SbtJsTask.scala:195)
        at com.typesafe.sbt.jse.SbtJsTask$$anonfun$com$typesafe$sbt$jse$SbtJsTask$$executeJsOnEngine$1.apply(SbtJsTask.scala:167)
        at scala.util.Success$$anonfun$map$1.apply(Try.scala:206)
        at scala.util.Try$.apply(Try.scala:161)
        at scala.util.Success.map(Try.scala:206)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
        at scala.concurrent.impl.ExecutionContextImpl$$anon$3.exec(ExecutionContextImpl.scala:107)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
[error] (*:webPipeline) com.typesafe.sbt.jse.SbtJsTask$JsTaskFailure: (node) util.error is deprecated. Use console.error instead.
[error] ERROR: can't read file: C:\Users\thiba\Documents\Programmation\io-payintech\target\web\uglify\build\application.min.js
[error] Total time: 8 s, completed 17 nov. 2015 17:57:37

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions