Skip to content
This repository
Browse code

- Update to SBT 0.12.0-M1

- Pull in changes for liftDefaultSettings cleanup
- Separate place-holder for Developer info
- Improve cross build handling
- Re-enable 2.8.2 build
  • Loading branch information...
commit 9a783973aa09784c345522aa1ccb8658a7f09a5f 1 parent 9e27e1c
Indrajit Raychaudhuri authored March 01, 2012
43  build.sbt
... ...
@@ -1,19 +1,32 @@
1 1
 import Dependencies._
2 2
 
  3
+organization in ThisBuild          := "net.liftweb"
  4
+
3 5
 version in ThisBuild               := "2.5-SNAPSHOT"
4 6
 
5  
-crossScalaVersions in ThisBuild    := Seq("2.9.1", "2.9.0-1", "2.9.0", /*"2.8.2", */"2.8.1", "2.8.0")
6  
-
7  
-libraryDependencies in ThisBuild <++= scalaVersion { sv => Seq(/*specs2, */specs(sv), scalacheck(sv)) }
8  
-
9  
-pomExtra in ThisBuild              ~= { _ ++ (
10  
-                                        <scm>
11  
-                                          <url>http://github.com/lift/framework</url>
12  
-                                          <connection>scm:git:git@github.com:lift/framework.git</connection>
13  
-                                        </scm>
14  
-                                        <developers>
15  
-                                          <developer>
16  
-                                            <id>indrajitr</id>
17  
-                                            <name>Indrajit Raychaudhuri</name>
18  
-                                          </developer>
19  
-                                        </developers>)}
  7
+homepage in ThisBuild              := Some(url("http://www.liftweb.net"))
  8
+
  9
