Advertisement
Guest User

Untitled

a guest
Aug 12th, 2011
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.36 KB | None | 0 0
  1.  
  2. import sbt._
  3. import Keys._
  4. import org.sbtidea._
  5. import SbtIdeaPlugin._
  6. import Scope.{GlobalScope, ThisScope}
  7.  
  8. // val nexus = "http://nexus.scala-tools.org/content/repositories/"
  9.  
  10. //object AkkaDemoBuild extends Build {
  11.  
  12. object BuildSettings {
  13.  
  14. val buildOrganization = "com.orsa"
  15. val buildScalaVersion = "2.9.0-1"
  16. val buildVersion = "1.0-SNAPSHOT"
  17.  
  18. val buildSettings = Defaults.defaultSettings ++
  19. Seq (
  20. organization := buildOrganization,
  21. scalaVersion := buildScalaVersion,
  22. version := buildVersion,
  23. parallelExecution := false,
  24. //retrieveManaged := true,
  25. moduleConfigurations ++= Resolvers.moduleConfigurations,
  26. javacOptions ++= Seq("-Xlint:unchecked"),
  27. scalacOptions ++= Seq("-deprecation", "-unchecked", "-Xcheckinit", "-encoding", "utf8")
  28. )
  29. }
  30.  
  31. //[error] {file:/C:/home/projects/akkademo/}AkkaDemo/*:update: sbt.ResolveException: unresolved dependency:
  32. // org.guiceyfruit#guice-all;2.0: not found
  33. //[error] unresolved dependency: voldemort.store.compress#h2-lzf;1.0: not found
  34. //[error] unresolved dependency: org.codehaus.aspectwerkz#aspectwerkz;2.2.3: not found
  35.  
  36.  
  37. object Resolvers {
  38.  
  39. val jnaResolver = "jna" at "http://download.java.net/maven/2/"
  40.  
  41. val maven2Resolver = "maven2" at "http://repo1.maven.org/maven2"
  42.  
  43. // Akka
  44. //val akkaResolver = "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
  45. val akkaResolver = "Akka Repository" at "http://akka.io/repository"
  46.  
  47. // JNA
  48. val maven2jnaResolver = "java.net-maven2-repository" at "java-net:/maven2-repository/trunk/repository/"
  49.  
  50. val sgineResolver = "scala-tools.org-nexus-public-snapshots" at "http://nexus.scala-tools.org/content/repositories/public-snapshots/"
  51.  
  52. //http://nexus.scala-tools.org/content/repositories/releases/
  53.  
  54. val GuiceyFruitRepo = "Guicey fruit repo" at "http://guiceyfruit.googlecode.com/svn/repo/releases/"
  55. //val CodehausRepo = "Codehaus Repo" at "http://repository.codehaus.org"
  56.  
  57.  
  58. val lwjglRepo = "lwjgl" at "http://adterrasperaspera.com/lwjgl"
  59.  
  60. val sbtIdeaResolver = "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
  61.  
  62. val db4oResolver = "source.db4o" at "http://source.db4o.com/maven"
  63.  
  64. val moduleConfigurations = Seq(
  65.  
  66. ModuleConfiguration("se.scalablesolutions.akka", akkaResolver),
  67. ModuleConfiguration("net.java.dev.jna", jnaResolver),
  68.  
  69. ModuleConfiguration("net.java.dev.jna", maven2Resolver),
  70. ModuleConfiguration("org.apache.felix", maven2Resolver),
  71. ModuleConfiguration("org.osgi", maven2Resolver),
  72.  
  73. ModuleConfiguration("org.sgine", sgineResolver),
  74. ModuleConfiguration("org.lwjgl", lwjglRepo),
  75.  
  76. ModuleConfiguration("voldemort.store.compress", akkaResolver),
  77. ModuleConfiguration("org.guiceyfruit", GuiceyFruitRepo),
  78. ModuleConfiguration("org.codehaus.aspectwerkz", akkaResolver),
  79.  
  80. ModuleConfiguration("com.github.mpeltonen", sbtIdeaResolver),
  81.  
  82. ModuleConfiguration("com.db4o", db4oResolver)
  83. )
  84. }
  85.  
  86. object Dependencies {
  87.  
  88. val akkaVersion = "1.1.3"
  89. def akka(name: String) = "se.scalablesolutions.akka" % "akka-%s".format(name) % akkaVersion
  90.  
  91. val akka = "se.scalablesolutions.akka" % "akka" % akkaVersion
  92. val akkaActor = akka("actor")
  93. val akkaCamel = akka("camel")
  94. val akkaStm = akka("stm")
  95.  
  96.  
  97. val jna = "net.java.dev.jna" % "jna" % "3.2.7"
  98.  
  99.  
  100. val felixFramework = "org.apache.felix" % "org.apache.felix.framework" % "3.2.2"
  101. val felixMain = "org.apache.felix" % "org.apache.felix.main" % "3.2.2"
  102.  
  103. val osgiCore = "org.osgi" % "org.osgi.core" % "4.2.0"
  104. val osgiCompendium = "org.osgi" % "org.osgi.compendium" % "4.2.0"
  105.  
  106. val sgine = "org.sgine" %% "sgine-ui" % "1.0-SNAPSHOT"
  107.  
  108. val db4o = "com.db4o" % "db4o-full-java5" % "8.1-SNAPSHOT"
  109.  
  110.  
  111. val sbtIdea = "com.github.mpeltonen" %% "sbt-idea" % "0.10.0"
  112.  
  113.  
  114.  
  115. // Use ehcache for the images as they will be created and destroyed, but we dont have enough ram to keep them all around
  116. // @todo val ehcache = "net.sf.ehcache" % "ehcache" % "2.4.3"
  117.  
  118. // Use db4o for normal data objects, blobs are stored in normal files http://stackoverflow.com/questions/964053/saving-images-or-pdfs-in-db4o
  119. // Use neo4j for highly connected data
  120.  
  121. //val sgine7 = "org.sgine" % "sgine-ui_2.9.0-1" % "1.0-SNAPSHOT"
  122. //val sgine7 = "org.sgine" %% "sgine-ui" % "1.0-SNAPSHOT"
  123.  
  124. // [error] {file:/C:/home/projects/akkademo/}AkkaDemo/*:update: sbt.ResolveException: unresolved dependency:
  125. // org.lwjgl#lwjgl;2.7.1: not found
  126.  
  127. }
  128.  
  129.  
  130.  
  131.  
  132.  
  133. object AkkaDemoBuild extends Build {
  134.  
  135. import Resolvers._
  136. import Dependencies._
  137. import BuildSettings._
  138.  
  139. lazy val root = Project ("AkkaDemo", file("."), settings = buildSettings ++ Seq (
  140. libraryDependencies := web ))
  141.  
  142. val web = Seq (akka, akkaActor, akkaCamel, akkaStm, jna, felixFramework, felixMain, osgiCore, osgiCompendium, db4o,
  143. sgine)
  144.  
  145.  
  146.  
  147.  
  148. // val jna = "net.java.dev.jna" % "jna" % "3.2.7"
  149. // val felixFramework = "org.apache.felix" % "org.apache.felix.framework" % "3.2.2"
  150. // val felixMain = "org.apache.felix" % "org.apache.felix.main" % "3.2.2"
  151. // val osgiCore = "org.osgi" % "org.osgi.core" % "4.2.0"
  152. // val osgiCompendium = "org.osgi" % "org.osgi.compendium" % "4.2.0"
  153.  
  154.  
  155.  
  156.  
  157. }
  158.  
  159. /*
  160. http://stackoverflow.com/questions/6566470/how-to-add-sbteclipse-pluging-to-sbt-0-10-x
  161.  
  162. lazy val AkkaRepo = "Akka Repository" at "http://akka.io/repository"
  163. lazy val CodehausRepo = "Codehaus Repo" at "http://repository.codehaus.org"
  164. lazy val GuiceyFruitRepo = "GuiceyFruit Repo" at "http://guiceyfruit.googlecode.com/svn/repo/releases/"
  165. lazy val JBossRepo = "JBoss Repo" at "http://repository.jboss.org/nexus/content/groups/public/"
  166. lazy val JavaNetRepo = "java.net Repo" at "http://download.java.net/maven/2"
  167. lazy val SonatypeSnapshotRepo = "Sonatype OSS Repo" at "http://oss.sonatype.org/content/repositories/releases"
  168. lazy val GlassfishRepo = "Glassfish Repo" at "http://download.java.net/maven/glassfish"
  169. lazy val ScalaToolsRelRepo = "Scala Tools Releases Repo" at "http://scala-tools.org/repo-releases"
  170. lazy val DatabinderRepo = "Databinder Repo" at "http://databinder.net/repo"
  171. lazy val ScalaToolsSnapshotRepo = "Scala-Tools Snapshot Repo" at "http://scala-tools.org/repo-snapshots"
  172.  
  173. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement