Closed vjpr closed 12 years ago
I have since resolved this issue by using:
(resourceManaged in (Compile, CoffeeKeys.coffee)) <<= (resourceManaged in Compile)
instead of:
(resourceManaged in (Compile, CoffeeKeys.scalate)) <<= (crossTarget in Compile)(_ / "classes" / "public" / "js")
On Sat, Nov 12, 2011 at 6:22 AM, Vaughan Rouesnel < reply@reply.github.com
wrote:
It appears that when you compile two files with the same name but in different folders - the sbt
copy-resources
task produces the following error:[error] {file:/Users/Vaughan/dev/x-unfiltered/}default-8111a8/compile:copy-resources: Duplicate mappings: [error] /Users/Vaughan/dev/x-unfiltered/target/scala-2.9.1/classes/RPCClient.js [error] from [error] /Users/Vaughan/dev/x-unfiltered/target/scala-2.9.1/classes/extension/chrome/javascripts/rpc/RPCClient.js [error] /Users/Vaughan/dev/x-unfiltered/target/scala-2.9.1/classes/public/javascripts/rpc/RPCClient.js
By running sbt with debug level logging (
set logLevel in Global := Level.Debug
) I get the following debug output showing the problem:[debug] Copy resource mappings: debug debug debug
The problem appears to be that coffeescripted-sbt artifacts are being mapped to files in the
classes
directory - the root compilation directory. This also occurs for less-sbt artifacts too. This is an unnecessary step and I'm not sure why it is doing this.I think it must be something to do with the
compile:managed-resource-directories
setting being used by thecompile:copy-resources
task.Not sure whether this can be fixed or if its an sbt bug?
Thanks I'll look into it it. What version of sbt/coffeescripted-sbt are you using?
Version 0.2.0.
I've closed the ticket already as it appeared to be a problem with using the custom output directory, that is, using resourceManaged
instead of crossTarget
.
Might be worth putting a note in the documentation about it.
It appears that when you compile two files with the same name but in different folders - the sbt
copy-resources
task produces the following error:By running sbt with debug level logging (
set logLevel in Global := Level.Debug
) I get the following debug output showing the problem:The problem appears to be that coffeescripted-sbt artifacts are being mapped to files in the
classes
directory - the root compilation directory. This also occurs for less-sbt artifacts too. This is an unnecessary step and I'm not sure why it is doing this.I think it must be something to do with the
compile:managed-resource-directories
setting being used by thecompile:copy-resources
task.This only occurs when using a custom output directory as recommended:
Not sure whether this can be fixed or if its an sbt bug?