Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix infinite recursion with Compile packageBin #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions src/main/scala/com/typesafe/sbt/osgi/SbtOsgi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,25 @@ object SbtOsgi extends AutoPlugin {
def defaultOsgiSettings: Seq[Setting[_]] = {
import OsgiKeys._
Seq(
bundle := Osgi.bundleTask(
manifestHeaders.value,
additionalHeaders.value,
(dependencyClasspathAsJars in Compile).value.map(_.data) ++ (products in Compile).value,
(artifactPath in (Compile, packageBin)).value,
(resourceDirectories in Compile).value,
embeddedJars.value,
explodedJars.value,
failOnUndecidedPackage.value,
(sourceDirectories in Compile).value,
(packageOptions in (Compile, packageBin)).value,
packageWithJVMJar.value,
cacheStrategy.value,
streams.value),
Compile / sbt.Keys.packageBin := bundle.value,
bundle := {
// This is here to forcefully evaluate `Compile / packageBin` before doing any
// Osgi bundling to deal with any asynchronicity/ordering issues.
(Compile / sbt.Keys.packageBin).value
Osgi.bundleTask(
manifestHeaders.value,
additionalHeaders.value,
(dependencyClasspathAsJars in Compile).value.map(_.data) ++ (products in Compile).value,
(artifactPath in (Compile, packageBin)).value,
(resourceDirectories in Compile).value,
embeddedJars.value,
explodedJars.value,
failOnUndecidedPackage.value,
(sourceDirectories in Compile).value,
(packageOptions in (Compile, packageBin)).value,
packageWithJVMJar.value,
cacheStrategy.value,
streams.value)
},
manifestHeaders := OsgiManifestHeaders(
bundleActivator.value,
description.value,
Expand Down
Loading