From 276ccdedafc3ac6e2a04eb1dc6cfafefb9fad871 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 4 Dec 2013 18:50:54 -0800 Subject: [PATCH 1/2] Remove redundant mappings setting. --- standard.sbt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/standard.sbt b/standard.sbt index 11509aba..636958d1 100644 --- a/standard.sbt +++ b/standard.sbt @@ -22,10 +22,6 @@ resourceGenerators in Compile <+= Def.task { Seq(file) } -mappings in (Compile, packageBin) += { - (baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties" -} - // maven publishing publishTo := { From d18f424bdb17245543989d908a5355f575cb7a83 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 4 Dec 2013 18:51:38 -0800 Subject: [PATCH 2/2] OSGify. Note the importance of having osgiSettings in the main build. --- build.sbt | 5 +++++ standard.sbt | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/build.sbt b/build.sbt index 79775d95..f92b1949 100644 --- a/build.sbt +++ b/build.sbt @@ -9,3 +9,8 @@ version := "1.0.0-SNAPSHOT" scalaVersion := "2.11.0-M7" snapshotScalaBinaryVersion := "2.11.0-M7" + +// important!! must come here (why?) +osgiSettings + +OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") diff --git a/standard.sbt b/standard.sbt index 636958d1..55a3fb4f 100644 --- a/standard.sbt +++ b/standard.sbt @@ -67,3 +67,17 @@ pomExtra := ( ) + +val osgiVersion = version(_.replace('-', '.')) + +OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}" + +OsgiKeys.bundleVersion := osgiVersion.value + +// Sources should also have a nice MANIFEST file +packageOptions in packageSrc := Seq(Package.ManifestAttributes( + ("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"), + ("Bundle-Name", s"${name.value} sources"), + ("Bundle-Version", osgiVersion.value), + ("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""") + )) \ No newline at end of file