Comments (8)
How about:
Seq(digest, rjs, digest)
I've not tried that though....
from sbt-web.
This doesn't work.
With the pipeline Seq(digest, rjs, digest, gzip)
I get:
java.util.zip.ZipException: duplicate entry: public/css/error/bed54f9c63eebb80e9c2137b2d48daa4-sprites.min.css.map
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:215)
at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:109)
at sbt.IO$.sbt$IO$$addFileEntry$1(IO.scala:445)
at sbt.IO$$anonfun$sbt$IO$$writeZip$2.apply(IO.scala:454)
at sbt.IO$$anonfun$sbt$IO$$writeZip$2.apply(IO.scala:454)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at sbt.IO$.sbt$IO$$writeZip(IO.scala:454)
at sbt.IO$$anonfun$archive$1.apply(IO.scala:407)
at sbt.IO$$anonfun$archive$1.apply(IO.scala:405)
at sbt.IO$$anonfun$withZipOutput$1.apply(IO.scala:500)
at sbt.IO$$anonfun$withZipOutput$1.apply(IO.scala:486)
at sbt.Using.apply(Using.scala:25)
at sbt.IO$.withZipOutput(IO.scala:486)
at sbt.IO$.archive(IO.scala:405)
at sbt.IO$.jar(IO.scala:388)
at sbt.Package$.makeJar(Package.scala:107)
at sbt.Package$$anonfun$3$$anonfun$apply$3.apply(Package.scala:72)
at sbt.Package$$anonfun$3$$anonfun$apply$3.apply(Package.scala:70)
at sbt.Tracked$$anonfun$outputChanged$1.apply(Tracked.scala:57)
at sbt.Tracked$$anonfun$outputChanged$1.apply(Tracked.scala:52)
at sbt.Package$.apply(Package.scala:80)
at sbt.Defaults$$anonfun$packageTask$1.apply(Defaults.scala:650)
at sbt.Defaults$$anonfun$packageTask$1.apply(Defaults.scala:649)
at scala.Function2$$anonfun$tupled$1.apply(Function2.scala:54)
at scala.Function2$$anonfun$tupled$1.apply(Function2.scala:53)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[error] (*:playPackageAssets) java.util.zip.ZipException: duplicate entry: public/css/error/bed54f9c63eebb80e9c2137b2d48daa4-sprites.min.css.map
With the pipeline Seq(digest, rjs, digest)
I get:
java.io.FileNotFoundException: /home/christian/Projects/my.project/target/web/less/main/css/utils/_main.min.css.map (File or directory not found)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at org.apache.ivy.util.ChecksumHelper.compute(ChecksumHelper.java:96)
at org.apache.ivy.util.ChecksumHelper.computeAsString(ChecksumHelper.java:92)
at com.typesafe.sbt.digest.SbtDigest$.com$typesafe$sbt$digest$SbtDigest$$generateChecksumFiles(SbtDigest.scala:41)
at com.typesafe.sbt.digest.SbtDigest$$anonfun$checksumFiles$1$$anonfun$apply$1$$anonfun$3$$anonfun$apply$2.apply(SbtDigest.scala:60)
at com.typesafe.sbt.digest.SbtDigest$$anonfun$checksumFiles$1$$anonfun$apply$1$$anonfun$3$$anonfun$apply$2.apply(SbtDigest.scala:59)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
at com.typesafe.sbt.digest.SbtDigest$$anonfun$checksumFiles$1$$anonfun$apply$1$$anonfun$3.apply(SbtDigest.scala:59)
at com.typesafe.sbt.digest.SbtDigest$$anonfun$checksumFiles$1$$anonfun$apply$1$$anonfun$3.apply(SbtDigest.scala:58)
at scala.collection.TraversableLike$WithFilter$$anonfun$flatMap$2.apply(TraversableLike.scala:753)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at scala.collection.TraversableLike$WithFilter.flatMap(TraversableLike.scala:752)
at com.typesafe.sbt.digest.SbtDigest$$anonfun$checksumFiles$1$$anonfun$apply$1.apply(SbtDigest.scala:58)
at com.typesafe.sbt.digest.SbtDigest$$anonfun$checksumFiles$1$$anonfun$apply$1.apply(SbtDigest.scala:53)
at scala.Function$$anonfun$chain$1$$anonfun$apply$1.apply(Function.scala:24)
at scala.Function$$anonfun$chain$1$$anonfun$apply$1.apply(Function.scala:24)
at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:111)
at scala.collection.immutable.List.foldLeft(List.scala:84)
at scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:138)
at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:105)
at scala.Function$$anonfun$chain$1.apply(Function.scala:24)
at com.typesafe.sbt.web.SbtWeb$$anonfun$projectSettings$36.apply(SbtWeb.scala:208)
at com.typesafe.sbt.web.SbtWeb$$anonfun$projectSettings$36.apply(SbtWeb.scala:208)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[error] (*:webPipeline) java.io.FileNotFoundException: /home/christian/Projects/my.project/target/web/less/main/css/utils/_main.min.css.map (File or directory not found)
from sbt-web.
@pvlugter Any thoughts on this?
from sbt-web.
I think that the best approach here would be to update any urls within js, css and html assets with their digest counterparts as the last stage in the pipeline. Here's a plugin that is already doing it for minified files, but could go further: https://github.com/neomaclin/sbt-simple-url-update#sbt-simple-url-update
Given a file it is quite easy to map it back to its non digested form if the filename has a digest in it. Here's how to get the digest given a file and see if it exists:
val f = new File("a/1234567890-b.txt")
val n = f.getName
val i = n.indexOf('-')
val nf = if (i == -1) f else new File(f.getParent, n.drop(i + 1))
nf.exists
Feel like raising a PR on that plugin? :-)
from sbt-web.
I've created an issue for the plugin you mentioned. And we came to the decision that it would be better to create a new plugin for this use case. So for now I'l close this issue. Thanks
from sbt-web.
The issue you refer to is closed...
from sbt-web.
The issue you refer to is closed...
Yes, because we came to the decision that it would be better to create a new plugin for this use case. So it isn't an issue with this plugin.
from sbt-web.
Was there any resolution here? If not, what is the workaround? Or is it a choice between RJS and access to digests?
from sbt-web.
Related Issues (20)
- Merging source maps
- sbt-web throws NPE multi project angular 2 non play build HOT 1
- sbt-web 1.4.0 does not work with sbt-rjs HOT 4
- pipelineStages in Assets makes the build hang HOT 2
- Project status ? HOT 1
- Managed ClassPath in Runtime + Scala.js causes Intellij to Perform Full Optimized Scala.js build in project load HOT 10
- Better fork of sbt-traceur
- Update for sbt 1.0.x HOT 3
- Detect production mode HOT 2
- Different settings when using `sbt run` and `sbt stage`
- How to change output path in JAR? HOT 1
- Memory leak when switching branches, testing and reloading HOT 2
- sbt-web fails under sbt 1.3.0-RC1 HOT 3
- "org.webjars.npm" % "core-js"not included in web-modules HOT 2
- Problems hooking task into asset phase
- defining a sourceGenerator from a subproject
- Migrate repository away from travis-ci.org HOT 1
- "overview of sbt-web" link is broken HOT 1
- Move sbt-web off bintray
- Travis CI dropped HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-web.