Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: b8eb1d0828
Fetching contributors…

Cannot retrieve contributors at this time

102 lines (76 sloc) 4.588 kB
* Copyright 2010-2011 WorldWide Conferencing, LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* See the License for the specific language governing permissions and
* limitations under the License.
import sbt._
import net.liftweb.sbt._
class LiftFrameworkProject(info: ProjectInfo) extends ParentProject(info) with LiftParentProject {
import CompileScope._
import ProvidedScope._
// Core projects
// -------------
lazy val common = coreProject("common", slf4j_api, logback, log4j)()
lazy val actor = coreProject("actor")(common)
lazy val json = coreProject("json", paranamer)()
lazy val json_ext = coreProject("json-ext", commons_codec, joda_time)(common, json)
lazy val util = coreProject("util", joda_time, commons_codec, javamail, log4j, htmlparser)(actor, json)
// Web projects
// ------------
lazy val testkit = webProject("testkit", commons_httpclient, servlet_api)(util)
lazy val webkit = webkitProject("webkit", commons_fileupload, servlet_api, TestScope.jetty6, TestScope.jwebunit)(util, testkit)
lazy val wizard = webProject("wizard")(webkit, db)
// Persistence projects
// --------------------
lazy val db = persistenceProject("db")(util)
lazy val proto = persistenceProject("proto")(webkit)
lazy val jpa = persistenceProject("jpa", scalajpa, persistence_api)(webkit)
lazy val mapper = persistenceProject("mapper", RuntimeScope.h2database, RuntimeScope.derby)(db, proto)
lazy val record = persistenceProject("record")(mapper)
lazy val ldap = persistenceProject("ldap", TestScope.apacheds)(mapper)
lazy val couchdb = persistenceProject("couchdb", dispatch_http)(record)
lazy val squeryl_record = persistenceProject("squeryl-record", RuntimeScope.h2database, squeryl)(record)
lazy val mongodb = persistenceProject("mongodb", mongo_driver)(json_ext)
lazy val mongodb_record = persistenceProject("mongodb-record", dispatch_http)(record, mongodb)
// Framework apidocs
// -----------------
lazy val framework_doc = project(".", "lift-framework-doc", new DefaultProject(_) with LiftDefaultDocProject)
private def coreProject = frameworkProject("core") _
private def webProject = frameworkProject("web") _
private def persistenceProject = frameworkProject("persistence") _
private def frameworkProject(base: String)(path: String, libs: ModuleID*)(deps: Project*) =
project(base / path, "lift-" + path, new FrameworkProject(_, libs: _*), deps: _*)
// Webkit Project has testkit dependency in non-default scope -- needs special treatment
// so that it doesn't fall over.
// Ref:
private def webkitProject(path: String, libs: ModuleID*)(deps: Project*) =
project("web" / path, "lift-" + path, new FrameworkProject(_, libs: _*) {
// Specs needed in 'provided' scope, this will lead to duplications in testclasspath though
override def libraryDependencies =
super.libraryDependencies ++ Seq("org.scala-tools.testing" %% "specs" % specsVersion % "provided")
// Move testkit dependency from 'compile' (default) to 'provided' scope
override def deliverProjectDependencies =
testkit.projectID % "provided" :: super.deliverProjectDependencies.toList - testkit.projectID
// System properties necessary during test
System.setProperty("net.liftweb.webapptest.src.test.webapp", (testSourcePath / "webapp").absString)
}, deps: _*)
// Default base
// ------------
class FrameworkProject(info: ProjectInfo, libs: ModuleID*) extends DefaultProject(info) with LiftDefaultProject {
override def libraryDependencies = super.libraryDependencies ++ libs
// FIXME: Build fails with -Xcheckinit -Xwarninit
override def compileOptions = super.compileOptions.toList -- compileOptions("-Xcheckinit", "-Xwarninit").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)
Jump to Line
Something went wrong with that request. Please try again.