Skip to content
Newer
Older
100644 188 lines (155 sloc) 6.55 KB
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
1 /*
2 * Copyright 2012 WorldWide Conferencing, LLC
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 import sbt._
18 import Keys._
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
19 import net.liftweb.sbt.LiftBuildPlugin._
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
20 import Dependencies._
21
22
23 object BuildDef extends Build {
24
25 lazy val liftProjects = core ++ web ++ persistence
26
27 lazy val framework =
28 liftProject("lift-framework", file("."))
29 .aggregate(liftProjects: _*)
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
30 .settings(aggregatedSetting(sources in(Compile, doc)),
31 aggregatedSetting(dependencyClasspath in(Compile, doc)),
32 publishArtifact := false)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
33
34 // Core Projects
35 // -------------
36 lazy val core: Seq[ProjectReference] =
37 Seq(common, actor, json, json_scalaz, json_ext, util)
38
39 lazy val common =
40 coreProject("common")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
41 .settings(description := "Common Libraties and Utilities",
42 libraryDependencies ++= Seq(slf4j_api, logback, slf4j_log4j12, commons_codec))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
43
44 lazy val actor =
45 coreProject("actor")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
46 .dependsOn(common)
47 .settings(description := "Simple Actor")
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
48
49 lazy val json =
50 coreProject("json")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
51 .settings(description := "JSON Library",
52 libraryDependencies <++= scalaVersion { sv => Seq(scalap(sv), paranamer) })
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
53
54 lazy val json_scalaz =
55 coreProject("json-scalaz")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
56 .dependsOn(json)
57 .settings(description := "JSON Library based on Scalaz",
58 libraryDependencies <+= scalaVersion(scalaz))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
59
60 lazy val json_ext =
61 coreProject("json-ext")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
62 .dependsOn(common, json)
63 .settings(description := "Extentions to JSON Library",
64 libraryDependencies ++= Seq(commons_codec, joda_time))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
65
66 lazy val util =
67 coreProject("util")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
68 .dependsOn(actor, json)
69 .settings(description := "Utilities Library",
70 parallelExecution in Test := false,
71 libraryDependencies ++= Seq(joda_time, commons_codec, javamail, log4j, htmlparser))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
72
73
74 // Web Projects
75 // ------------
76 lazy val web: Seq[ProjectReference] =
77 Seq(testkit, webkit, wizard)
78
79 lazy val testkit =
80 webProject("testkit")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
81 .dependsOn(util)
82 .settings(description := "Testkit for Webkit Library",
83 libraryDependencies ++= Seq(commons_httpclient, servlet_api))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
84
85 lazy val webkit =
86 webProject("webkit")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
87 .dependsOn(util, testkit % "provided")
88 .settings(description := "Webkit Library",
89 parallelExecution in Test := false,
90 libraryDependencies <++= scalaVersion { sv =>
91 Seq(commons_fileupload, servlet_api, specs(sv).copy(configurations = Some("provided")), jetty6, jwebunit)
92 },
93 initialize in Test <<= (sourceDirectory in Test) { src =>
94 System.setProperty("net.liftweb.webapptest.src.test.webapp", (src / "webapp").absString)
95 })
96
97 lazy val wizard =
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
98 webProject("wizard")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
99 .dependsOn(webkit, db)
100 .settings(description := "Wizard Library")
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
101
102
103 // Persistence Projects
104 // --------------------
105 lazy val persistence: Seq[ProjectReference] =
106 Seq(db, proto, jpa, mapper, record, couchdb, squeryl_record, mongodb, mongodb_record, ldap)
107
108 lazy val db =
109 persistenceProject("db")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
110 .dependsOn(util)
111 .settings(libraryDependencies += mockito_all)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
112
113 lazy val proto =
114 persistenceProject("proto")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
115 .dependsOn(webkit)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
116
117 lazy val jpa =
118 persistenceProject("jpa")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
119 .dependsOn(webkit)
120 .settings(libraryDependencies ++= Seq(scalajpa, persistence_api))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
121
122 lazy val mapper =
123 persistenceProject("mapper")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
124 .dependsOn(db, proto)
125 .settings(description := "Mapper Library",
126 parallelExecution in Test := false,
127 libraryDependencies ++= Seq(h2, derby),
128 initialize in Test <<= (crossTarget in Test) { ct =>
129 System.setProperty("derby.stream.error.file", (ct / "derby.log").absolutePath)
130 })
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
131
132 lazy val record =
133 persistenceProject("record")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
134 .dependsOn(proto, db)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
135
136 lazy val couchdb =
137 persistenceProject("couchdb")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
138 .dependsOn(record)
139 .settings(libraryDependencies += dispatch_http)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
140
141 lazy val squeryl_record =
142 persistenceProject("squeryl-record")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
143 .dependsOn(record, db)
144 .settings(libraryDependencies ++= Seq(h2, squeryl))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
145
146 lazy val mongodb =
147 persistenceProject("mongodb")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
148 .dependsOn(json_ext)
149 .settings(parallelExecution in Test := false,
150 libraryDependencies += mongo_driver,
151 initialize in Test <<= (classDirectory in Test) { cdir =>
152 System.setProperty("java.util.logging.config.file", (cdir / "logging.properties").absolutePath)
153 })
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
154
155 lazy val mongodb_record =
156 persistenceProject("mongodb-record")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
157 .dependsOn(record, mongodb)
158 .settings(parallelExecution in Test := false)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
159
160 lazy val ldap =
161 persistenceProject("ldap")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
162 .dependsOn(mapper)
163 .settings(libraryDependencies += apacheds,
164 initialize in Test <<= (crossTarget in Test) { ct =>
165 System.setProperty("apacheds.working.dir", (ct / "apacheds").absolutePath)
166 })
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
167
168 def coreProject = liftProject("core") _
169 def webProject = liftProject("web") _
170 def persistenceProject = liftProject("persistence") _
171
172 /** Project definition helper that simplifies creation of `ProjectReference`.
173 *
174 * It is a convenience method to create a Lift `ProjectReference` module by having the boilerplate for most common
175 * activities tucked in.
176 *
177 * @param base the base path location of project module.
178 * @param prefix the prefix of project module.
179 * @param module the name of the project module. Typically, a project id is of the form lift-`module`.
180 */
181 def liftProject(base: String, prefix: String = "lift-")(module: String): Project =
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
182 liftProject(id = if (module.startsWith(prefix)) module else prefix + module,
183 base = file(base) / module.stripPrefix(prefix))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
184
185 def liftProject(id: String, base: File): Project =
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
186 Project(id, base).settings(liftBuildSettings: _*)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
187 }
Something went wrong with that request. Please try again.