+licenses in ThisBuild              += ("Apache License, Version 2.0", url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
  10
+
  11
+startYear in ThisBuild             := Some(2006)
  12
+
  13
+organizationName in ThisBuild      := "WorldWide Conferencing, LLC"
  14
+
  15
+crossScalaVersions in ThisBuild    := Seq("2.9.1", "2.9.0-1", "2.9.0", "2.8.2", "2.8.1", "2.8.0")
  16
+
  17
+libraryDependencies in ThisBuild <++= scalaVersion { sv => Seq(specs, scalacheck).map(_(sv)) }
  18
+
  19
+// Settings for Sonatype compliance
  20
+pomIncludeRepository in ThisBuild  := { _ => false }
  21
+
  22
+publishTo in ThisBuild            <<= isSnapshot(if (_) Some(PublishRepo.Snapshot) else Some(PublishRepo.Staging))
  23
+
  24
+// TODO: Enable after SBT 0.12.0-M2
  25
+//scmInfo in ThisBuild               := Some(ScmInfo(url("https://github.com/lift/framework"), "scm:git:https://github.com/lift/framework.git"))
  26
+//
  27
+//pomExtra in ThisBuild              ~= (_ ++ {Developers.toXml})
  28
+
  29
+pomExtra in ThisBuild              ~= (_ ++ <scm>
  30
+                                              <url>http://github.com/lift/framework</url>
  31
+                                              <connection>scm:git:https://github.com/lift/framework.git</connection>
  32
+                                            </scm> ++ {Developers.toXml})
150  project/Build.scala
@@ -14,10 +14,9 @@
14 14
  * limitations under the License.
15 15
  */
16 16
 
17  
-import java.util.{Calendar => Cal}
18 17
 import sbt._
19 18
 import Keys._
20  
-import net.liftweb.sbt._
  19
+import net.liftweb.sbt.LiftBuildPlugin._
21 20
 import Dependencies._
22 21
 
23 22
 
@@ -28,7 +27,9 @@ object BuildDef extends Build {
28 27
   lazy val framework =
29 28
     liftProject("lift-framework", file("."))
30 29
       .aggregate(liftProjects: _*)
31  
-      .settings(publishArtifact := false)
  30
+      .settings(aggregatedSetting(sources in(Compile, doc)),
  31
+                aggregatedSetting(dependencyClasspath in(Compile, doc)),
  32
+                publishArtifact := false)
32 33
 
33 34
   // Core Projects
34 35
   // -------------
@@ -37,43 +38,37 @@ object BuildDef extends Build {
37 38
 
38 39
   lazy val common =
39 40
     coreProject("common")
40  
-      .settings(
41  
-        description := "Common Libraties and Utilities",
42  
-        libraryDependencies ++= Seq(slf4j_api, logback, slf4j_log4j12, commons_codec))
  41
+      .settings(description := "Common Libraties and Utilities",
  42
+                libraryDependencies ++= Seq(slf4j_api, logback, slf4j_log4j12, commons_codec))
43 43
 
44 44
   lazy val actor =
45 45
     coreProject("actor")
46  
-      .dependsOn(common)
47  
-      .settings(
48  
-        description := "Simple Actor")
  46
+        .dependsOn(common)
  47
+        .settings(description := "Simple Actor")
49 48
 
50 49
   lazy val json =
51 50
     coreProject("json")
52  
-      .settings(
53  
-        description := "JSON Library",
54  
-        libraryDependencies <++= scalaVersion { sv => Seq(scalap(sv), paranamer) })
  51
+        .settings(description := "JSON Library",
  52
+                  libraryDependencies <++= scalaVersion { sv => Seq(scalap(sv), paranamer) })
55 53
 
56 54
   lazy val json_scalaz =
57 55
     coreProject("json-scalaz")
58  
-      .dependsOn(json)
59  
-      .settings(
60  
-        description := "JSON Library based on Scalaz",
61  
-        libraryDependencies <+= scalaVersion(scalaz))
  56
+        .dependsOn(json)
  57
+        .settings(description := "JSON Library based on Scalaz",
  58
+                  libraryDependencies <+= scalaVersion(scalaz))
62 59
 
63 60
   lazy val json_ext =
64 61
     coreProject("json-ext")
65  
-      .dependsOn(common, json)
66  
-      .settings(
67  
-        description := "Extentions to JSON Library",
68  
-        libraryDependencies ++= Seq(commons_codec, joda_time))
  62
+        .dependsOn(common, json)
  63
+        .settings(description := "Extentions to JSON Library",
  64
+                  libraryDependencies ++= Seq(commons_codec, joda_time))
69 65
 
70 66
   lazy val util =
71 67
     coreProject("util")
72  
-      .dependsOn(actor, json)
73  
-      .settings(
74  
-        description := "Utilities Library",
75  
-        parallelExecution in Test := false,
76  
-        libraryDependencies ++= Seq(joda_time, commons_codec, javamail, log4j, htmlparser))
  68
+        .dependsOn(actor, json)
  69
+        .settings(description := "Utilities Library",
  70
+                  parallelExecution in Test := false,
  71
+                  libraryDependencies ++= Seq(joda_time, commons_codec, javamail, log4j, htmlparser))
77 72
 
78 73
 
79 74
   // Web Projects
@@ -83,30 +78,26 @@ object BuildDef extends Build {
83 78
 
84 79
   lazy val testkit =
85 80
     webProject("testkit")
86  
-      .dependsOn(util)
87  
-      .settings(
88  
-        description := "Testkit for Webkit Library",
89  
-        libraryDependencies ++= Seq(commons_httpclient, servlet_api))
  81
+        .dependsOn(util)
  82
+        .settings(description := "Testkit for Webkit Library",
  83
+                  libraryDependencies ++= Seq(commons_httpclient, servlet_api))
90 84
 
91 85
   lazy val webkit =
92 86
     webProject("webkit")
93  
-      .dependsOn(util, testkit % "provided")
94  
-      .settings(
95  
-        description := "Webkit Library",
96  
-        packageOptions in packageBin += Package.ManifestAttributes("Build-Time" -> Cal.getInstance.getTimeInMillis.toString),
97  
-        parallelExecution in Test := false,
98  
-        libraryDependencies <++= scalaVersion { sv =>
99  
-          Seq(commons_fileupload, servlet_api, specs(sv).copy(configurations = Some("provided")), jetty6, jwebunit)
100  
-        },
101  
-        initialize in Test <<= (sourceDirectory in Test) { src =>
102  
-          System.setProperty("net.liftweb.webapptest.src.test.webapp", (src / "webapp").absString)
103  
-        })
104  
-
105  
-  lazy val wizard  =
  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 =
106 98
     webProject("wizard")
107  
-      .dependsOn(webkit, db)
108  
-      .settings(
109  
-        description := "Wizard Library")
  99
+        .dependsOn(webkit, db)
  100
+        .settings(description := "Wizard Library")
110 101
 
111 102
 
112 103
   // Persistence Projects
@@ -116,65 +107,63 @@ object BuildDef extends Build {
116 107
 
117 108
   lazy val db =
118 109
     persistenceProject("db")
119  
-      .dependsOn(util)
120  
-      .settings(
121  
-        libraryDependencies += mockito_all)
  110
+        .dependsOn(util)
  111
+        .settings(libraryDependencies += mockito_all)
122 112
 
123 113
   lazy val proto =
124 114
     persistenceProject("proto")
125  
-      .dependsOn(webkit)
  115
+        .dependsOn(webkit)
126 116
 
127 117
   lazy val jpa =
128 118
     persistenceProject("jpa")
129  
-      .dependsOn(webkit)
130  
-      .settings(libraryDependencies ++= Seq(scalajpa, persistence_api))
  119
+        .dependsOn(webkit)
  120
+        .settings(libraryDependencies ++= Seq(scalajpa, persistence_api))
131 121
 
132 122
   lazy val mapper =
133 123
     persistenceProject("mapper")
134  
-      .dependsOn(db, proto)
135  
-      .settings(
136  
-        description := "Mapper Library",
137  
-        parallelExecution in Test := false,
138  
-        libraryDependencies ++= Seq(h2, derby),
139  
-        initialize in Test <<= (crossTarget in Test) { ct =>
140  
-          System.setProperty("derby.stream.error.file", (ct / "derby.log").absolutePath)
141  
-        })
  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
+                  })
142 131
 
143 132
   lazy val record =
144 133
     persistenceProject("record")
145  
-      .dependsOn(proto, db)
  134
+        .dependsOn(proto, db)
146 135
 
147 136
   lazy val couchdb =
148 137
     persistenceProject("couchdb")
149  
-      .dependsOn(record)
150  
-      .settings(
151  
-        libraryDependencies += dispatch_http)
  138
+        .dependsOn(record)
  139
+        .settings(libraryDependencies += dispatch_http)
152 140
 
153 141
   lazy val squeryl_record =
154 142
     persistenceProject("squeryl-record")
155  
-      .dependsOn(record, db)
156  
-      .settings(libraryDependencies ++= Seq(h2, squeryl))
  143
+        .dependsOn(record, db)
  144
+        .settings(libraryDependencies ++= Seq(h2, squeryl))
157 145
 
158 146
   lazy val mongodb =
159 147
     persistenceProject("mongodb")
160  
-      .dependsOn(json_ext)
161  
-      .settings(
162  
-        parallelExecution in Test := false,
163  
-        libraryDependencies += mongo_driver)
  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
+                  })
164 154
 
165 155
   lazy val mongodb_record =
166 156
     persistenceProject("mongodb-record")
167  
-      .dependsOn(record, mongodb)
168  
-      .settings(parallelExecution in Test := false)
  157
+        .dependsOn(record, mongodb)
  158
+        .settings(parallelExecution in Test := false)
169 159
 
170 160
   lazy val ldap =
171 161
     persistenceProject("ldap")
172  
-      .dependsOn(mapper)
173  
-      .settings(
174  
-        libraryDependencies += apacheds,
175  
-        initialize in Test <<= (crossTarget in Test) { ct =>
176  
-          System.setProperty("apacheds.working.dir", (ct / "apacheds").absolutePath)
177  
-        })
  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
+                  })
178 167
 
