Unverified Commit a30e1da0 authored by Romain Reuillon's avatar Romain Reuillon
Browse files

[Build] enh: refactor the build system.

parent 765a85b1
......@@ -3,22 +3,21 @@ package org.openmole.buildsystem
import org.apache.commons.compress.archivers.tar.{ TarArchiveEntry, TarArchiveOutputStream }
import sbt._
import Keys._
import scala.util.matching.Regex
import OMKeys._
import java.util.zip.GZIPOutputStream
import resource._
import java.io.{ BufferedOutputStream, FileOutputStream }
import com.typesafe.sbt.osgi.OsgiKeys
import scala.io.Source
import com.typesafe.sbt.osgi.OsgiKeys._
import org.json4s.jsonwritable
/**
* Created with IntelliJ IDEA.
* User: luft
* Date: 6/5/13
* Time: 3:42 PM
*/
trait Assembly {
self: BuildSystemDefaults
object Assembly {
lazy val tarProject: Seq[Setting[_]] = Seq(
Tar.name := "assemble.tar.gz",
......@@ -57,17 +56,17 @@ trait Assembly {
}
private def copyLibraryDependencies(
cp: Seq[Attributed[File]],
out: File,
rename: ModuleID String,
depFilter: (ModuleID, Artifact) Boolean,
streams: TaskStreams
externalDependencies: Seq[Attributed[File]],
out: File,
rename: ModuleID String,
depFilter: (ModuleID, Artifact) Boolean,
streams: TaskStreams
) = {
cp.flatMap { attributed
(externalDependencies).distinct.flatMap { attributed
(attributed.get(Keys.moduleID.key), attributed.get(Keys.artifact.key)) match {
case (Some(moduleId), Some(artifact)) if (depFilter(moduleId, artifact)) Some(moduleId attributed.data) else None
case _ None
case (Some(moduleId), Some(artifact))
if (depFilter(moduleId, artifact)) Some(moduleId attributed.data) else None
case _ None
}
}.map {
case (module, srcPath)
......@@ -88,17 +87,16 @@ trait Assembly {
(path, files)
files.foreach(f new File(path, f).setExecutable(true))
path
} dependsOn (copyResources, (downloads, assemblyPath, ivyPaths, streams) map urlDownloader),
} dependsOn (copyResources in assemble, (downloads, assemblyPath, ivyPaths, streams) map urlDownloader),
Tar.folder <<= assemble,
bundleProj := false,
dependencyName := { (_: ModuleID).name + ".jar" },
dependencyFilter := { (_, _) true },
copyResources <<=
(copyResources in assemble) <<=
(resourcesAssemble, streams) map {
case (resources, s)
resources.map { case (from, to) copyFileTask(from, to, s) }
},
copyResources <++= (externalDependencyClasspath in Compile, assemblyDependenciesPath, dependencyName, dependencyFilter, streams) map copyLibraryDependencies
(copyResources in assemble) <++= ( /*dependencyClasspath in Compile,*/ externalDependencyClasspath in Compile, assemblyDependenciesPath, dependencyName, dependencyFilter, streams) map copyLibraryDependencies
)
def tarImpl(folder: File, s: TaskStreams, t: File, name: String, innerFolder: String, streams: TaskStreams): File = {
......@@ -177,60 +175,3 @@ trait Assembly {
}
object Assembly {
//checks to see if settingkey key exists for project p in Seq s. If it does, applies the filter function to key's value, and if that returns true, the project stays in the seq.
def projFilter[T](s: Seq[ProjectReference], key: SettingKey[T], filter: T Boolean, intransitive: Boolean): Def.Initialize[Seq[ProjectReference]] = {
// (key in p) ? returns Initialize[Option[T]]
// Project.Initialize.join takes a Seq[Initialize[_]] and gives back an Initialize[Seq[_]]
val ret = Def.Initialize.join(s map { p (key in p).?(i i p) })(_ filter {
case (None, _) false
case (Some(v), _) filter(v)
})(_ map {
_._2
})
lazy val ret2 = Def.bind(ret) { r
val x = r.map(expandToDependencies)
val y = Def.Initialize.join(x)
y {
_.flatten.toSet.toSeq
} //make sure all references are unique
}
if (intransitive) ret else ret2
}
//recursively explores the dependency tree of pr and adds all dependencies to the list of projects to be copied
def expandToDependencies(pr: ProjectReference): Def.Initialize[Seq[ProjectReference]] = {
val r = (thisProject in pr) {
_.dependencies.map(_.project)
}
val r3 = Def.bind(Def.bind(r) { ret Def.Initialize.join(ret map expandToDependencies) }) { ret r(first pr +: ret.flatten) }
r3
}
implicit def ProjRefs2RichProjectSeq(s: Seq[ProjectReference]) = new RichProjectSeq(Def.value(s))
implicit def InitProjRefs2RichProjectSeq(s: Def.Initialize[Seq[ProjectReference]]) = new RichProjectSeq(s)
class RichProjectSeq(s: Def.Initialize[Seq[ProjectReference]]) {
def keyFilter[T](key: SettingKey[T], filter: (T) Boolean, intransitive: Boolean = false) = projFilter(s, key, filter, intransitive)
def sendTo(to: Def.Initialize[File]) = sendBundles(s zip to) //TODO: This function is specific to OSGI bundled projects. Make it less specific?
}
def projFilter[T](s: Def.Initialize[Seq[ProjectReference]], key: SettingKey[T], filter: T Boolean, intransitive: Boolean): Def.Initialize[Seq[ProjectReference]] = {
Def.bind(s)(j projFilter(j, key, filter, intransitive))
}
//TODO: New API makes this much simpler
//val bundles: Seq[FIle] = bundle.all( ScopeFilter( inDependencies(ref) ) ).value
def sendBundles(bundles: Def.Initialize[(Seq[ProjectReference], File)]): Def.Initialize[Task[Seq[(File, File)]]] = Def.bind(bundles) {
case (projs, to)
require(projs.nonEmpty)
val seqOTasks: Def.Initialize[Seq[Task[Seq[(File, File)]]]] = Def.Initialize.join(projs.map(p (bundle in p) map { f Seq(f (to / f.getName)) }))
seqOTasks { seq
seq.reduceLeft[Task[Seq[(File, File)]]] { case (a, b) a flatMap { i b map { _ ++ i } } }
}
}
}
package org.openmole.buildsystem
import sbt._
import Keys._
import OMKeys._
import com.typesafe.sbt.SbtScalariform.{ scalariformSettings, ScalariformKeys }
import scalariform.formatter.preferences._
import sbt.inc.Analysis
trait BuildSystemDefaults extends Build with OsgiBundler with Assembly {
def dir: File
def org: String
def projectName: String
lazy val projectRefs: Seq[ProjectReference] = super.projects.map(_.project) ++ subProjects
def subProjects: Seq[ProjectReference] = Nil
val credential = Path.userHome / ".sbt" / "openmole.credentials"
lazy val commonsSettings =
Seq(scalacOptions ++= Seq("-feature", "-language:reflectiveCalls", "-language:implicitConversions",
"-language:existentials", "-language:postfixOps", "-Yinline-warnings")) ++ (if (credential.exists()) Seq(credentials += Credentials(credential)) else Seq.empty) ++ scalariformDefaults
protected lazy val scalariformDefaults =
Seq(
ScalariformKeys.preferences in Compile <<= ScalariformKeys.preferences(p
p.setPreference(DoubleIndentClassDeclaration, true)
.setPreference(RewriteArrowSymbols, true)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(CompactControlReadability, true)
.setPreference(PreserveDanglingCloseParenthesis, true))
) ++ scalariformSettings
}
......@@ -13,8 +13,6 @@ object OMKeys {
val bundleType = SettingKey[Set[String]]("bundle-type") //Default setting for osgiprojects is default.
val bundleProj = SettingKey[Boolean]("bundle-proj")
val openMoleStandardVer = SettingKey[String]("openmole-version")
val eclipseBuddyPolicy = SettingKey[Option[String]]("OSGi.eclipseBuddyPolicy", "The eclipse buddy policy thing.")
......@@ -52,9 +50,10 @@ object OMKeys {
val folder = TaskKey[File]("tar-folder", "The folder to tar.")
}
object OSGi {
object Osgi {
val singleton = SettingKey[Boolean]("osgi-singleton")
val openMOLEScope = SettingKey[Option[String]]("openmole-scope")
val bundleDependencies = TaskKey[Seq[File]]("bundle-dependencies")
}
}
......@@ -5,31 +5,29 @@ import Keys._
import OMKeys._
import com.typesafe.sbt.osgi.{ OsgiKeys, SbtOsgi }
trait OsgiBundler {
self: BuildSystemDefaults
object OsgiProject {
protected val bundleMap = Map("Bundle-ActivationPolicy" "lazy")
protected def osgiSettings = SbtOsgi.autoImport.osgiSettings ++ Seq(
OsgiKeys.bundleSymbolicName <<= (name, OSGi.singleton) { case (name, singleton) name + ";singleton:=" + singleton },
OsgiKeys.bundleSymbolicName <<= (name, Osgi.singleton) { case (name, singleton) name + ";singleton:=" + singleton },
autoAPIMappings := true,
bundleProj := true,
OSGi.openMOLEScope := None,
Osgi.bundleDependencies in Compile := OsgiKeys.bundle.all(ScopeFilter(inDependencies(ThisProject))).value,
Osgi.openMOLEScope := None,
OsgiKeys.bundleVersion <<= version,
OsgiKeys.exportPackage <<= name { n Seq(n + ".*") },
OsgiKeys.bundleActivator := None,
OsgiKeys.requireCapability := """osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.7))""",
install in Compile <<= publishLocal in Compile,
installRemote in Compile <<= publish in Compile,
OsgiKeys.bundle <<= OsgiKeys.bundle tag Tags.Disk,
(update in install) <<= update in install tag Tags.Network,
bundleType := Set("default"),
test in (Test, test) <<= test in (Test, test) tag (Tags.Disk)
) ++ scalariformDefaults
bundleType := Set("default")
)
def OsgiProject(
artifactSuffix: String,
pathFromDir: String = "",
def apply(
directory: File,
artifactId: String,
exports: Seq[String] = Seq(),
privatePackages: Seq[String] = Seq(),
singleton: Boolean = false,
......@@ -38,21 +36,17 @@ trait OsgiBundler {
dynamicImports: Seq[String] = Seq(),
imports: Seq[String] = Seq("*;resolution:=optional"),
global: Boolean = false
)(implicit artifactPrefix: Option[String] = None) = {
require(artifactPrefix.forall(!_.endsWith(".")), "Do not end your artifact prefix with ., it will be added automatically.")
) = {
val artifactId = artifactPrefix map (_ + "." + artifactSuffix) getOrElse artifactSuffix
val base = dir / (if (pathFromDir == "") artifactId else pathFromDir)
val base = directory / artifactId
val exportedPackages = if (exports.isEmpty) Seq(artifactId + ".*") else exports
Project(artifactId.replace('.', '-'), base, settings = settings).enablePlugins(SbtOsgi).settings(commonsSettings ++ osgiSettings: _*).settings(
Project(artifactId.replace('.', '-'), base, settings = settings).enablePlugins(SbtOsgi).settings(osgiSettings: _*).settings(
name := artifactId,
organization := org,
OSGi.singleton := singleton,
Osgi.singleton := singleton,
OsgiKeys.exportPackage := exportedPackages,
OsgiKeys.additionalHeaders <<=
(OSGi.openMOLEScope) {
(Osgi.openMOLEScope) {
omScope
Map[String, String]() +
("Bundle-ActivationPolicy" "lazy") ++
......@@ -65,12 +59,16 @@ trait OsgiBundler {
OsgiKeys.bundleActivator <<= OsgiKeys.bundleActivator { bA bundleActivator.orElse(bA) }
)
}
}
def OsgiGUIProject(
name: String,
ext: ClasspathDep[ProjectReference],
client: ClasspathDep[ProjectReference],
server: ClasspathDep[ProjectReference]
) = OsgiProject(name) dependsOn (ext, client, server)
object OsgiGUIProject {
}
def apply(
directory: File,
artifactId: String,
ext: ClasspathDep[ProjectReference],
client: ClasspathDep[ProjectReference],
server: ClasspathDep[ProjectReference]
) = OsgiProject(directory, artifactId) dependsOn (ext, client, server)
}
\ No newline at end of file
import com.typesafe.sbt.osgi.OsgiKeys._
import org.openmole.buildsystem._
//publishTo in ThisBuild <<= isSnapshot(if (_) Some("OpenMOLE Nexus" at "https://maven.openmole.org/snapshots") else Some("OpenMOLE Nexus" at "https://maven.openmole.org/releases"))
def dir = file("bundles")
//enablePlugins(SbtOsgi)
def settings = Seq(
resolvers += DefaultMavenRepository,
resolvers += Resolver.sonatypeRepo("snapshots"),
resolvers += Resolver.sonatypeRepo("releases"),
scalaVersion in Global := "2.11.8",
scalacOptions ++= Seq("-deprecation"),
publishArtifact in (packageDoc in publishLocal) := false,
publishArtifact in (packageSrc in publishLocal) := false,
organization := "org.openmole"
) ++ BuildSystem.settings
lazy val scalatraVersion = "2.4.0"
lazy val jettyVersion = "9.2.14.v20151106"
lazy val scalatra = OsgiProject(dir, "org.scalatra",
exports = Seq("org.scalatra.*, org.fusesource.*", "grizzled.*", "org.eclipse.jetty.*", "javax.*"),
privatePackages = Seq("!scala.*", "!org.slf4j.*", "*")) settings(
libraryDependencies += "org.scalatra" %% "scalatra" % scalatraVersion,
libraryDependencies += "org.scalatra" %% "scalatra-auth" % scalatraVersion,
libraryDependencies += "org.eclipse.jetty" % "jetty-webapp" % jettyVersion,
libraryDependencies += "org.eclipse.jetty" % "jetty-server" % jettyVersion,
version := scalatraVersion) settings(settings: _*)
lazy val json4s = OsgiProject(dir, "org.json4s", exports = Seq("org.json4s.*"), privatePackages = Seq("!scala.*", "!org.slf4j.*", "*")) settings (
libraryDependencies += "org.json4s" %% "json4s-jackson" % "3.4.0" % "provided",
version := "3.4.0") settings(settings: _*)
lazy val logback = OsgiProject(dir, "ch.qos.logback", exports = Seq("ch.qos.logback.*", "org.slf4j.impl"), dynamicImports = Seq("*")) settings
(libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.0.9", version := "1.0.9") settings(settings: _*)
lazy val h2Version = "1.4.192"
lazy val h2 = OsgiProject(dir, "org.h2", dynamicImports = Seq("*"), privatePackages = Seq("META-INF.*")) settings
(libraryDependencies += "com.h2database" % "h2" % h2Version, version := h2Version) settings(settings: _*)
lazy val bonecp = OsgiProject(dir, "com.jolbox.bonecp", dynamicImports = Seq("*")) settings
(libraryDependencies += "com.jolbox" % "bonecp" % "0.8.0-rc1", version := "0.8.0-rc1") settings(settings: _*)
lazy val slickVersion = "3.1.1"
lazy val slick = OsgiProject(dir,"com.typesafe.slick", exports = Seq("slick.*"), privatePackages = Seq("org.reactivestreams.*")) settings
(libraryDependencies += "com.typesafe.slick" %% "slick" % slickVersion, version := slickVersion) settings(settings: _*)
lazy val slf4j = OsgiProject(dir,"org.slf4j") settings(
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.10",
version := "1.7.10") settings(settings: _*)
lazy val xstream = OsgiProject(
dir,
"com.thoughtworks.xstream",
imports = Seq(
"!com.bea.xml.stream.*",
"!com.ctc.wstx.stax.*",
"!net.sf.cglib.*",
"!nu.xom.*",
"!org.codehaus.jettison.*",
"!org.dom4j.*",
"!org.jdom.*",
"!org.jdom2.*",
"!org.w3c.*",
"!org.xml.sax.*",
"!sun.misc.*",
"*"),
privatePackages = Seq("!scala.*", "META-INF.*", "*")) settings(
libraryDependencies ++= Seq("com.thoughtworks.xstream" % "xstream" % "1.4.8", "net.sf.kxml" % "kxml2" % "2.3.0"),
version := "1.4.8") settings(settings: _*)
lazy val scalaLang = OsgiProject(
dir,
"org.scala-lang.scala-library",
global = true,
exports = Seq("akka.*", "com.typesafe.*", "scala.*", "scalax.*", "jline.*"),
privatePackages = Seq("*"), imports = Seq("!org.apache.tools.ant.*", "!sun.misc.*" ,"*")) settings
(libraryDependencies <++= (scalaVersion) { sV
Seq("org.scala-lang" % "scala-library" % sV,
"org.scala-lang" % "scala-reflect" % sV,
"org.scala-lang" % "scalap" % sV,
"jline" % "jline" % "2.12.1",
"org.scala-stm" %% "scala-stm" % "0.7",
"com.typesafe" % "config" % "1.2.1",
"com.github.scala-incubator.io" %% "scala-io-core" % "0.4.3",
"org.scala-lang" % "scala-compiler" % sV,
"org.scala-lang.modules" %% "scala-xml" % "1.0.5"
)
}, version := scalaVersion.value) settings(settings: _*)
lazy val jodaTime = OsgiProject(dir, "org.joda.time") settings(
libraryDependencies += "joda-time" % "joda-time" % "1.6",
version := "1.6"
) settings(settings: _*)
lazy val jasyptVersion = "1.9.2"
lazy val jasypt = OsgiProject(dir, "org.jasypt.encryption", exports = Seq("org.jasypt.*")) settings(
libraryDependencies += "org.jasypt" % "jasypt" % jasyptVersion,
version := jasyptVersion
) settings(settings: _*)
lazy val netLogo5Version = "5.3.1"
lazy val netlogo5 = OsgiProject(
dir,
"ccl.northwestern.edu.netlogo5",
exports = Seq("org.nlogo.*"),
privatePackages = Seq("**"),
imports = Seq("!*")) settings
(libraryDependencies ++= Seq("ccl.northwestern.edu" % "netlogo" % netLogo5Version % "provided" from s"https://github.com/NetLogo/NetLogo/releases/download/$netLogo5Version/NetLogo.jar",
"org.scala-lang" % "scala-library" % "2.9.2" % "provided",
"asm" % "asm-all" % "3.3.1" % "provided",
"org.picocontainer" % "picocontainer" % "2.13.6" % "provided"), version := netLogo5Version, scalaVersion := "2.9.2", crossPaths := false) settings(settings: _*)
lazy val guava = OsgiProject(dir, "com.google.guava",
exports = Seq("com.google.common.*"), privatePackages = Seq("!scala.*", "*")) settings(libraryDependencies ++=
Seq("com.google.guava" % "guava" % "18.0", "com.google.code.findbugs" % "jsr305" % "1.3.9"),
version := "18.0"
) settings(settings: _*)
lazy val scalaTagsVersion = "0.6.0"
lazy val scalaRxVersion = "0.3.1"
lazy val scalaDomVersion = "0.9.0"
lazy val querkiJSQueryVersion = "0.11"
lazy val scalaUpickleVersion = "0.4.1"
lazy val scalaAutowireVersion = "0.2.5"
lazy val scalajsVersion = "0.6.11"
lazy val rx = OsgiProject(dir, "rx", exports = Seq("rx.*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "scalarx" % scalaRxVersion),
version := scalaRxVersion) settings(settings: _*)
lazy val scalajsTools = OsgiProject(dir, "scalajs-tools", exports = Seq("scala.scalajs.*", "org.scalajs.core.tools.*", "org.scalajs.core.ir.*", "com.google.javascript.*", "com.google.common.*", "rhino_ast.java.com.google.javascript.rhino.*", "org.json.*")) settings(
libraryDependencies += "org.scala-js" %% "scalajs-tools" % scalajsVersion, version := scalajsVersion) settings(settings: _*)
lazy val scalaJS = OsgiProject(dir, "scalajs", exports = Seq("scala.scalajs.*"), imports = Seq("*")) settings (
libraryDependencies += "org.scala-js" %% "scalajs-library" % scalajsVersion,
version := scalajsVersion
) settings(settings: _*)
lazy val scalaTags = OsgiProject(dir, "com.scalatags", exports = Seq("scalatags.*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "scalatags" % scalaTagsVersion),
version := scalaTagsVersion) settings(settings: _*)
lazy val scalatexSite =
OsgiProject(dir, "com.lihaoyi.scalatex-site", exports = Seq("scalatex.*", "ammonite.*", "fastparse.*"), privatePackages = Seq("META-INF.**", "pprint.*", "scalaj.*", "scalaparse.*"), imports = Seq("*")) settings (
libraryDependencies += "com.lihaoyi" %% "scalatex-site" % "0.3.6",
version := "0.3.6") settings(settings: _*)
lazy val upickle = OsgiProject(dir, "upickle", exports = Seq("upickle.*", "jawn.*", "derive.*", "sourcecode.*"), imports = Seq("*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "upickle" % scalaUpickleVersion),
version := scalaUpickleVersion) settings(settings: _*)
lazy val autowire = OsgiProject(dir, "autowire", exports = Seq("autowire.*")) settings(
libraryDependencies ++= Seq("com.lihaoyi" %% "autowire" % scalaAutowireVersion),
version := scalaAutowireVersion) settings(settings: _*)
lazy val jsonSimpleVersion = "1.1.1"
lazy val jsonSimple = OsgiProject(dir, "json-simple", exports = Seq("org.json.simple.*")) settings(
libraryDependencies += "com.googlecode.json-simple" % "json-simple" % jsonSimpleVersion, version := jsonSimpleVersion) settings(settings: _*)
lazy val closureCompilerVersion = "v20130603"
lazy val closureCompiler = OsgiProject(dir, "closure-compiler", exports = Seq("com.google.javascript.*")) settings(
libraryDependencies += "com.google.javascript" % "closure-compiler" % closureCompilerVersion, version := closureCompilerVersion) settings(settings: _*)
lazy val mgoVersion = "2.0"
lazy val mgo = OsgiProject(dir, "fr.iscpif.mgo") settings(
libraryDependencies += "fr.iscpif" %% "mgo" % mgoVersion,
version := mgoVersion
) dependsOn(monocle, scalaz) settings(settings: _*)
lazy val familyVersion = "1.3"
lazy val family = OsgiProject(dir, "fr.iscpif.family") settings(
libraryDependencies += "fr.iscpif" %% "family" % familyVersion,
version := familyVersion
) settings(settings: _*)
lazy val opencsv = OsgiProject(dir, "au.com.bytecode.opencsv") settings(
libraryDependencies += "net.sf.opencsv" % "opencsv" % "2.3",
version := "2.3"
) settings(settings: _*)
lazy val arm = OsgiProject(dir, "com.jsuereth.scala-arm") settings(
libraryDependencies += "com.jsuereth" %% "scala-arm" % "1.4",
version := "1.4",
exportPackage := Seq("resource.*")) settings(settings: _*)
lazy val scalajHttp = OsgiProject(dir, "org.scalaj.scalaj-http") settings(
libraryDependencies += "org.scalaj" %% "scalaj-http" % "0.3.15",
version := "0.3.15",
exportPackage := Seq("scalaj.http.*")
) settings(settings: _*)
lazy val scopt = OsgiProject(dir, "com.github.scopt", exports = Seq("scopt.*")) settings(
libraryDependencies += "com.github.scopt" %% "scopt" % "3.2.0",
version := "3.2.0"
) settings(settings: _*)
lazy val scalabc = OsgiProject(dir, "fr.iscpif.scalabc", privatePackages = Seq("!scala.*", "!junit.*", "*")) settings(
libraryDependencies += "fr.iscpif" %% "scalabc" % "0.4",
version := "0.4"
) settings(settings: _*)
lazy val async =
OsgiProject(dir, "scala-async") settings (
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.1",
version := "0.9.1",
exportPackage := Seq("scala.async.*")) settings(settings: _*)
lazy val mathVersion = "3.5"
lazy val math = OsgiProject(dir, "org.apache.commons.math", exports = Seq("org.apache.commons.math3.*"), privatePackages = Seq("assets.*")) settings
(libraryDependencies += "org.apache.commons" % "commons-math3" % mathVersion, version := mathVersion) settings(settings: _*)
lazy val exec = OsgiProject(dir, "org.apache.commons.exec") settings
(libraryDependencies += "org.apache.commons" % "commons-exec" % "1.1", version := "1.1") settings(settings: _*)
lazy val log4j = OsgiProject(dir, "org.apache.log4j") settings
(libraryDependencies += "log4j" % "log4j" % "1.2.17", version := "1.2.17") settings(settings: _*)
lazy val logging = OsgiProject(dir, "org.apache.commons.logging") settings
(libraryDependencies += "commons-logging" % "commons-logging" % "1.2", version := "1.2") settings(settings: _*)
lazy val lang3 = OsgiProject(dir, "org.apache.commons.lang3") settings (
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.4", version := "3.4") settings(settings: _*)
lazy val sshd = OsgiProject(dir, "org.apache.sshd", exports = Seq("org.apache.sshd.*", "org.apache.mina.*"), dynamicImports = Seq("*"), privatePackages = Seq("META-INF.*")) settings
(libraryDependencies += "org.apache.sshd" % "sshd-core" % "1.0.0", version := "1.0.0") settings(settings: _*)
lazy val ant = OsgiProject(dir, "org.apache.ant") settings
(libraryDependencies += "org.apache.ant" % "ant" % "1.8.0", version := "1.8.0") settings(settings: _*)
lazy val codec = OsgiProject(dir, "org.apache.commons.codec") settings
(libraryDependencies += "commons-codec" % "commons-codec" % "1.10", version := "1.10") settings(settings: _*)
lazy val collections = OsgiProject(dir, "org.apache.commons.collections", exports = Seq("org.apache.commons.collections4.*")) settings
(libraryDependencies += "org.apache.commons" % "commons-collections4" % "4.1", version := "4.1") settings(settings: _*)
lazy val jgit = OsgiProject(dir, "org.eclipse.jgit", privatePackages = Seq("!scala.*", "!org.slf4j.*", "*")) settings (
libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit.java7" % "3.7.1.201504261725-r", version := "3.7.1" ) settings(settings: _*)
lazy val txtmark = OsgiProject(dir, "com.github.rjeschke.txtmark", privatePackages = Seq("!scala.*", "!org.slf4j.*", "*")) settings (
libraryDependencies += "com.github.rjeschke" % "txtmark" % "0.13", version := "0.13" ) settings(settings: _*)
lazy val clapperVersion = "1.0.5"
lazy val clapper = OsgiProject(dir, "org.clapper", exports = Seq("!scala.*","!grizzled.*","!jline.*","!org.fusesource.*","!org.slf4j.*","*")) settings (
libraryDependencies += "org.clapper" % "classutil_2.11" % clapperVersion, version := clapperVersion) settings(settings: _*)
val monocleVersion = "1.2.0"
lazy val monocle = OsgiProject(dir, "monocle", privatePackages = Seq("!scala.*", "!scalaz.*", "*")) settings(
libraryDependencies += "com.github.julien-truffaut" %% "monocle-core" % monocleVersion,
libraryDependencies += "com.github.julien-truffaut" %% "monocle-generic" % monocleVersion,
libraryDependencies += "com.github.julien-truffaut" %% "monocle-macro" % monocleVersion,
version := monocleVersion
) dependsOn(scalaz) settings(settings: _*)
val scalazVersion = "7.2.0"
lazy val scalaz = OsgiProject(dir, "scalaz", privatePackages = Seq("!scala.*", "*")) settings (
libraryDependencies ++= Seq(
"org.scalaz" %% "scalaz-core" % scalazVersion,
"org.scalaz" %% "scalaz-effect" % scalazVersion
),
version := scalazVersion) settings(settings: _*)
val asmVersion = "5.1"
lazy val asm = OsgiProject(dir, "org.objectweb.asm") settings (
libraryDependencies += "org.ow2.asm" % "asm" % asmVersion,