From b74e4ddf53933f80d3d43d0741700cf17f32a9a7 Mon Sep 17 00:00:00 2001 From: Stefan Zeiger Date: Tue, 26 Apr 2016 14:10:33 +0200 Subject: Publish usable Scala distributions to Ivy repositories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - sbt requires a `default` configuration in the Scala distribution but doesn’t publish such a configuration to Ivy repositories by default. This is not a problem when publishing to a Maven repository because Maven doesn’t use the concept of configurations and Ivy creates a standard set (including `default`) when resolving artifacts from Maven repositories, but it prevents the use of any Scala distribution published with `publishLocal`. The underlying issue is that sbt requires `default` instead of `default(compile)`. We work around this limitation by publishing a dummy `default` configuration. - sbt has hardcoded dependencies on the `scala-library` artifact of type `jar`. In the tradition of `sbt-osgi` we used type `bundle` when publishing via Ivy but this makes the artifacts unusable from sbt. We now publish the OSGi bundles directly as type `jar` (which is compatible with how they appear in Ivy after resolving from a Maven repository). - We have to be more aggressive about not publishing certain subprojects, otherwise `ivy.xml` files could still be published even when using `publishArtifacts := false`. - `removePomDependencies` now also modifies `ivy.xml` in addition to the Maven POM so that bogus dependencies do not leak into the Ivy descriptors. Fixes https://github.com/scala/scala-dev/issues/130 --- project/Osgi.scala | 1 - 1 file changed, 1 deletion(-) (limited to 'project') diff --git a/project/Osgi.scala b/project/Osgi.scala index ed961d1c27..4456c94190 100644 --- a/project/Osgi.scala +++ b/project/Osgi.scala @@ -39,7 +39,6 @@ object Osgi { }, packagedArtifact in (Compile, packageBin) <<= (artifact in (Compile, packageBin), bundle).identityMap, // Also create OSGi source bundles: - artifact in (Compile, packageBin) ~= (_.copy(`type` = "bundle")), packageOptions in (Compile, packageSrc) += Package.ManifestAttributes( "Bundle-Name" -> (description.value + " Sources"), "Bundle-SymbolicName" -> (bundleSymbolicName.value + ".source"), -- cgit v1.2.3