Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

re #968: Added OSGi support to SBT build.

  • Loading branch information...
commit 3100c6e52c56e05c61fdcbd314e132a481c229cb 1 parent 58f11b5
Heiko Seeberger authored
View
7 project/build/LiftFrameworkProject.scala
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+import com.weiglewilczek.bnd4sbt.BNDPlugin
import java.util.Calendar
import java.util.jar.Attributes.Name
import sbt._
@@ -90,7 +91,7 @@ class LiftFrameworkProject(info: ProjectInfo) extends ParentProject(info) with L
// Default base
// ------------
- class FrameworkProject(info: ProjectInfo, libs: ModuleID*) extends DefaultProject(info) with LiftDefaultProject {
+ class FrameworkProject(info: ProjectInfo, libs: ModuleID*) extends DefaultProject(info) with BNDPlugin with LiftDefaultProject {
override def libraryDependencies = super.libraryDependencies ++ libs
@@ -100,6 +101,10 @@ class LiftFrameworkProject(info: ProjectInfo) extends ParentProject(info) with L
// FIXME: Build fails with -Xcheckinit -Xwarninit
override def compileOptions = super.compileOptions.toList -- compileOptions("-Xcheckinit", "-Xwarninit").toList
+ // OSGi stuff
+ override def bndExportPackage = Seq("net.liftweb.*;version=\"%s\"".format(projectVersion.value))
+ override def bndImportPackage = "net.liftweb.*;version=\"%s\"".format(projectVersion.value) :: super.bndImportPackage.toList
+
// System properties necessary during test TODO: Figure out how to make this a subdir of persistence/ldap/
System.setProperty("apacheds.working.dir", (outputPath / "apacheds").absolutePath)
}
View
1  project/plugins/Plugins.scala
@@ -6,4 +6,5 @@ class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
// Add plugin
lazy val a = "net.liftweb" % "lift-sbt" % "2.4-SNAPSHOT"
+ lazy val bnd4sbt = "com.weiglewilczek.bnd4sbt" % "bnd4sbt" % "1.0.2"
}
Please sign in to comment.
Something went wrong with that request. Please try again.