Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@samidalouche
Created February 22, 2011 20:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samidalouche/839320 to your computer and use it in GitHub Desktop.
Save samidalouche/839320 to your computer and use it in GitHub Desktop.
import java.io.File
import sbt._
import de.element34.sbteclipsify._
class Project(info: ProjectInfo) extends ParentProject(info) with IdeaProject {
//lazy val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository"
lazy val geotoolsRepository = "Open Source Geospatial Foundation Repository" at "http://download.osgeo.org/webdav/geotools/"
lazy val javanetRepository = "Java.net Repository" at "http://download.java.net/maven/2"
lazy val iglootoolsRepository = "Iglootools Releases Repository" at "http://developers.sirika.com/maven2/releases/"
override def managedStyle = ManagedStyle.Maven
// Publishing
//lazy val keyFile: File = (Path.userHome / ".ssh" / "id_rsa").asFile
//lazy val publishTo = Resolver.sftp("Iglootools maven2", "iglootools.org", "/srv/http/iglootools.org/maven2/internal") as ("samokk", keyFile)
// Project Definitions
override def parallelExecution = true
lazy val commons = project("commons", "igloofinder-commons", new Commons(_))
lazy val domain = project("domain", "igloofinder-domain", new Domain(_), commons)
lazy val domainIntegrationTests = project("domain-integration-tests", "domain-integration-tests", new DomainIntegrationTests(_), domain)
lazy val webDomain = project("web-domain", "igloofinder-web-domain", new WebDomain(_), commons)
lazy val webDomainIntegrationTests = project("web-domain-integration-tests", "igloofinder-web-domain-integration-tests", new DomainIntegrationTests(_), webDomain)
lazy val webui = project("web-ui", "igloofinder-web-ui", new WebDomain(_), webdomain)
object Dependencies {
// test dependencies
lazy val junit = "junit" % "junit" % "4.8.2" % "test" withSources()
lazy val scalaTest = "org.scalatest" % "scalatest" % "1.2" % "test" withSources()
lazy val mockito = "org.mockito" % "mockito-all" % "1.8.5" % "test" withSources()
//val avsl = "org.clapper" %% "avsl" % "0.3.1" % "test" // withSources()
lazy val logback = "ch.qos.logback" % "logback-classic" % "0.9.27" % "test" // withSources()
}
class Commons(info: ProjectInfo) extends DefaultProject(info) with IdeaProject {
// commons
lazy val jodaTime = "joda-time" % "joda-time" % "1.6.2" withSources()
lazy val icu4j = "com.ibm.icu" % "icu4j" % "4.6" withSources()
lazy val slf4jApi = "org.slf4j" % "slf4j-api" % "1.6.1" withSources()
lazy val grizzled = "org.clapper" %% "grizzled-slf4j" % "0.4" // withSources()
// IoC
lazy val guice = "com.google.code.guice" % "guice" % "1.0" withSources()
// HTTP and REST
lazy val HttpComponentsVersion = "4.1"
lazy val hcHelpers = "org.iglootools.hchelpers" % "hchelpers-scala" % "0.10-SNAPSHOT" //withSources()
lazy val httpComponentsClient = "org.apache.httpcomponents" % "httpclient" % HttpComponentsVersion withSources()
lazy val httpComponentsMime = "org.apache.httpcomponents" % "httpmime" % HttpComponentsVersion withSources()
// GIS
lazy val jts = "com.vividsolutions" % "jts" % "1.8" // withSources()
lazy val geotools = "org.geotools" % "gt-main" % "2.6.5" withSources() // depends geotools and java.net repositories
// hacks
// needed for guava+scala-IDE : javax.annotation.Nullable
lazy val jsr305 = "com.google.code.findbugs" % "jsr305" % "1.3.9" //withSources()
// needed for guice
lazy val aopalliance = "aopalliance" % "aopalliance" % "1.0" withSources()
// test dependencies
lazy val junit = Dependencies.junit
lazy val scalaTest = Dependencies.scalaTest
lazy val mockito = Dependencies.mockito
lazy val logback = Dependencies.logback
}
class DomainIntegrationTests(info: ProjectInfo) extends DefaultProject(info) with IdeaProject {
override def testOptions = TestFilter(s => true) :: super.testOptions.toList
// test dependencies
lazy val junit = Dependencies.junit
lazy val scalaTest = Dependencies.scalaTest
lazy val logback = Dependencies.logback
}
class Domain(info: ProjectInfo) extends DefaultProject(info) with IdeaProject {
}
// Additional Tasks
lazy val skipIntegrationTests = systemOptional[Boolean]("skipIntegrationTests", false).value
lazy val printit = task {
println("SKIP INTEGRATION TESTS: " + skipIntegrationTests)
None
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment