-
Notifications
You must be signed in to change notification settings - Fork 31
Example build File
hamnis edited this page Oct 10, 2012
·
3 revisions
import aether._
import sbt._
import sbt.Keys._
object Build extends sbt.Build {
lazy val buildSettings = Defaults.defaultSettings ++ Aether.aetherSettings ++ Seq(
organization := "com.example",
scalaVersion := "2.9.1",
crossScalaVersions := Seq("2.9.1"),
publishTo <<= (version) apply {
(v: String) => if (v.trim().endsWith("SNAPSHOT")) Some(Resolvers.sonatypeNexusSnapshots) else Some(Resolvers.sonatypeNexusStaging)
},
credentials += Credentials(Path.userHome / ".sbt" / ".credentials"),
pomIncludeRepository := { x => false }
)
lazy val root = Project(
id = "example",
base = file("."),
settings = buildSettings ++ Seq(
description := "Example project",
name := "example",
libraryDependencies := Seq(),
manifestSetting
)
)
object Resolvers {
val sonatypeNexusSnapshots = "Sonatype Nexus Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
val sonatypeNexusStaging = "Sonatype Nexus Staging" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"
}
}