sbt-concat doesn't create groups for files in subfolders

317 views Asked by At

i'm trying to create a concat group using sbt-concat in a play framework project (v2.3.8). But it doesn't work. The files in the /app/assets/ folder are concatenated successfully but any group incorporating files in subfolders doesn't work. In the example below group_1.js is created but group_2.js isnt't created although after executing the command activator web-stage i see the message Building 2 concat group(s) displayed. What i'm doing wrong? Thank you very much for any hints in advance.

PS: I wanna use the concatenated files in development and production mode. How would i include the files in my template? Can i just use <script src="@routes.Assets.at("group_1.js")"> ?

Directory Layout:

+ app
--+ assets
------ c.js
------ d.js
-----+ js
--------+ foo
----------- a.js
----------- b.js
...
..
.

build.sbt:

    import play.PlayJava

    name := """test"""

    version := "1.0"

    scalaVersion := "2.11.1"

    lazy val root = (project in file(".")).enablePlugins(PlayJava, SbtWeb)

    libraryDependencies ++= Seq(
      javaCore,
      ...
    )

    Concat.groups := Seq(
        "group_1.js" -> group(Seq(
          "js/foo/a.js",
          "js/foo/b.js"
        )),
        "group_2.js" -> group(Seq(
           "c.js",
           "d.js"
         ))
      )

    pipelineStages := Seq(concat)

plugins.sbt:

logLevel := Level.Warn

resolvers ++= Seq(
  "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/",
  Resolver.sonatypeRepo("releases")
)

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")
addSbtPlugin("com.typesafe.sbt" % "sbt-web" % "1.1.1")
addSbtPlugin("net.ground5hark.sbt" % "sbt-concat" % "0.1.8")
0

There are 0 answers