179 168
   def coreProject = liftProject("core") _
180 169
   def webProject = liftProject("web") _
@@ -190,10 +179,9 @@ object BuildDef extends Build {
190 179
     * @param module   the name of the project module. Typically, a project id is of the form lift-`module`.
191 180
     */
192 181
   def liftProject(base: String, prefix: String = "lift-")(module: String): Project =
193  
-    liftProject(
194  
-      id   = if(module.startsWith(prefix)) module else prefix + module,
195  
-      base = file(base) / module.stripPrefix(prefix))
  182
+    liftProject(id = if (module.startsWith(prefix)) module else prefix + module,
  183
+                base = file(base) / module.stripPrefix(prefix))
196 184
 
197 185
   def liftProject(id: String, base: File): Project =
198  
-    Project(id, base).settings(LiftBuildPlugin.liftBuildSettings: _*)
  186
+    Project(id, base).settings(liftBuildSettings: _*)
199 187
 }
28  project/Dependencies.scala
@@ -16,20 +16,21 @@
16 16
 
17 17
 import sbt._
18 18
 import Keys._
19  
-import net.liftweb.sbt.LiftBuildPlugin.selectDynamic
  19
+import net.liftweb.sbt.LiftBuildPlugin.{crossMapped, defaultOrMapped}
20 20
 
