<commit_before>sbt-assembly
============

*Deploy fat JARs. Restart processes.*

sbt-assembly is a sbt plugin originally ported from codahale's assembly-sbt, which I'm guessing was inspired by Maven's assembly plugin. The goal is simple: Create a fat JAR of your project with all of its dependencies.

Requirements
------------

* sbt
* The burning desire to have a simple deploy procedure.

Reporting Issues & Contributing
-------------------------------

Before you email me, please read [Issue Reporting Guideline](CONTRIBUTING.md) carefully. Twice. (Don't email me)

Setup
-----

### Using Published Plugin

For sbt 0.13 add sbt-assembly as a dependency in `project/assembly.sbt`:

```scala
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.0")
```

For sbt 0.12, see [sbt-assemlby 0.9.2](https://github.com/sbt/sbt-assembly/tree/0.9.2).

(You may need to check this project's tags to see what the most recent release is.)

Usage
-----

### Applying the Plugin to a Project (Adding the `assembly` Task)

First, make sure that you've added the plugin to your build (either the published
builds or source from Git).


Put `assembly.sbt` at the root directory:

```scala
import AssemblyKeys._ // put this at the top of the file

assemblySettings

// your assembly settings here
```

If you are using multi-project `build.sbt`:

```scala
import AssemblyKeys._

lazy val buildSettings = Seq(
  version := "0.1-SNAPSHOT",
  organization := "com.example",
  scalaVersion := "2.10.1"
)

val app = (project in file("app")).
  settings(buildSettings: _*).
  settings(assemblySettings: _*).
  settings(
    // your settings here
  )
```

Now you'll have an awesome new `assembly` task which will compile your project,
run your tests, and then pack your class files and all your dependencies into a
single JAR file: `target/scala_X.X.X/projectname-assembly-X.X.X.jar`.

    > assembly

If you specify a `mainClass in assembly` in build.sbt (or just let it autodetect
one) then you'll end up with a fully executable JAR, ready to rock.

Here is the list of the keys you can rewire for `assembly` task. 

**NOTE**: Any customization must be written after `assemblySettings`.

    jarName                       test                          mainClass
    outputPath                    mergeStrategy                 assemblyOption
    excludedJars                  assembledMappings

For example the name of the jar can be set as follows in build.sbt:<commit_msg>bring back build.scala example. fixes #101<commit_after>sbt-assembly
============

*Deploy fat JARs. Restart processes.*

sbt-assembly is a sbt plugin originally ported from codahale's assembly-sbt, which I'm guessing was inspired by Maven's assembly plugin. The goal is simple: Create a fat JAR of your project with all of its dependencies.

Requirements
------------

* sbt
* The burning desire to have a simple deploy procedure.

Reporting Issues & Contributing
-------------------------------

Before you email me, please read [Issue Reporting Guideline](CONTRIBUTING.md) carefully. Twice. (Don't email me)

Setup
-----

### Using Published Plugin

For sbt 0.13 add sbt-assembly as a dependency in `project/assembly.sbt`:

```scala
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.0")
```

For sbt 0.12, see [sbt-assemlby 0.9.2](https://github.com/sbt/sbt-assembly/tree/0.9.2).

(You may need to check this project's tags to see what the most recent release is.)

Usage
-----

### Applying the plugin to a project (Adding the `assembly` Task)

First, make sure that you've added the plugin to your build (either the published
builds or source from Git).


Put `assembly.sbt` at the root directory:

```scala
import AssemblyKeys._ // put this at the top of the file

assemblySettings

// your assembly settings here
```

### Applying the plugin to multi-project build.sbt

If you are using multi-project `build.sbt`:

```scala
import AssemblyKeys._

lazy val buildSettings = Seq(
  version := "0.1-SNAPSHOT",
  organization := "com.example",
  scalaVersion := "2.10.1"
)

val app = (project in file("app")).
  settings(buildSettings: _*).
  settings(assemblySettings: _*).
  settings(
    // your settings here
  )
```

### Applying the plugin to multi-project build.scala

If you are using multi-project `build.scala`:

```
import sbt._
import Keys._
import sbtassembly.Plugin._
import AssemblyKeys._

object Builds extends Build {
  lazy val buildSettings = Defaults.defaultSettings ++ Seq(
    version := "0.1-SNAPSHOT",
    organization := "com.example",
    scalaVersion := "2.10.1"
  )

  lazy val app = Project("app", file("app"),
    settings = buildSettings ++ assemblySettings) settings(
      // your settings here
    )
}
```

### assembly task

Now you'll have an awesome new `assembly` task which will compile your project,
run your tests, and then pack your class files and all your dependencies into a
single JAR file: `target/scala_X.X.X/projectname-assembly-X.X.X.jar`.

    > assembly

If you specify a `mainClass in assembly` in build.sbt (or just let it autodetect
one) then you'll end up with a fully executable JAR, ready to rock.

Here is the list of the keys you can rewire for `assembly` task. 

**NOTE**: Any customization must be written after `assemblySettings`.

    jarName                       test                          mainClass
    outputPath                    mergeStrategy                 assemblyOption
    excludedJars                  assembledMappings

For example the name of the jar can be set as follows in build.sbt:
{'fraction_non_alphanumeric': 0.11344309752125928, 'fraction_numerical': 0.010313008865569025, 'mean_word_length': 3.073691967575534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4240524', 'n_tokens_mistral': 1687, 'n_tokens_neox': 1582, 'n_words': 647}