Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 190 lines (157 sloc) 6.812 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",
aa8a9e0 @indrajitr lift-common doesn't need commons-codec
indrajitr authored
42 libraryDependencies ++= Seq(slf4j_api, logback, slf4j_log4j12))
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)
3de543d @indrajitr Disable parallel execution of test for lift-actor, lift-json
indrajitr authored
47 .settings(description := "Simple Actor",
48 parallelExecution in Test := false)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
49
50 lazy val json =
51 coreProject("json")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
52 .settings(description := "JSON Library",
3de543d @indrajitr Disable parallel execution of test for lift-actor, lift-json
indrajitr authored
53 parallelExecution in Test := false,
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
54 libraryDependencies <++= scalaVersion { sv => Seq(scalap(sv), paranamer) })
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
55
56 lazy val json_scalaz =
57 coreProject("json-scalaz")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
58 .dependsOn(json)
59 .settings(description := "JSON Library based on Scalaz",
60 libraryDependencies <+= scalaVersion(scalaz))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
61
62 lazy val json_ext =
63 coreProject("json-ext")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
64 .dependsOn(common, json)
65 .settings(description := "Extentions to JSON Library",
66 libraryDependencies ++= Seq(commons_codec, joda_time))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
67
68 lazy val util =
69 coreProject("util")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
70 .dependsOn(actor, json)
71 .settings(description := "Utilities Library",
72 parallelExecution in Test := false,
73 libraryDependencies ++= Seq(joda_time, commons_codec, javamail, log4j, htmlparser))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
74
75
76 // Web Projects
77 // ------------
78 lazy val web: Seq[ProjectReference] =
79 Seq(testkit, webkit, wizard)
80
81 lazy val testkit =
82 webProject("testkit")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
83 .dependsOn(util)
84 .settings(description := "Testkit for Webkit Library",
85 libraryDependencies ++= Seq(commons_httpclient, servlet_api))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
86
87 lazy val webkit =
88 webProject("webkit")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
89 .dependsOn(util, testkit % "provided")
90 .settings(description := "Webkit Library",
91 parallelExecution in Test := false,
92 libraryDependencies <++= scalaVersion { sv =>
93 Seq(commons_fileupload, servlet_api, specs(sv).copy(configurations = Some("provided")), jetty6, jwebunit)
94 },
95 initialize in Test <<= (sourceDirectory in Test) { src =>
96 System.setProperty("net.liftweb.webapptest.src.test.webapp", (src / "webapp").absString)
97 })
98
99 lazy val wizard =
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
100 webProject("wizard")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
101 .dependsOn(webkit, db)
102 .settings(description := "Wizard Library")
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
103
104
105 // Persistence Projects
106 // --------------------
107 lazy val persistence: Seq[ProjectReference] =
108 Seq(db, proto, jpa, mapper, record, couchdb, squeryl_record, mongodb, mongodb_record, ldap)
109
110 lazy val db =
111 persistenceProject("db")
380ccf0 @dpp Addresses #1235 by being explicit that an exception was thrown in an out...
dpp authored
112 .dependsOn(util, webkit)
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
113 .settings(libraryDependencies += mockito_all)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
114
115 lazy val proto =
116 persistenceProject("proto")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
117 .dependsOn(webkit)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
118
119 lazy val jpa =
120 persistenceProject("jpa")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
121 .dependsOn(webkit)
122 .settings(libraryDependencies ++= Seq(scalajpa, persistence_api))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
123
124 lazy val mapper =
125 persistenceProject("mapper")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
126 .dependsOn(db, proto)
127 .settings(description := "Mapper Library",
128 parallelExecution in Test := false,
129 libraryDependencies ++= Seq(h2, derby),
130 initialize in Test <<= (crossTarget in Test) { ct =>
131 System.setProperty("derby.stream.error.file", (ct / "derby.log").absolutePath)
132 })
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
133
134 lazy val record =
135 persistenceProject("record")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
136 .dependsOn(proto, db)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
137
138 lazy val couchdb =
139 persistenceProject("couchdb")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
140 .dependsOn(record)
141 .settings(libraryDependencies += dispatch_http)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
142
143 lazy val squeryl_record =
144 persistenceProject("squeryl-record")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
145 .dependsOn(record, db)
146 .settings(libraryDependencies ++= Seq(h2, squeryl))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
147
148 lazy val mongodb =
149 persistenceProject("mongodb")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
150 .dependsOn(json_ext)
151 .settings(parallelExecution in Test := false,
152 libraryDependencies += mongo_driver,
ac92811 @indrajitr Use resourceDirectory instead of classDirectory
indrajitr authored
153 initialize in Test <<= (resourceDirectory in Test) { rd =>
154 System.setProperty("java.util.logging.config.file", (rd / "logging.properties").absolutePath)
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
155 })
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
156
157 lazy val mongodb_record =
158 persistenceProject("mongodb-record")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
159 .dependsOn(record, mongodb)
160 .settings(parallelExecution in Test := false)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
161
162 lazy val ldap =
163 persistenceProject("ldap")
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
164 .dependsOn(mapper)
165 .settings(libraryDependencies += apacheds,
166 initialize in Test <<= (crossTarget in Test) { ct =>
167 System.setProperty("apacheds.working.dir", (ct / "apacheds").absolutePath)
168 })
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
169
170 def coreProject = liftProject("core") _
171 def webProject = liftProject("web") _
172 def persistenceProject = liftProject("persistence") _
173
174 /** Project definition helper that simplifies creation of `ProjectReference`.
175 *
176 * It is a convenience method to create a Lift `ProjectReference` module by having the boilerplate for most common
177 * activities tucked in.
178 *
179 * @param base the base path location of project module.
180 * @param prefix the prefix of project module.
181 * @param module the name of the project module. Typically, a project id is of the form lift-`module`.
182 */
183 def liftProject(base: String, prefix: String = "lift-")(module: String): Project =
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
184 liftProject(id = if (module.startsWith(prefix)) module else prefix + module,
185 base = file(base) / module.stripPrefix(prefix))
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
186
187 def liftProject(id: String, base: File): Project =
9a78397 @indrajitr - Update to SBT 0.12.0-M1
indrajitr authored
188 Project(id, base).settings(liftBuildSettings: _*)
d505b36 @indrajitr Move to SBT 0.11.2
indrajitr authored
189 }
Something went wrong with that request. Please try again.