diff --git a/akka-osgi/build.sbt b/akka-osgi/build.sbt index 1bf492dc19..d60f117175 100644 --- a/akka-osgi/build.sbt +++ b/akka-osgi/build.sbt @@ -1,7 +1,7 @@ -import akka.{ AkkaBuild, Dependencies, Formatting, OSGi } +import akka.{ AkkaBuild, Dependencies, Formatting, OSGi, Dist } AkkaBuild.defaultSettings -AkkaBuild.dontPublishSettings +Dist.includeInDist := false Formatting.formatSettings OSGi.osgi Dependencies.osgi diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index 8b4ea67bc8..15f5f44c6c 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -434,7 +434,8 @@ object AkkaBuild extends Build { val dontPublishSettings = Seq( publishSigned := (), publish := (), - publishArtifact in Compile := false + publishArtifact in Compile := false, + Dist.includeInDist := false ) val dontPublishDocsSettings = Seq( diff --git a/project/Dist.scala b/project/Dist.scala index eda8a8aee4..761a382e7f 100644 --- a/project/Dist.scala +++ b/project/Dist.scala @@ -24,8 +24,10 @@ object Dist { val distDocJars = TaskKey[Seq[File]]("dist-doc-jars") val distSources = TaskKey[DistSources]("dist-sources") val dist = TaskKey[File]("dist", "Create a zipped distribution of everything.") + val includeInDist = SettingKey[Boolean]("include-in-dist", "Include the artifact of this project in the standalone dist zip-file") lazy val settings: Seq[Setting[_]] = Seq( + includeInDist := true, distAllClasspaths <<= (thisProjectRef, buildStructure) flatMap aggregated(dependencyClasspath in Compile), distDependencies <<= distAllClasspaths map { _.flatten.map(_.data).filter(ClasspathUtilities.isArchive).distinct }, distLibJars <<= (thisProjectRef, buildStructure) flatMap aggregated(packageBin in Compile), @@ -49,7 +51,7 @@ object Dist { def aggregatedProjects(projectRef: ProjectRef, structure: BuildStructure, scope: Scope): Seq[ProjectRef] = { val aggregate = Project.getProject(projectRef, structure).toSeq.flatMap(_.aggregate) aggregate flatMap { ref => - if (!(publishArtifact in ref in scope get structure.data getOrElse false)) Nil + if (!(includeInDist in ref in scope get structure.data getOrElse false)) Nil else ref +: aggregatedProjects(ref, structure, scope) } }