sbt/sbt-assembly — Issue #27: Configuration aware sbt-assembly
Author: n-a-g-r-o-m
Created: 2012-02-20 07:21:02+00:00
State: open

Hi,

Would it be possible to make the assembly commands aware of the configuration they are run in? For example I would like to package all my tests to jar (that contains also the test framework etc.), to make running the test set as easy as possible in any machine. This is what I do now:

```scala
mainClass in assembly <<= mainClass in Test

fullClasspath in assembly <<= fullClasspath in Test

dependencyClasspath in assembly <<= dependencyClasspath in Test
```

Well it works, but now it only builds me the package including tests. What I would like to do is to define something like

```scala
(mainClass in assembly) in Test <<= mainClass in Test

(fullClasspath in assembly) in Test <<= fullClasspath in Test

(dependencyClasspath in assembly) in Test <<= dependencyClasspath in Test
```
and run "test:assembly" to get my package with tests or run "assembly" to get my normal package. I use test just as an example, but making the assembly fully aware of the Configuration scope, would allow easy way to make different kind of far Jars from the same code base.