21 21
 
22 22
 object Dependencies {
23 23
 
24  
-  lazy val slf4jVersion = "1.6.4"
  24
+  type DynModuleID = String => ModuleID
25 25
 
26  
-  lazy val scalacheckVersion = selectDynamic("1.9", "2.8.0" -> "1.7", "2.8.1" -> "1.8", "2.8.2" -> "1.8") _
27  
-  lazy val specsVersion = selectDynamic("1.6.8", "2.8.0" -> "1.6.5", "2.9.1" -> "1.6.9") _
  26
+  lazy val CVMapping282   = crossMapped("2.8.2" -> "2.8.1")
28 27
 
29  
-  lazy val scalazGroup = selectDynamic("org.scalaz", "2.8.0" -> "com.googlecode.scalaz") _
30  
-  lazy val scalazVersion = selectDynamic("6.0.2", "2.8.0" -> "5.0", "2.9.0" -> "6.0.RC2") _
  28
+  lazy val slf4jVersion = "1.6.4"
31 29
 
32  
-  type DynModuleID = String => ModuleID
  30
+  lazy val scalazGroup       = defaultOrMapped("org.scalaz", "2.8.0" -> "com.googlecode.scalaz")
  31
+  lazy val scalazVersion     = defaultOrMapped("6.0.2", "2.8.0" -> "5.0", "2.9.0" -> "6.0.RC2")
  32
+  lazy val scalacheckVersion = defaultOrMapped("1.9", "2.8.0" -> "1.7", "2.8.1" -> "1.8", "2.8.2" -> "1.8")
  33
+  lazy val specsVersion      = defaultOrMapped("1.6.8", "2.8.0" -> "1.6.5", "2.9.1" -> "1.6.9")
33 34
 
34 35
   // Compile scope:
35 36
   // Scope available in all classpath, transitive by default.
@@ -37,16 +38,16 @@ object Dependencies {
37 38
   lazy val commons_fileupload       = "commons-fileupload"         % "commons-fileupload" % "1.2.2"
38 39
   lazy val commons_httpclient       = "commons-httpclient"         % "commons-httpclient" % "3.1"
39 40
   lazy val dispatch_http            = "net.databinder"            %% "dispatch-http"      % "0.7.8"
40  
-  lazy val javamail                 = "javax.mail"                 % "mail"               % "1.4.4" // TODO: "[1.4.1,)"
  41
+  lazy val javamail                 = "javax.mail"                 % "mail"               % "1.4.4"
41 42
   lazy val joda_time                = "joda-time"                  % "joda-time"          % "1.6.2"
42 43
   lazy val htmlparser               = "nu.validator.htmlparser"    % "htmlparser"         % "1.2.1"
43 44
   lazy val mongo_java_driver        = "org.mongodb"                % "mongo-java-driver"  % "2.6.5"
44 45
   lazy val paranamer                = "com.thoughtworks.paranamer" % "paranamer"          % "2.4.1"
45  
-  lazy val scalajpa                 = "org.scala-libs"            %% "scalajpa"           % "1.4"
  46
+  lazy val scalajpa                 = "org.scala-libs"             % "scalajpa"           % "1.4" cross CVMapping282
46 47
   lazy val scalap: DynModuleID      = "org.scala-lang"             % "scalap"             % _
47  
-  lazy val scalaz_core: DynModuleID = sv => scalazGroup(sv)       %% "scalaz-core"        % scalazVersion(sv)
  48
+  lazy val scalaz_core: DynModuleID = sv => scalazGroup(sv)        % "scalaz-core"        % scalazVersion(sv) cross CVMapping282
48 49
   lazy val slf4j_api                = "org.slf4j"                  % "slf4j-api"          % slf4jVersion
49  
-  lazy val squeryl                  = "org.squeryl"               %% "squeryl"            % "0.9.4"
  50
+  lazy val squeryl                  = "org.squeryl"                % "squeryl"            % "0.9.4" cross CVMapping282
50 51
 
51 52
   // Aliases
52 53
   lazy val mongo_driver = mongo_java_driver
@@ -78,8 +79,7 @@ object Dependencies {
78 79
   lazy val jetty6      = "org.mortbay.jetty"           % "jetty"                    % "6.1.26"     % "test"
79 80
   lazy val jwebunit    = "net.sourceforge.jwebunit"    % "jwebunit-htmlunit-plugin" % "2.5"        % "test"
80 81
   lazy val mockito_all = "org.mockito"                 % "mockito-all"              % "1.8.5"      % "test"
81  
-  lazy val scalacheck: DynModuleID = "org.scala-tools.testing" %% "scalacheck" % scalacheckVersion(_) % "test"
82  
-  lazy val specs: DynModuleID      = "org.scala-tools.testing" %% "specs"      % specsVersion(_)      % "test"
83  
-  lazy val specs2 = "org.specs2" %% "specs2"      % "1.5"      % "test"
  82
+  lazy val scalacheck: DynModuleID = "org.scala-tools.testing" % "scalacheck" % scalacheckVersion(_) % "test" cross CVMapping282
  83
+  lazy val specs: DynModuleID      = "org.scala-tools.testing" % "specs"      % specsVersion(_)      % "test" cross CVMapping282
84 84
 
85 85
 }
55  project/Developers.scala
... ...
@@ -0,0 +1,55 @@
  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
+
  18
+object Developers {
  19
+  lazy val members = Map(
  20
+    "andreak" -> "Andreas Joseph Krogh",
  21
+    "bwmcadams" -> "Brendan W. McAdams",
  22
+    "davewhittaker" -> "Dave Whittaker",
  23
+    "davidB" -> "David Bernard",
  24
+    "dcbriccetti" -> "Dave Briccetti",
  25
+    "dchenbecker" -> "Derek Chen-Becker",
  26
+    "dpp" -> "David Pollak",
  27
+    "Dridus" -> "Ross Mellgren",
  28
+    "dlouwers" -> "Dirk Louwers",
  29
+    "eltimn" -> "Tim Nelson",
  30
+    "fbettag" -> "Franz Bettag",
  31
+    "harryh" -> "Harry Heymann",
  32
+    "hoffrocket" -> "Jon Hoffman",
  33
+    "indrajitr" -> "Indrajit Raychaudhuri",
  34
+    "jeppenejsum" -> "Jeppe Nejsum Madsen",
  35
+    "jgoday" -> "Javier Goday",
  36
+    "jonifreeman" -> "Joni Freeman",
  37
+    "jorgeortiz85" -> "Jorge Ortiz",
  38
+    "lkuczera" -> "Łukasz Kuczera",
  39
+    "mads379" -> "Mads Hartmann Jensen",
  40
+    "mariusdanciu" -> "Marius Danciu",
  41
+    "max-l" -> "Maxime Lévesque",
  42
+    "nafg" -> "Naftoli Gugenheim",
  43
+    "pr1001" -> "Peter Robinett",
  44
+    "rusho" -> "Ján Raška",
  45
+    "timperrett" -> "Timothy Perrett",
  46
+    "tjweir" -> "Tyler Weir",
  47
+    "tuhlmann" -> "Torsten Uhlmann",
  48
+    "vdichev" -> "Vassil Dichev"
  49
+  )
  50
+
  51
+  def toXml =
  52
+    <developers>
  53
+      {members map { m => <developer><id>{m._1}</id><name>{m._2}</name></developer>} }
  54
+    </developers>
  55
+}
2  project/build.properties
... ...
@@ -1 +1 @@
1  
-sbt.version=0.11.2
  1
+sbt.version=0.12.0-M1
3  project/project/Plugins.scala
... ...
@@ -1,7 +1,6 @@
1 1
 import sbt._
2 2
 
3 3
 object PluginDef extends Build {
4  
-  lazy val root              = Project("plugins", file(".")) dependsOn(buildPlugin, gpgPlugin)
  4
+  lazy val root              = Project("plugins", file(".")) dependsOn(buildPlugin)
5 5
   lazy val buildPlugin       = uri("git://github.com/indrajitr/sbt-lift-build-plugin")
6  
-  lazy val gpgPlugin         = uri("git://github.com/sbt/xsbt-gpg-plugin")
7 6
 }

0 notes on commit 9a78397

Please sign in to comment.
Something went wrong with that request. Please try again.