implicit.ly

Scala software, hot off the presses

sbt-assembly 0.8.1

minor enhancements

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

via herald

Filed under  //   sbt-assembly  

sbt-assembly 0.8.0

Merge Strategy

sbt-assembly 0.8.0 adds merge strategy feature contributed by @rkuhn (Roland from Akka team) and @sirthias (Mathias the spray guy).

The original use case for MergeStrategy is to merge reference.conf from multiple Akka jars into one configuration file. We then realized that a strategy can be expressed as a function value Seq[File] => Either[String, File], which takes a sequence of conflicted files and returns either an error message or a file. The actual type is a bit more complicated, but that's the gist. Let's look at the six strategies that we ship with sbt-assembly.

  • MergeStrategy.first picks the first of the conflicting files in classpath order
  • MergeStrategy.last picks the last one
  • MergeStrategy.error bails out with an error message
  • MergeStrategy.deduplicate verifies that all candidates have the same contents and error out otherwise
  • MergeStrategy.concat simply concatenates all conflicting files and includes the result
  • MergeStrategy.filterDistinctLines also concatenates, but leaves out duplicates along the way

A function from path name to a merge strategy can be set to newly added mergeStrategy key. The default implementation looks like this:

mergeStrategy in assembly := { 
  case "reference.conf" => MergeStrategy.concat
  case n if n.startsWith("META-INF/services/") => MergeStrategy.filterDistinctLines
  case _ => MergeStrategy.deduplicate
}

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

via herald

Filed under  //   sbt-assembly  

sbt-assembly 0.7.4

minor updates

  • excludes license files under base dirs.
  • adds assembledMappings task to allow customization of jar content.

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

via herald

Filed under  //   sbt-assembly  

sbt-assembly 0.7.3

bug fixes and minor updates

In plugins.sbt:

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.7.3")

resolvers += Resolver.url("sbt-plugin-releases",
  new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

Filed under  //   Scala 2.9.1   com.eed3si9n   sbt-assembly  

sbt-assembly 0.7.2

bug fixes and minor updates

  • sbt 0.11.1
  • closes service provider files when done reading them. contributed by @rjmac
  • fixes META-INF/services merging. contributed by @rjmac

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

Filed under  //   Scala 2.9.1   com.eed3si9n   sbt-assembly  

sbt-assembly 0.7.1

bug fixes

  • Fixes exclusion of binary via packageDependency, assembleArtifact in packageBin, etc. #18 reported by @vasa-chi .

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

Filed under  //   Scala 2.9.1   com.eed3si9n   sbt-assembly  

sbt-assembly 0.7.0

breaking changes

In an effort to solve namespace conflicts and to increase consistency among the plugins, a number of sbt plugin authors have discussed on the mailing list, and come up with sbt plugins best practices. I've made my effort to conform to the guideline while minimizing the impact on the existing builds. Here are the changes:

keys are under AssemblyKeys object

Keys provided by sbt-assembly now resides in AssemblyKeys object. Place the following at the top of your build.sbt:

import AssemblyKeys._

Scala identifiers for the keys remain the same (e.g. jarName), but key names accessible from the shell are now prefixed with assembly- (e.g. assembly-jar-name).

settings are scoped under assembly

assembly-specific settings are now scoped under assembly task, instead of Assembly configuration.

jarName in assembly := "foo.jar"

use assembleArtifact instead of publishArtifact

To exclude Scala library,

assembleArtifact in packageScala := false

configuration-neutral

To build assembly for Test configuration,

seq(inConfig(Test)(baseAssemblySettings): _*)

jarName in (Test, assembly) := "foo-test.jar"

minor enhancements and bug fixes

  • Adds excludedJars setting to skip certain jars.

To exclude some jar file, first consider using "provided" dependency. The dependency will be part of compilation, but excluded from the runtime. Next, try creating a custom configuration that describes your classpath. If all efforts fail, here's a way to exclude jars:

excludedJars in assembly <<= (fullClasspath in assembly) map { cp => 
  cp filter {_.data.getName == "compile-0.1.0.jar"}
}

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

Filed under  //   Scala 2.9.1   com.eed3si9n   sbt-assembly  

sbt-assembly 0.6

  • Fixes exclusion filtering to filter out only license and MANIFEST.MF. #11 reported by @rollinsruss.
  • Adds publishArtifact setting to disable output of packageBin, packageScala, and packageDependency. #3 and #4 requested by @ijuma.

To exclude Scala library,

publishArtifact in (Assembly, packageScala) := false

To exclude your source files,

publishArtifact in (Assembly, packageBin) := false

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

Filed under  //   Scala 2.8.1   com.eed3si9n   sbt-assembly  

sbt-assembly 0.5

bug fixes

  • Fixes META-INF merging. #9 reported by @tlockney.

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

Filed under  //   Scala 2.8.1   com.eed3si9n   sbt-assembly  

sbt-assembly 0.4

breaking changes

Settings are no longer loaded automatically. Add the following to build.sbt:

seq(sbtassembly.Plugin.assemblySettings: _*)

sbt-assembly is a plug-in for Simple Build Tool that creates a single jar of your project including all of its dependencies.

Filed under  //   Scala 2.8.1   com.eed3si9n   sbt-assembly