sbt-assembly: option to skip generation of original build

337 views
Skip to first unread message

Nikolai Muhhin

unread,
May 11, 2012, 9:59:57 AM5/11/12
to simple-b...@googlegroups.com
In my build script I have next configuration for one of submodules

  lazy val importrunner = Project(
    id = "cps-importrunner",
    base = file("cps-importrunner"),
    settings = defaultSettings ++ assemblySettings ++
      addArtifact(Artifact("cps-importrunner", "assembly"), sbtassembly.Plugin.AssemblyKeys.assembly) ++ Seq(
        jarName in assembly := "cps-importrunner.jar",
        test in assembly := {},
        mainClass in assembly := Some("cps.runner.Main")
        )).dependsOn(common % "test->test;compile->compile", upc2cps % "test->test;compile->compile")

Running sbt publish-local produces 2 jar files in my target. First is pure cps-importrunner.jar, second is cps-importrunner-assembly.jar. I need only last one, but without 'assembly' classifier. 
changing arifact description to addArtifact(Artifact("cps-importrunner"), sbtassembly.Plugin.AssemblyKeys.assembly) ++ Seq(
solves problem in some way, but it does pretty the same thing - creates pure cps-importrunner.jar first, and then creates assembled cps-importrunner.jar without 'assembly' postfix overwriting first pure jar.
This looks little bit tricky for me. 

Is there any other option to exclude generating of first pure jar ?

Thank you!
Reply all
Reply to author
Forward
0 new messages