mirror of https://github.com/sbt/sbt.git
Removed everything but the runner and build file.
This commit is contained in:
parent
9257465340
commit
ba2f8d4afd
|
|
@ -1,47 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
|
|
||||||
camelCase () {
|
|
||||||
# pretty sad having to resort to this in 2011
|
|
||||||
SED=""
|
|
||||||
if [ -f /usr/local/bin/gsed ]; then
|
|
||||||
SED=/usr/local/bin/gsed
|
|
||||||
else
|
|
||||||
SED=sed
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$1" | $SED -e 's/[-_]\([a-z]\)/\u\1/g' | $SED -e 's/^./\u&/;'
|
|
||||||
}
|
|
||||||
|
|
||||||
createGithub () {
|
|
||||||
which hub && { echo "You need hub for this." ; return }
|
|
||||||
|
|
||||||
local project="$1"
|
|
||||||
# local git_token=$(git config --global github.token)
|
|
||||||
local git_url="git@github.com:$(git config --global github.user)/$project.git"
|
|
||||||
|
|
||||||
echo Creating $git_url
|
|
||||||
hub create
|
|
||||||
git config --local --add branch.master.remote origin
|
|
||||||
git config --local --add branch.master.merge refs/heads/master
|
|
||||||
git push origin master
|
|
||||||
fi
|
|
||||||
|
|
||||||
createGitIgnore () {
|
|
||||||
cat > .gitignore <<EOM
|
|
||||||
target
|
|
||||||
/project/boot
|
|
||||||
/project/plugins
|
|
||||||
lib_managed
|
|
||||||
src_managed
|
|
||||||
/ext
|
|
||||||
EOM
|
|
||||||
}
|
|
||||||
|
|
||||||
createGitRepo () {
|
|
||||||
createGitIgnore
|
|
||||||
git init
|
|
||||||
git add .gitignore project src
|
|
||||||
git add -f project/plugins/Plugins.scala
|
|
||||||
git commit -m "Initial Import."
|
|
||||||
}
|
|
||||||
105
bin/sbt-setup
105
bin/sbt-setup
|
|
@ -1,105 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
|
|
||||||
function programDir () {
|
|
||||||
SDIR=$(dirname "$1");
|
|
||||||
echo $(cd $SDIR ; pwd -P)
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -h "$0" ]; then
|
|
||||||
BINDIR=$(programDir $(greadlink "$0"))
|
|
||||||
else
|
|
||||||
BINDIR=$(programDir "$0")
|
|
||||||
fi
|
|
||||||
|
|
||||||
. $BINDIR/util.sh
|
|
||||||
BASE=$(abspath $BINDIR/..)
|
|
||||||
|
|
||||||
declare -a args
|
|
||||||
TEMPLATE="simple"
|
|
||||||
SCALA_VERSION="2.9.1"
|
|
||||||
PROJECT_VERSION="0.1"
|
|
||||||
DO_GITHUB=
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case "$1" in
|
|
||||||
--simple)
|
|
||||||
TEMPLATE="simple"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--fancy)
|
|
||||||
TEMPLATE="fancy"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--version)
|
|
||||||
shift
|
|
||||||
PROJECT_VERSION="$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--github)
|
|
||||||
shift
|
|
||||||
DO_GITHUB="true"
|
|
||||||
;;
|
|
||||||
--28)
|
|
||||||
SCALA_VERSION="2.8.1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--29)
|
|
||||||
SCALA_VERSION="2.9.0"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
args=("${args[@]}" "$1")
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# reset "$@" to the remaining args
|
|
||||||
set -- "${args[@]}"
|
|
||||||
|
|
||||||
if [[ $# -ne 1 ]]; then
|
|
||||||
cat <<EOM
|
|
||||||
Usage: $(basename $0) [options] <project> [dependencies]
|
|
||||||
|
|
||||||
--hub create github project (requires hub and more)
|
|
||||||
--simple use simple project template
|
|
||||||
--fancy use multi-file project template
|
|
||||||
--28 latest release of scala 2.8.x
|
|
||||||
--29 latest release of scala 2.9.x
|
|
||||||
|
|
||||||
--version <version> project initial version
|
|
||||||
EOM
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "Usage: $0 <project name>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
PROJECT="$1"
|
|
||||||
PACKAGE=${ORGANIZATION:-template}
|
|
||||||
SBT_VERSION="0.7.7"
|
|
||||||
DIR=$(echo ${PROJECT} | tr '[A-Z]' '[a-z]')
|
|
||||||
PROJECT_CC=`camelCase ${PROJECT}`
|
|
||||||
PROJECT_CLASS=${PROJECT_CC}Project
|
|
||||||
SPEC_CLASS=${PROJECT_CC}Spec
|
|
||||||
|
|
||||||
[[ -e $DIR ]] && { echo "$DIR exists, please remove it first." ; exit 1; }
|
|
||||||
|
|
||||||
mkdir -p $DIR
|
|
||||||
cd $DIR
|
|
||||||
echo "Creating \"${PACKAGE} % ${PROJECT} % ${PROJECT_VERSION}\" from template \"$TEMPLATE\"."
|
|
||||||
echo "Building against scala $SCALA_VERSION with sbt $SBT_VERSION."
|
|
||||||
echo "Repository in ${PWD} ."
|
|
||||||
echo
|
|
||||||
|
|
||||||
mkdir -p project src/main/scala src/main/java src/test/scala src/test/java
|
|
||||||
|
|
||||||
createGitRepo
|
|
||||||
sbt update package test
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "Ready to roll in $PWD"
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
||||||
|
|
||||||
trait ProjectSupport extends ModuleIdDynamifactory {
|
|
||||||
self: DefaultProject =>
|
|
||||||
|
|
||||||
/** Default "dynamic revision" to use with ivy.
|
|
||||||
* See [[http://www.jaya.free.fr/ivy/doc/ivyfile/dependency.html]].
|
|
||||||
* Likely alternatives: latest.milestone, latest.release
|
|
||||||
*/
|
|
||||||
def dynamicRevision = "latest.integration"
|
|
||||||
|
|
||||||
/** Repositories. Comment in or out to taste.
|
|
||||||
*/
|
|
||||||
val localMaven = "Local Maven" at "file://"+Path.userHome+"/.m2/repository"
|
|
||||||
val localIvy = "Local Ivy" at "file://"+Path.userHome+"/.ivy2/local"
|
|
||||||
val sonatype = "Sonatype" at "https://oss.sonatype.org/content/groups/public"
|
|
||||||
val scalaToolsSnapshots = "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/"
|
|
||||||
val jboss = "JBoss Repo" at "http://repository.jboss.org/maven2"
|
|
||||||
// val akkaReleases = "Akka Maven Repository" at "http://scalablesolutions.se/akka/repository"
|
|
||||||
|
|
||||||
private val testConfig: ArtifactConfig = ArtifactConfig(
|
|
||||||
ArtifactRevision(_ => dynamicRevision), ArtifactTransform(inScope("test"), withSources)
|
|
||||||
)
|
|
||||||
|
|
||||||
/*** Libraries ***/
|
|
||||||
// val specs: ModuleID = testConfig("org.scala-tools.testing" %% "specs")
|
|
||||||
// val specs2: ModuleID = testConfig("org.specs2" %% "specs2")
|
|
||||||
// val scalacheck: ModuleID = testConfig("org.scala-tools.testing" %% "scalacheck")
|
|
||||||
|
|
||||||
private implicit lazy val implicitTransform: ArtifactTransform = ArtifactTransform()
|
|
||||||
|
|
||||||
// val ant: ModuleID = "org.apache.ant" % "ant"
|
|
||||||
// val jdt: ModuleID = "org.eclipse.jdt" % "core" notTransitive()
|
|
||||||
// val scalaImproving: ModuleID = "org.improving" %% "scala-improving"
|
|
||||||
// val scalaSTM: ModuleID = "org.scala-tools" %% "scala-stm"
|
|
||||||
// val scalariform: ModuleID = "org.scalariform" %% "scalariform"
|
|
||||||
//
|
|
||||||
// val asmAll: ModuleID = "asm" % "asm-all" % "3.3.1" withSources()
|
|
||||||
// val easymock: ModuleID = "org.easymock" % "easymock"
|
|
||||||
// val guava: ModuleID = "com.google.guava" % "guava"
|
|
||||||
// val ivy: ModuleID = "org.apache.ivy" % "ivy"
|
|
||||||
// val jetty: ModuleID = "org.mortbay.jetty" % "jetty"
|
|
||||||
// val jmock: ModuleID = "org.jmock" % "jmock"
|
|
||||||
// val jodaTime: ModuleID = "joda-time" % "joda-time"
|
|
||||||
// val liftJson: ModuleID = "net.liftweb" %% "lift-json"
|
|
||||||
// val maven: ModuleID = "org.apache.maven" % "maven-ant-tasks"
|
|
||||||
// val scalaARM: ModuleID = "com.github.jsuereth.scala-arm" %% "scala-arm" withSources()
|
|
||||||
// val scalazCore: ModuleID = "org.scalaz" %% "scalaz-core" withSources()
|
|
||||||
// val scalazHttp: ModuleID = "org.scalaz" %% "scalaz-http" withSources()
|
|
||||||
// val slf4s: ModuleID = "com.weiglewilczek.slf4s" %% "slf4s" withSources()
|
|
||||||
}
|
|
||||||
|
|
||||||
trait ModuleIdDynamifactory extends Dynamifactory {
|
|
||||||
self: DefaultProject =>
|
|
||||||
|
|
||||||
protected type DepId = GroupArtifactID
|
|
||||||
protected type DepOut = ModuleID
|
|
||||||
protected def finishDependency(in: GroupArtifactID, revision: String): ModuleID = in % revision
|
|
||||||
|
|
||||||
protected implicit lazy val implicitRevision: ArtifactRevision =
|
|
||||||
ArtifactRevision(_ => dynamicRevision)
|
|
||||||
|
|
||||||
protected def inScope(scope: String): DepFn = _ % scope
|
|
||||||
protected def withSources: DepFn = _.withSources()
|
|
||||||
protected def intransitive: DepFn = _.intransitive()
|
|
||||||
protected def withJavadoc: DepFn = _.withJavadoc
|
|
||||||
|
|
||||||
protected def withRevision(newRevision: String): DepFn = (m: ModuleID) => {
|
|
||||||
ModuleID(m.organization, m.name, newRevision, m.configurations, m.isChanging, m.isTransitive, m.explicitArtifacts, m.extraAttributes)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
trait Dynamifactory {
|
|
||||||
protected type DepId
|
|
||||||
protected type DepOut
|
|
||||||
protected type DepFn = DepOut => DepOut
|
|
||||||
protected def dynamicRevision: String
|
|
||||||
protected def finishDependency(in: DepId, revision: String): DepOut
|
|
||||||
|
|
||||||
case class ArtifactRevision(revisionFn: DepId => String) {
|
|
||||||
}
|
|
||||||
case class ArtifactTransform(fns: DepFn*) {
|
|
||||||
def apply(x: DepOut): DepOut = if (fns.isEmpty) x else fns.reduceLeft(_ andThen _)(x)
|
|
||||||
}
|
|
||||||
case class ArtifactConfig(rev: ArtifactRevision, transform: ArtifactTransform) {
|
|
||||||
def apply(in: DepId): DepOut = transform(finishDependency(in, rev.revisionFn(in)))
|
|
||||||
}
|
|
||||||
|
|
||||||
protected implicit def autoassembleConfig(implicit rev: ArtifactRevision, transform: ArtifactTransform): ArtifactConfig =
|
|
||||||
ArtifactConfig(rev, transform)
|
|
||||||
|
|
||||||
protected implicit def autoconfigureDependencies(in: DepId)(implicit config: ArtifactConfig): DepOut = config(in)
|
|
||||||
}
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
|
|
||||||
trait ProjectSupport {
|
|
||||||
self: DefaultProject =>
|
|
||||||
|
|
||||||
/** Repositories. Comment in or out to taste.
|
|
||||||
*/
|
|
||||||
val localMaven = "Local Maven" at "file://"+Path.userHome+"/.m2/repository"
|
|
||||||
val localIvy = "Local Ivy" at "file://"+Path.userHome+"/.ivy2/local"
|
|
||||||
val sonatype = "Sonatype" at "https://oss.sonatype.org/content/groups/public"
|
|
||||||
val scalaToolsSnapshots = "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/"
|
|
||||||
val jboss = "JBoss Repo" at "http://repository.jboss.org/maven2"
|
|
||||||
// val akkaReleases = "Akka Maven Repository" at "http://scalablesolutions.se/akka/repository"
|
|
||||||
|
|
||||||
/*** Libraries ***/
|
|
||||||
val specs: ModuleID = "org.scala-tools.testing" %% "specs" % "1.6.8"
|
|
||||||
val scalacheck: ModuleID = "org.scala-tools.testing" %% "scalacheck" % "1.9"
|
|
||||||
// val specs2: ModuleID = testConfig("org.specs2" %% "specs2")
|
|
||||||
// val ant: ModuleID = "org.apache.ant" % "ant"
|
|
||||||
// val jdt: ModuleID = "org.eclipse.jdt" % "core" notTransitive()
|
|
||||||
// val scalaImproving: ModuleID = "org.improving" %% "scala-improving"
|
|
||||||
// val scalaSTM: ModuleID = "org.scala-tools" %% "scala-stm"
|
|
||||||
// val scalariform: ModuleID = "org.scalariform" %% "scalariform"
|
|
||||||
//
|
|
||||||
// val asmAll: ModuleID = "asm" % "asm-all" % "3.3.1" withSources()
|
|
||||||
// val easymock: ModuleID = "org.easymock" % "easymock"
|
|
||||||
// val guava: ModuleID = "com.google.guava" % "guava"
|
|
||||||
// val ivy: ModuleID = "org.apache.ivy" % "ivy"
|
|
||||||
// val jetty: ModuleID = "org.mortbay.jetty" % "jetty"
|
|
||||||
// val jmock: ModuleID = "org.jmock" % "jmock"
|
|
||||||
// val jodaTime: ModuleID = "joda-time" % "joda-time"
|
|
||||||
// val liftJson: ModuleID = "net.liftweb" %% "lift-json"
|
|
||||||
// val maven: ModuleID = "org.apache.maven" % "maven-ant-tasks"
|
|
||||||
// val scalaARM: ModuleID = "com.github.jsuereth.scala-arm" %% "scala-arm" withSources()
|
|
||||||
// val scalazCore: ModuleID = "org.scalaz" %% "scalaz-core" withSources()
|
|
||||||
// val scalazHttp: ModuleID = "org.scalaz" %% "scalaz-http" withSources()
|
|
||||||
// val slf4s: ModuleID = "com.weiglewilczek.slf4s" %% "slf4s" withSources()
|
|
||||||
}
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
package example
|
|
||||||
|
|
||||||
// Primary constructor takes two arguments.
|
|
||||||
class Rational(n: Int, d: Int) {
|
|
||||||
// an auxiliary constructor: must call the primary constructor first.
|
|
||||||
def this(n: Int) = this(n, 1)
|
|
||||||
// A requirement: an exception is thrown upon construction if the condition is false.
|
|
||||||
require(d > 0, "denominator must be greater than zero")
|
|
||||||
|
|
||||||
// A grossly inefficient greatest common divisor, for illustrative purposes only.
|
|
||||||
private def gcd(n: Int, d: Int) = (
|
|
||||||
n max d to 2 by -1 find (g => n % g == 0 && d % g == 0) getOrElse 1
|
|
||||||
)
|
|
||||||
// Using the gcd to calculate reduced numerator and denominator.
|
|
||||||
private val g = gcd(n, d)
|
|
||||||
// Public, immutable values.
|
|
||||||
val numerator = n / g
|
|
||||||
val denominator = d / g
|
|
||||||
|
|
||||||
// Assume we have r1: Rational, r2: Rational, and num: Int.
|
|
||||||
// Since + is a method like any other, if we define it with a
|
|
||||||
// Rational argument then r1 + r2 is defined.
|
|
||||||
def +(that: Rational): Rational = new Rational(
|
|
||||||
this.numerator * that.denominator + that.numerator * this.denominator,
|
|
||||||
this.denominator * that.denominator
|
|
||||||
)
|
|
||||||
// You can overload the + method with an Int argument: now r1 + num
|
|
||||||
// is also defined. However to make num + r1 work similarly requires
|
|
||||||
// an implicit conversion. (See the example package object.)
|
|
||||||
def +(that: Int): Rational = this + new Rational(that)
|
|
||||||
|
|
||||||
// toString, equals, and hashCode all override methods in AnyRef
|
|
||||||
// so "override" is required.
|
|
||||||
override def toString = n + "/" + d + (
|
|
||||||
// The result of the if/else is a String:
|
|
||||||
if (numerator == n) "" // the empty string if it is irreducible
|
|
||||||
else " (" + numerator + "/" + denominator + ")" // the reduced form otherwise
|
|
||||||
)
|
|
||||||
|
|
||||||
// To preserve symmetry we will be equal only to other Rationals.
|
|
||||||
override def equals(other: Any) = other match {
|
|
||||||
case x: Rational => this.numerator == x.numerator && this.denominator == x.denominator
|
|
||||||
case _ => false
|
|
||||||
}
|
|
||||||
// As with java, equals and hashCode should always be overridden together.
|
|
||||||
override def hashCode = numerator.## + denominator.##
|
|
||||||
}
|
|
||||||
|
|
||||||
// The Rational companion object.
|
|
||||||
object Rational {
|
|
||||||
// A factory method on the companion object allows construction
|
|
||||||
// without explicit calls to new. Here, d is given a default argument
|
|
||||||
// of 1. This is an alternative mechanism to the auxiliary constructor.
|
|
||||||
// used in the class.
|
|
||||||
def apply(n: Int, d: Int = 1): Rational = new Rational(n, d)
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package example
|
|
||||||
|
|
||||||
// These implementations have no error checking: they will throw
|
|
||||||
// exceptions if the input is unexpected, e.g. an empty list has no
|
|
||||||
// penultimate member.
|
|
||||||
object Exercises {
|
|
||||||
def penultimate[T](xs: List[T]): T = xs.reverse.tail.head
|
|
||||||
// Other possible implementations:
|
|
||||||
// def penultimate[T](xs: List[T]): T = xs.init.last
|
|
||||||
// def penultimate[T](xs: List[T]): T = xs(xs.length - 2)
|
|
||||||
// def penultimate[T](xs: List[T]): T = xs takeRight 2 head
|
|
||||||
|
|
||||||
// Test if the argument is a palindrome.
|
|
||||||
def isPalindrome[T](xs: List[T]) = xs == xs.reverse
|
|
||||||
|
|
||||||
// Remove the Kth element from a list, returning the list and
|
|
||||||
// the removed element as a tuple.
|
|
||||||
def removeAt[T](index: Int, xs: List[T]): (List[T], T) = {
|
|
||||||
val (front, back) = xs splitAt index
|
|
||||||
(front ++ back.tail, back.head)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
// The example package object.
|
|
||||||
package object example {
|
|
||||||
// Importing an implicit method of type Int => Rational will
|
|
||||||
// henceforth let us use Ints as if they were Rationals.
|
|
||||||
implicit def intToRational(num: Int): Rational = new Rational(num)
|
|
||||||
|
|
||||||
// A handy method for exercises yet to be performed.
|
|
||||||
def ?? = throw new RuntimeException("Unimplemented.")
|
|
||||||
}
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
import sbt._
|
|
||||||
|
|
||||||
case class ArtifactRevision(revision: String)
|
|
||||||
case class ArtifactConfig(confs: String, fn: ModuleID => ModuleID)
|
|
||||||
object ArtifactConfig {
|
|
||||||
implicit def defaultArtifactConfig: ArtifactConfig = new ArtifactConfig("", identity[ModuleID])
|
|
||||||
implicit def testArtifactConfig: ArtifactConfig = new ArtifactConfig("test", identity[ModuleID])
|
|
||||||
}
|
|
||||||
|
|
||||||
trait LowPriorityLibraries {
|
|
||||||
self: DefaultProject =>
|
|
||||||
|
|
||||||
// "latest.integration", "latest.milestone", "latest.release"
|
|
||||||
def defaultRevision = "latest.integration"
|
|
||||||
protected implicit def defaultArtifactRevision = new ArtifactRevision(defaultRevision)
|
|
||||||
// protected implicit def defaultArtifactConfig = new ArtifactConfig("", identity[ModuleID])
|
|
||||||
|
|
||||||
protected implicit def autoConfig
|
|
||||||
(artifact: GroupArtifactID)
|
|
||||||
(implicit rev: ArtifactRevision, config: ArtifactConfig): ModuleID =
|
|
||||||
{
|
|
||||||
val ArtifactConfig(confs, fn) = config
|
|
||||||
fn(
|
|
||||||
if (confs == "") artifact % rev.revision
|
|
||||||
else artifact % rev.revision % config.confs
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
trait TestLibraries extends LowPriorityLibraries {
|
|
||||||
self: DefaultProject =>
|
|
||||||
|
|
||||||
private implicit val testDepConfig = ArtifactConfig("test", _.withSources)
|
|
||||||
val specs: ModuleID = "org.scala-tools.testing" %% "specs"
|
|
||||||
val scalacheck: ModuleID = "org.scala-tools.testing" %% "scalacheck"
|
|
||||||
}
|
|
||||||
|
|
||||||
trait Libraries extends Repositories with TestLibraries {
|
|
||||||
self: DefaultProject =>
|
|
||||||
|
|
||||||
import ArtifactConfig.defaultArtifactConfig
|
|
||||||
|
|
||||||
// val ant: ModuleID = "org.apache.ant" % "ant"
|
|
||||||
// val asmAll: ModuleID = "asm" % "asm-all" withSources()
|
|
||||||
// val commonsVFS: ModuleID = "org.apache.commons" % "commons-vfs-project"
|
|
||||||
// val easymock: ModuleID = "org.easymock" % "easymock"
|
|
||||||
// val guava: ModuleID = "com.google.guava" % "guava"
|
|
||||||
// val ivy: ModuleID = "org.apache.ivy" % "ivy"
|
|
||||||
// val jdt: ModuleID = "org.eclipse.jdt" % "core" notTransitive()
|
|
||||||
// val jetty: ModuleID = "org.mortbay.jetty" % "jetty"
|
|
||||||
// val jmock: ModuleID = "org.jmock" % "jmock"
|
|
||||||
// val jodaTime: ModuleID = "joda-time" % "joda-time"
|
|
||||||
// val liftJson: ModuleID = "net.liftweb" %% "lift-json"
|
|
||||||
// val maven: ModuleID = "org.apache.maven" % "maven-ant-tasks"
|
|
||||||
// val scalaARM: ModuleID = "com.github.jsuereth.scala-arm" %% "scala-arm" withSources()
|
|
||||||
// val scalaImproving: ModuleID = "org.improving" %% "scala-improving"
|
|
||||||
// val scalaSTM: ModuleID = "org.scala-tools" %% "scala-stm"
|
|
||||||
// val scalariform: ModuleID = "org.scalariform" %% "scalariform"
|
|
||||||
// val scalazCore: ModuleID = "org.scalaz" %% "scalaz-core" withSources()
|
|
||||||
// val scalazHttp: ModuleID = "org.scalaz" %% "scalaz-http" withSources()
|
|
||||||
// val slf4s: ModuleID = "com.weiglewilczek.slf4s" %% "slf4s" withSources()
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
import sbt._
|
|
||||||
|
|
||||||
class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
|
|
||||||
// def aquteRepo = "aQute Maven Repository" at "http://www.aqute.biz/repo"
|
|
||||||
// lazy val aquteModuleConfig = ModuleConfiguration("biz.aQute", aquteRepo)
|
|
||||||
// val bnd4sbt = "com.weiglewilczek.bnd4sbt" % "bnd4sbt" % "latest.release"
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
import sbt._
|
|
||||||
|
|
||||||
trait Repositories extends DefaultProject {
|
|
||||||
// self: DefaultProject =>
|
|
||||||
|
|
||||||
val localMaven = "Local Maven" at "file://"+Path.userHome+"/.m2/repository"
|
|
||||||
val localIvy = "Local Ivy" at "file://"+Path.userHome+"/.ivy2/local"
|
|
||||||
val sonatype = "Sonatype" at "https://oss.sonatype.org/content/groups/public"
|
|
||||||
val scalaToolsSnapshots = "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/"
|
|
||||||
val jboss = "JBoss Repo" at "http://repository.jboss.org/maven2"
|
|
||||||
|
|
||||||
// -Dscala.local=2.9.0.local=/scala/trunk/build/pack
|
|
||||||
override def localScala = System.getProperty("scala.local") match {
|
|
||||||
case null => super.localScala
|
|
||||||
case str =>
|
|
||||||
val (name, path) = str indexOf '=' match {
|
|
||||||
case -1 => ("local", str)
|
|
||||||
case idx => (str take idx toString, str drop idx + 1 toString)
|
|
||||||
}
|
|
||||||
log.info("Found scala.local setting '" + name + "' at: " + path)
|
|
||||||
List(defineScala(name, new java.io.File(path)))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
package example
|
|
||||||
|
|
||||||
import org.specs._
|
|
||||||
|
|
||||||
class ExampleSpec extends Specification {
|
|
||||||
"An example project" should {
|
|
||||||
"compare Rationals" >> {
|
|
||||||
Rational(5) mustEqual Rational(5, 1)
|
|
||||||
Rational(1, 10) mustEqual Rational(2, 20)
|
|
||||||
}
|
|
||||||
"add Rationals" >> {
|
|
||||||
(Rational(1, 3) + Rational(5, 15)) mustEqual Rational(4, 6)
|
|
||||||
}
|
|
||||||
"mix and match Rationals and Ints" >> {
|
|
||||||
(Rational(1, 2) + 1) mustEqual Rational(3, 2)
|
|
||||||
(1 + Rational(1, 2)) mustEqual Rational(3, 2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
package template
|
|
||||||
|
|
||||||
import org.specs._
|
|
||||||
|
|
||||||
class TemplateSpec extends Specification {
|
|
||||||
"A template project" should {
|
|
||||||
"not violate universal realities" >> {
|
|
||||||
1 mustEqual 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
||||||
val Fastutil = "fastutil" % "fastutil" % "5.1.5"
|
|
||||||
val activemqCore = "org.apache.activemq" % "activemq-core" % "5.3.2" % "compile" withSources
|
|
||||||
val akkaPlugin = "se.scalablesolutions.akka" % "akka-sbt-plugin" % "0.9.1"
|
|
||||||
val android = "org.scala-tools.sbt" % "sbt-android-plugin" % "0.5.0"
|
|
||||||
val bcel = "org.apache.bcel" % "bcel" % "5.2"
|
|
||||||
val bnd4sbt = "com.weiglewilczek.bnd4sbt" % "bnd4sbt" % "1.0.0.RC4"
|
|
||||||
val cglib = "cglib" % "cglib" % "2.1_3"
|
|
||||||
val cglibnodep = "cglib" % "cglib-nodep" % "2.1_3"
|
|
||||||
val commons = "commons-io" % "commons-io" % "1.4" withSources() extra("docUrl" -> "http://commons.apache.org/io/api-1.4/")
|
|
||||||
val commonsFileupload = "commons-fileupload" % "commons-fileupload" % "1.2.1" % "compile"
|
|
||||||
val commonsHttpClient = "commons-httpclient" % "commons-httpclient" % "3.1" % "compile" //ApacheV2
|
|
||||||
val commonsIo = "commons-io" % "commons-io" % "1.4"
|
|
||||||
val commons_codec = "commons-codec" % "commons-codec" % "1.4" % "compile" //ApacheV2
|
|
||||||
val commons_coll = "commons-collections" % "commons-collections" % "3.2.1" % "test" //ApacheV2
|
|
||||||
val commons_logging = "commons-logging" % "commons-logging" % "1.1.1" % "compile"
|
|
||||||
val commons_pool = "commons-pool" % "commons-pool" % "1.5.4" % "compile" //ApacheV2
|
|
||||||
val core = "org.processing" % "core" % "1.1"
|
|
||||||
val defaultProject = "com.twitter" % "standard-project" % "0.9.8"
|
|
||||||
val easymockclass = "org.easymock" % "easymockclassextension" % "2.4"
|
|
||||||
val eclipse = "de.element34" % "sbt-eclipsify" % "0.5.0"
|
|
||||||
val extract = "org.scala-tools.sbt" % "installer-plugin" % "0.3.0"
|
|
||||||
val google_coll = "com.google.collections" % "google-collections" % "1.0" % "compile" //ApacheV2
|
|
||||||
val gpgPlugin = "com.rossabaker" % "sbt-gpg-plugin" % "0.1.1"
|
|
||||||
val gstreamerJava = "com.googlecode.gstreamer-java" % "gstreamer-java" % "1.4"
|
|
||||||
val gsvideo = gsvideoName % gsvideoName % gsvideoVersion % (gsvideoConf + "->default") from(gsvideoURL)
|
|
||||||
val guicey = "org.guiceyfruit" % "guice-all" % "2.0" % "compile"
|
|
||||||
val gwtAsyncGen = "com.samskivert" % "gwt-asyncgen" % "1.0" % "system"
|
|
||||||
val gwtDev = "com.google.gwt" % "gwt-dev" % "2.1.0" % "system"
|
|
||||||
val gwtServlet = "com.google.gwt" % "gwt-servlet" % "2.1.0" % "system"
|
|
||||||
val gwtUser = "com.google.gwt" % "gwt-user" % "2.1.0"
|
|
||||||
val gwtUtils = "com.threerings" % "gwt-utils" % "1.2-SNAPSHOT"
|
|
||||||
val httpclient = "org.apache.httpcomponents" % "httpclient" % "4.0.1"
|
|
||||||
val idea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.2-SNAPSHOT"
|
|
||||||
val ideaPlugin = groupId % "sbt-idea-plugin" % testedVersion
|
|
||||||
val ivy = "org.apache.ivy" % "ivy" % "2.1.0" % "compile;runtime;test"
|
|
||||||
val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % JACKSON_VERSION % "compile" //ApacheV2
|
|
||||||
val jacksonCore = "org.codehaus.jackson" % "jackson-core-asl" % jacksonVersion withSources()
|
|
||||||
val jacksonMapper = "org.codehaus.jackson" % "jackson-mapper-asl" % jacksonVersion withSources ()
|
|
||||||
val jackson_core = "org.codehaus.jackson" % "jackson-core-asl" % JACKSON_VERSION % "compile" //ApacheV2
|
|
||||||
val jcip = "net.jcip" % "jcip-annotations" % "1.0" % "provided->default"
|
|
||||||
val configgy = "net.lag" % "configgy" % "2.0.2-nologgy" % "compile" //ApacheV2
|
|
||||||
val easymock = "org.easymock" % "easymock" % "2.5.1"
|
|
||||||
val guava = "com.google.guava" % "guava" "latest.release"
|
|
||||||
val jetty = "org.mortbay.jetty" % "jetty" % "6.1.25"
|
|
||||||
val jmock = "org.jmock" % "jmock" % "2.4.0"
|
|
||||||
val jodaTime = "joda-time" % "joda-time" % "1.6"
|
|
||||||
val jsengine = "javax.script" % "js-engine" % "1.0"
|
|
||||||
val jsr166x = "jsr166x" % "jsr166x" % "1.0" % "compile" //CC Public Domain
|
|
||||||
val jsr250 = "javax.annotation" % "jsr250-api" % "1.0" % "compile" //CDDL v1
|
|
||||||
val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1" % "compile" //CDDL v1
|
|
||||||
val jta = "javax.transaction" % "jta" % "1.1" % "provided"
|
|
||||||
val junit = "junit" % "junit" % "4.5"
|
|
||||||
val junit = "junit" % "junit" % "4.8.2" % "test"
|
|
||||||
val junitInterface = "com.novocode" % "junit-interface" % "0.4" % "test"
|
|
||||||
val logback = "ch.qos.logback" % "logback-classic" % LOGBACK_VERSION % "compile" //LGPL 2.1
|
|
||||||
val markdown = "org.markdownj" % "markdownj" % "0.3.0-1.0.2b4" % "runtime"
|
|
||||||
val maven = "org.apache.maven" % "maven-ant-tasks" % "2.1.0" % "compile;runtime;test"
|
|
||||||
val miglayout = "com.miglayout" % "miglayout" % "3.7.1"
|
|
||||||
val mockito = "org.mockito" % "mockito-all" % "1.8.0" % "test"
|
|
||||||
val multiverse = "org.multiverse" % "multiverse-alpha" % MULTIVERSE_VERSION % "compile" intransitive //ApacheV2
|
|
||||||
val naggati = "net.lag" % "naggati" % "0.7.2"
|
|
||||||
val netty = "org.jboss.netty" % "netty" % "3.2.3.Final"
|
|
||||||
val objenesis = "org.objenesis" % "objenesis" % "1.0"
|
|
||||||
val objenesis = "org.objenesis" % "objenesis" % "1.2" % "compile"
|
|
||||||
val opengl = "org.processing" % "opengl" % processingVersion.value
|
|
||||||
val ostrich = "com.twitter" % "ostrich" % "2.3.4"
|
|
||||||
val paranamer = "com.thoughtworks.paranamer" % "paranamer" % "2.3" withSources()
|
|
||||||
val posterous = "net.databinder" % "posterous-sbt" % "0.1.4"
|
|
||||||
val proguard = "org.scala-tools.sbt" % "sbt-proguard-plugin" % "0.0.5"
|
|
||||||
val proguardJar = "net.sf.proguard" % "proguard" % "4.4" % "tools->default"
|
|
||||||
val protobuf = "com.google.protobuf" % "protobuf-java" % "2.3.0" % "compile" //New BSD
|
|
||||||
val rsync = "com.codahale" % "rsync-sbt" % "0.1.1"
|
|
||||||
val sbinary = "sbinary" % "sbinary" % "2.8.0-0.3.1" % "compile" //MIT
|
|
||||||
val sbtIdea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.1.0"
|
|
||||||
val scalariform = "org.scalariform" % "scalariform_2.8.0" % "0.0.7"%"compile;runtime;test"
|
|
||||||
val scalate = "org.fusesource.scalate" % "scalate-core" % "1.3-SNAPSHOT"
|
|
||||||
val scriptapi = "javax.script" % "script-api" % "1.0"
|
|
||||||
val scripted = "org.scala-tools.sbt" % "scripted" % "0.7.4"
|
|
||||||
val scriptedTestUtils = groupId % "sbt-idea-tests_2.7.7" % testedVersion
|
|
||||||
val scriptjs = "javax.script" % "script-js" % "1.0"
|
|
||||||
val servlet = "javax.servlet" % "servlet-api" % "2.5" withSources
|
|
||||||
val servletApi = "org.mortbay.jetty" % "servlet-api" % "2.5-20081211" % "provided"
|
|
||||||
val sfl4japi = "org.slf4j" % "slf4j-api" % slf4jVersion % "compile"
|
|
||||||
val simplespec = "com.codahale" %% "simplespec" % "0.2.0" % "test" withSources ()
|
|
||||||
val sjson = "sjson.json" % "sjson" % "0.8-2.8.0" % "compile" //ApacheV2
|
|
||||||
val spdeSbt = "us.technically.spde" % "spde-sbt-plugin" % "0.4.2"
|
|
||||||
val spde_core = "org.processing" % "core-android" % "1.1"
|
|
||||||
val spde_sbt = "us.technically.spde" % "spde-sbt-plugin" % "0.4.2"
|
|
||||||
val spde_video = "us.technically.spde" %% "spde-video" % spdeVersion.value
|
|
||||||
val squeryl = "org.squeryl" % "squeryl_2.8.0" % "0.9.4-RC3"
|
|
||||||
val thrift = "thrift" % "libthrift" % "0.5.0"
|
|
||||||
val util = "com.twitter" % "util" % "1.4.13"
|
|
||||||
val uuid = "com.eaio" % "uuid" % "3.2" % "compile" //MIT license
|
|
||||||
val vscaladoc = "org.scala-tools" % "vscaladoc" % "1.1-md-3"
|
|
||||||
val wikitext = "org.eclipse.mylyn.wikitext" % "wikitext" % "0.9.4.I20090220-1600-e3x"
|
|
||||||
val wikitextile = "org.eclipse.mylyn.wikitext" % "wikitext.textile" % "0.9.4.I20090220-1600-e3x"
|
|
||||||
val xrayspecs = "com.twitter" % "xrayspecs" % "1.0.7"
|
|
||||||
|
|
||||||
dispatch-http
|
|
||||||
dispatch-futures
|
|
||||||
dispatch-mime
|
|
||||||
dispatch-json
|
|
||||||
dispatch-http-json
|
|
||||||
dispatch-lift-json
|
|
||||||
dispatch-oauth
|
|
||||||
dispatch-meetup
|
|
||||||
dispatch-couch
|
|
||||||
dispatch-twitter
|
|
||||||
dispatch-times
|
|
||||||
dispatch-s3
|
|
||||||
dispatch-google
|
|
||||||
Loading…
Reference in New Issue