-
-
Save He-Pin/6a6a9b5c88d13db543a4 to your computer and use it in GitHub Desktop.
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
import sbt._ | |
import Keys._ | |
object Build extends sbt.Build { | |
val unmanagedJars = TaskKey[Keys.Classpath]("unmanaged-jars") | |
unmanagedJars := { | |
Configuration.listUnmanaged( file(".").getAbsoluteFile ) | |
} | |
lazy val jobsProject = Project( "some-company-jobs", file(".").getAbsoluteFile ) | |
.settings( | |
organization := "com.some-company", | |
version := "1.0.0", | |
scalaVersion := "2.9.1", | |
scalacOptions := Seq("-deprecation", "-encoding", "utf8"), | |
resolvers ++= Configuration.resolutionRepos, | |
libraryDependencies ++= Configuration.dependencies, | |
unmanagedBase := file( "custom-libs" ).getAbsoluteFile | |
) | |
} | |
object Configuration { | |
def listUnmanaged( base : RichFile ) : Keys.Classpath = { | |
val baseDirectories = (base / "custom_libs") +++ ( base / "executables" ) | |
(baseDirectories ** "*.jar").classpath | |
} | |
object Repos { | |
val SonatypeSnapshots = ("sonatype-snapshots" at "http://oss.sonatype.org/content/repositories/snapshots") | |
val SonatypeReleases = "sonatype-releases" at "http://oss.sonatype.org/content/repositories/releases" | |
val SpringSource = "spring-source" at "http://repository.springsource.com/ivy/bundles/release" | |
val SpringExternal = "spring-external" at "http://repository.springsource.com/maven/bundles/external" | |
} | |
val resolutionRepos = Seq[Resolver]( | |
ScalaToolsReleases, | |
ScalaToolsSnapshots, | |
Repos.SonatypeReleases, | |
Repos.SonatypeSnapshots, | |
Repos.SpringExternal, | |
Repos.SpringSource | |
) | |
val dependencies = Seq( | |
"commons-lang" % "commons-lang" % "2.6", | |
"commons-cli" % "commons-cli" % "1.2", | |
"commons-pool" % "commons-pool" % "1.5.6", | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment