closes #16: Publish as OSGi bundle

This commit is contained in:
Heiko Seeberger 2012-05-21 11:51:08 +02:00
parent 765b61a80b
commit 11b9af503a
2 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import sbt._
import Keys._
import com.typesafe.sbtosgi.OsgiPlugin._
object ConfigBuild extends Build {
val unpublished = Seq(
@ -29,7 +30,15 @@ object ConfigBuild extends Build {
lazy val configLib = Project(id = "config",
base = file("config"),
settings = Project.defaultSettings ++ sonatype.settings) dependsOn(testLib % "test->test")
settings =
Project.defaultSettings ++
sonatype.settings ++
osgiSettings ++
Seq(
OsgiKeys.exportPackage := Seq("com.typesafe.config"),
packagedArtifact in (Compile, packageBin) <<= (artifact in (Compile, packageBin), OsgiKeys.bundle).identityMap,
artifact in (Compile, packageBin) ~= { _.copy(`type` = "bundle") }
)) dependsOn(testLib % "test->test")
lazy val testLib = Project(id = "test-lib",
base = file("test-lib"),

View File

@ -9,3 +9,5 @@ addSbtPlugin("de.johoop" % "jacoco4sbt" % "1.2.2")
resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
addSbtPlugin("com.typesafe.sbtosgi" % "sbtosgi" % "0.2.0")