This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from snowplow/feature/sbt
WORK IN PROGRESS Initial version of SBT config
- Loading branch information
Showing
4 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** Licensed to Gravity.com under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. Gravity.com licenses this file | ||
* to you 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import sbt._ | ||
import Keys._ | ||
|
||
object BuildSettings { | ||
|
||
// Basic settings for our app | ||
lazy val basicSettings = Seq[Setting[_]]( | ||
organization := "Gravity", | ||
version := "0.1.24", | ||
description := "HBase DSL for Scala with MapReduce support", | ||
scalaVersion := "2.10.3", | ||
crossScalaVersions := Seq("2.9.2", "2.9.3", "2.10.0", "2.10.3"), | ||
scalacOptions := Seq("-deprecation", "-encoding", "utf8"), | ||
scalacOptions in Test := Seq("-Yrangepos") | ||
) | ||
|
||
// TODO: add Maven Central publishing as per | ||
// http://www.scala-sbt.org/release/docs/Community/Using-Sonatype.html | ||
|
||
lazy val buildSettings = basicSettings // ++ more as required | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/** Licensed to Gravity.com under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. Gravity.com licenses this file | ||
* to you 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import sbt._ | ||
|
||
object Dependencies { | ||
|
||
object V { | ||
// Java | ||
val jodaTime = "1.6.1" | ||
val hadoopCore = "0.20.2" | ||
val hbase = "0.90.4" | ||
val asyncHbase = "1.4.0" | ||
val trove4j = "3.0.3" | ||
// Java (test only) | ||
val junit = "4.8.1" | ||
val hadoopTest = "0.20.2" | ||
} | ||
|
||
object Libraries { | ||
// Java | ||
val jodaTime = "joda-time" % "joda-time" % V.jodaTime | ||
val hadoopCore = "org.apache.hadoop" % "hadoop-core" % V.hadoopCore | ||
val hbase = "org.apache.hbase" % "hbase" % V.hbase | ||
val asyncHbase = "org.hbase" % "asynchbase" % V.asyncHbase | ||
val trove4j = "net.sf.trove4j" % "trove4j" % V.trove4j | ||
// Java (test only) | ||
val junit = "junit" % "junit" % V.junit % "test" | ||
val hadoopTest = "org.apache.hadoop" % "hadoop-test" % V.hadoopTest % "test" | ||
val hbaseTests = "org.apache.hbase" % "hbase" % V.hbase classifier "tests" | ||
// To exclude. TODO: not yet implemented | ||
val exclusions = List( | ||
"org.apache.thrift" , "thrift" , | ||
"org.jruby" , "jruby-complete" , | ||
"org.slf4j" , "log4j-over-slf4j" , | ||
"org.slf4j" , "jcl-over-slf4j" ) | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** Licensed to Gravity.com under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. Gravity.com licenses this file | ||
* to you 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import sbt._ | ||
import Keys._ | ||
|
||
object HPasteBuild extends Build { | ||
|
||
import Dependencies._ | ||
import BuildSettings._ | ||
|
||
// Configure prompt to show current project | ||
override lazy val settings = super.settings :+ { | ||
shellPrompt := { s => Project.extract(s).currentProject.id + " > " } | ||
} | ||
|
||
// Define our project, with basic project information and library dependencies | ||
lazy val project = Project("HPaste", file(".")) | ||
.settings(buildSettings: _*) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
Libraries.jodaTime, | ||
Libraries.hadoopCore, | ||
Libraries.hbase, | ||
Libraries.asyncHbase, | ||
Libraries.trove4j, | ||
Libraries.junit, | ||
Libraries.hbaseTests | ||
).map(_.exclude("org.apache.thrift", "thrift")) // TODO: use full list | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=0.13.0 |