From 2803d0ad50e94a3a88d98d709b7a38a5bbb6a383 Mon Sep 17 00:00:00 2001 From: Stefan Zeiger Date: Fri, 13 Nov 2015 14:00:50 +0100 Subject: [nomerge] Create a full Scala distribution from sbt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replicates the results of `ant -Dlocker.skip=1 distpack` with the following differences: - The POM files produced by the ant build under dists/maven still contain unresolved variables like `@VERSION@`. The ant build resolves them in the actual publishing process. The sbt build generates the correct version numbers directly. - Scaladoc sets in the ant build are created with the scaladoc tool from “quick”. The sbt build uses the STARR scaladoc. - The scaladoc sets for scala-actors, scala-compiler, scala-reflect and scalap from the ant build contain documentation for the classes `Null`, `Nothing`, `Any` and `AnyRef`. The sbt build omits those classes from all doc sets (except for scala-library, of course) under the assumption that this is a bug in the ant build. Other idiosyncracies of the ant build like declaring a packaging type of `jar` (instead of `bundle`) for OSGi bundles, or using slightly different module names and descriptions in scaladocs, OSGi bundles and POMs, are reproduced faithfully for now. Publishing from the sbt build is done in the usual sbt way. No actual publishing targets are currently defined in the build. In order to test stability of the publishing process, the `publishDists` task can be used to publish to dists/maven-sbt with the same directory layout and naming conventions employed by the ant build for publishing to dists/maven. Source and binary JARs are OSGi-enabled. For the source JARs this is done by hand-crafting the appropriate MANIFEST.MF entries (like the ant build does). Binary JARs are packaged with BND, using the same outdated BND version as the ant build for now to get identical results. We do not use sbt-osgi because it depends on a newer version of BND (probably OK to upgrade in the future) and does not allow a crucial bit of configuration that we need: Setting the classpath for BND. In sbt-osgi this is always `fullClasspath in Compile` whereas we really want `products in Compile in packageBin` to keep things simple. --- project/plugins.sbt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'project/plugins.sbt') diff --git a/project/plugins.sbt b/project/plugins.sbt index 862887d57f..c21824baf9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,5 @@ libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.3.2" libraryDependencies += "org.pantsbuild" % "jarjar" % "1.6.0" + +libraryDependencies += "biz.aQute" % "bndlib" % "1.50.0" -- cgit v1.2.3