Skip to content

Commit

Permalink
Fix stray com.typesafe.sbt org references
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Jan 26, 2024
1 parent a0284b6 commit 7bad671
Show file tree
Hide file tree
Showing 20 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ sbt-osgi can be configured with the following settings:
Example `build.sbt`:

```
organization := "com.typesafe.sbt"
organization := "com.github.sbt"
name := "osgi.demo"
Expand Down
10 changes: 5 additions & 5 deletions src/sbt-test/sbt-osgi/test-00-defaults/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test00 = (project in file("")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand All @@ -18,8 +18,8 @@ TaskKey[Unit]("verifyBundleActivator") := {

TaskKey[Unit]("verifyBundleSymbolicName") := {
val name = OsgiKeys.bundleSymbolicName.value
if (name != "com.typesafe.sbt.osgi.test")
sys.error("Expected bundle-symbolic-name to be %s, but was %s!".format("com.typesafe.sbt.osgi.test", name))
if (name != "com.github.sbt.osgi.test")
sys.error("Expected bundle-symbolic-name to be %s, but was %s!".format("com.github.sbt.osgi.test", name))
}

TaskKey[Unit]("verifyBundleRequiredExecutionEnvironment") := {
Expand Down Expand Up @@ -60,8 +60,8 @@ TaskKey[Unit]("verifyFragmentHost") := {

TaskKey[Unit]("verifyPrivatePackage") := {
val pkg = OsgiKeys.privatePackage.value
if (pkg != Seq("com.typesafe.sbt.osgi.test.*"))
sys.error("Expected private-package to be %s, but was %s!".format(Seq("com.typesafe.sbt.osgi.test.*"), pkg))
if (pkg != Seq("com.github.sbt.osgi.test.*"))
sys.error("Expected private-package to be %s, but was %s!".format(Seq("com.github.sbt.osgi.test.*"), pkg))
}

TaskKey[Unit]("verifyRequireBundle") := {
Expand Down
26 changes: 13 additions & 13 deletions src/sbt-test/sbt-osgi/test-01-contents/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test01 = (project in file(".")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand All @@ -10,11 +10,11 @@ libraryDependencies += "org.osgi" % "org.osgi.core" % "4.3.0" % "provided"

osgiSettings

OsgiKeys.bundleActivator := Some("com.typesafe.sbt.osgi.test.internal.Activator")
OsgiKeys.bundleActivator := Some("com.github.sbt.osgi.test.internal.Activator")

OsgiKeys.dynamicImportPackage := Seq("scala.*")

OsgiKeys.exportPackage := Seq("com.typesafe.sbt.osgi.test")
OsgiKeys.exportPackage := Seq("com.github.sbt.osgi.test")

OsgiKeys.bundleRequiredExecutionEnvironment := Seq("JavaSE-1.7", "JavaSE-1.8")

Expand All @@ -35,8 +35,8 @@ TaskKey[Unit]("verifyBundle") := {
val lines = Source.fromInputStream(manifestIn).getLines().toList
val allLines = lines mkString newLine
val butWas = newLine + "But was:" + newLine + allLines
if (!(lines contains "Bundle-Activator: com.typesafe.sbt.osgi.test.internal.Activator"))
sys.error("Expected 'Bundle-Activator: com.typesafe.sbt.osgi.test.internal.Activator' in manifest!" + butWas)
if (!(lines contains "Bundle-Activator: com.github.sbt.osgi.test.internal.Activator"))
sys.error("Expected 'Bundle-Activator: com.github.sbt.osgi.test.internal.Activator' in manifest!" + butWas)
if (!(lines contains "Bundle-Description: sbt-osgi-test"))
sys.error("Expected 'Bundle-Description: sbt-osgi-test' in manifest!" + butWas)
if (!(lines contains "Bundle-DocURL: http://typesafe.com"))
Expand All @@ -47,20 +47,20 @@ TaskKey[Unit]("verifyBundle") := {
sys.error("Expected 'Bundle-Name: sbt-osgi-test' in manifest!" + butWas)
if (!(lines contains "Bundle-RequiredExecutionEnvironment: JavaSE-1.7,JavaSE-1.8"))
sys.error("Expected 'Bundle-RequiredExecutionEnvironment: JavaSE-1.7,JavaSE-1.8' in manifest!" + butWas)
if (!(lines contains "Bundle-Vendor: com.typesafe.sbt"))
sys.error("Expected 'Bundle-Vendor: com.typesafe.sbt' in manifest!" + butWas)
if (!(lines contains "Bundle-SymbolicName: com.typesafe.sbt.osgi.test"))
sys.error("Expected 'Bundle-SymbolicName: com.typesafe.sbt.osgi.test' in manifest!" + butWas)
if (!(lines contains "Bundle-Vendor: com.github.sbt"))
sys.error("Expected 'Bundle-Vendor: com.github.sbt' in manifest!" + butWas)
if (!(lines contains "Bundle-SymbolicName: com.github.sbt.osgi.test"))
sys.error("Expected 'Bundle-SymbolicName: com.github.sbt.osgi.test' in manifest!" + butWas)
if (!(lines contains "Bundle-Version: 1.2.3"))
sys.error("Expected 'Bundle-Version: 1.2.3' in manifest!" + butWas)
if (!(lines contains "DynamicImport-Package: scala.*"))
sys.error("Expected 'DynamicImport-Package: scala.*' in manifest!" + butWas)
if (!(lines exists (_ containsSlice "Export-Package: com.typesafe.sbt.osgi.test")))
sys.error("Expected 'Export-Package: com.typesafe.sbt.osgi.test' in manifest!" + butWas)
if (!(lines exists (_ containsSlice "Export-Package: com.github.sbt.osgi.test")))
sys.error("Expected 'Export-Package: com.github.sbt.osgi.test' in manifest!" + butWas)
if (!(lines exists (l => (l containsSlice "org.osgi.framework") && (l containsSlice "Import-Package: "))))
sys.error("""Expected 'Import-Package: ' and 'org.osgi.framework' in manifest!""" + butWas)
if (!(lines contains "Private-Package: com.typesafe.sbt.osgi.test.internal"))
sys.error("Expected 'Private-Package: com.typesafe.sbt.osgi.test.internal' in manifest!" + butWas)
if (!(lines contains "Private-Package: com.github.sbt.osgi.test.internal"))
sys.error("Expected 'Private-Package: com.github.sbt.osgi.test.internal' in manifest!" + butWas)
} catch {
case e: IOException => sys.error("Expected to be able to read the manifest, but got exception!" + newLine + e)
} finally manifestIn.close()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.typesafe.sbt.osgi.test
package com.github.sbt.osgi.test

class Foo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.typesafe.sbt.osgi.test
package com.github.sbt.osgi.test
package internal

import org.osgi.framework._
Expand Down
6 changes: 3 additions & 3 deletions src/sbt-test/sbt-osgi/test-02-includeresource/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test02 = (project in file("")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand All @@ -10,11 +10,11 @@ libraryDependencies += "org.osgi" % "org.osgi.core" % "4.3.0" % "provided"

osgiSettings

OsgiKeys.bundleActivator := Some("com.typesafe.sbt.osgi.test.internal.Activator")
OsgiKeys.bundleActivator := Some("com.github.sbt.osgi.test.internal.Activator")

OsgiKeys.dynamicImportPackage := Seq("scala.*")

OsgiKeys.exportPackage := Seq("com.typesafe.sbt.osgi.test")
OsgiKeys.exportPackage := Seq("com.github.sbt.osgi.test")

TaskKey[Unit]("verifyBundle") := {
import java.io.IOException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.typesafe.sbt.osgi.test
package com.github.sbt.osgi.test

class Foo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.typesafe.sbt.osgi.test.internal
package com.github.sbt.osgi.test.internal

import org.osgi.framework._

Expand Down
8 changes: 4 additions & 4 deletions src/sbt-test/sbt-osgi/test-03-arbitraryHeaders/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test03 = (project in file("")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand All @@ -9,7 +9,7 @@ version := "1.2.3"
osgiSettings

OsgiKeys.additionalHeaders := Map(
"Main-Class" -> "com.typesafe.sbt.osgi.test.App"
"Main-Class" -> "com.github.sbt.osgi.test.App"
)

TaskKey[Unit]("verifyBundle") := {
Expand All @@ -25,8 +25,8 @@ TaskKey[Unit]("verifyBundle") := {
val lines = Source.fromInputStream(manifestIn).getLines().toList
val allLines = lines mkString newLine
val butWas = newLine + "But was:" + newLine + allLines
if (!(lines contains "Main-Class: com.typesafe.sbt.osgi.test.App"))
sys.error("Expected 'Main-Class: com.typesafe.sbt.osgi.test.App' in manifest!" + butWas)
if (!(lines contains "Main-Class: com.github.sbt.osgi.test.App"))
sys.error("Expected 'Main-Class: com.github.sbt.osgi.test.App' in manifest!" + butWas)
} catch {
case e: IOException => sys.error("Expected to be able to read the manifest, but got exception!" + newLine + e)
} finally manifestIn.close()
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-osgi/test-04-embeddedJars/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test04 = (project in file("")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-osgi/test-06-explodedJars/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test06 = (project in file("")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test01 = (project in file(".")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand All @@ -10,15 +10,15 @@ libraryDependencies += "org.osgi" % "org.osgi.core" % "4.3.0" % "provided"

osgiSettings

OsgiKeys.bundleActivator := Some("com.typesafe.sbt.osgi.test.internal.Activator")
OsgiKeys.bundleActivator := Some("com.github.sbt.osgi.test.internal.Activator")

OsgiKeys.dynamicImportPackage := Seq("scala.*")

// we set an explicit internal package
OsgiKeys.privatePackage := Seq("com.typesafe.sbt.osgi.internal")
OsgiKeys.privatePackage := Seq("com.github.sbt.osgi.internal")

// we set what to export one specific one
OsgiKeys.exportPackage := Seq("com.typesafe.sbt.osgi.test.exportme")
OsgiKeys.exportPackage := Seq("com.github.sbt.osgi.test.exportme")

// yet we "forget" on purpose to decide what to do about undecided!
// however we also enable the fail setting:
Expand All @@ -43,8 +43,8 @@ TaskKey[Unit]("verifyBundle") := {
val lines = Source.fromInputStream(manifestIn).getLines().toList
val allLines = lines mkString newLine
val butWas = newLine + "But was:" + newLine + allLines
if (!(lines contains "Bundle-Activator: com.typesafe.sbt.osgi.test.internal.Activator"))
sys.error("Expected 'Bundle-Activator: com.typesafe.sbt.osgi.test.internal.Activator' in manifest!" + butWas)
if (!(lines contains "Bundle-Activator: com.github.sbt.osgi.test.internal.Activator"))
sys.error("Expected 'Bundle-Activator: com.github.sbt.osgi.test.internal.Activator' in manifest!" + butWas)
if (!(lines contains "Bundle-Description: sbt-osgi-test"))
sys.error("Expected 'Bundle-Description: sbt-osgi-test' in manifest!" + butWas)
if (!(lines contains "Bundle-DocURL: http://typesafe.com"))
Expand All @@ -55,20 +55,20 @@ TaskKey[Unit]("verifyBundle") := {
sys.error("Expected 'Bundle-Name: sbt-osgi-test' in manifest!" + butWas)
if (!(lines contains "Bundle-RequiredExecutionEnvironment: JavaSE-1.7,JavaSE-1.8"))
sys.error("Expected 'Bundle-RequiredExecutionEnvironment: JavaSE-1.7,JavaSE-1.8' in manifest!" + butWas)
if (!(lines contains "Bundle-Vendor: com.typesafe.sbt"))
sys.error("Expected 'Bundle-Vendor: com.typesafe.sbt' in manifest!" + butWas)
if (!(lines contains "Bundle-SymbolicName: com.typesafe.sbt.osgi.test"))
sys.error("Expected 'Bundle-SymbolicName: com.typesafe.sbt.osgi.test' in manifest!" + butWas)
if (!(lines contains "Bundle-Vendor: com.github.sbt"))
sys.error("Expected 'Bundle-Vendor: com.github.sbt' in manifest!" + butWas)
if (!(lines contains "Bundle-SymbolicName: com.github.sbt.osgi.test"))
sys.error("Expected 'Bundle-SymbolicName: com.github.sbt.osgi.test' in manifest!" + butWas)
if (!(lines contains "Bundle-Version: 1.2.3"))
sys.error("Expected 'Bundle-Version: 1.2.3' in manifest!" + butWas)
if (!(lines contains "DynamicImport-Package: scala.*"))
sys.error("Expected 'DynamicImport-Package: scala.*' in manifest!" + butWas)
if (!(lines exists (_ containsSlice "Export-Package: com.typesafe.sbt.osgi.test")))
sys.error("Expected 'Export-Package: com.typesafe.sbt.osgi.test' in manifest!" + butWas)
if (!(lines exists (_ containsSlice "Export-Package: com.github.sbt.osgi.test")))
sys.error("Expected 'Export-Package: com.github.sbt.osgi.test' in manifest!" + butWas)
if (!(lines exists (l => (l containsSlice "org.osgi.framework") && (l containsSlice "Import-Package: "))))
sys.error("""Expected 'Import-Package: ' and 'org.osgi.framework' in manifest!""" + butWas)
if (!(lines contains "Private-Package: com.typesafe.sbt.osgi.test.internal"))
sys.error("Expected 'Private-Package: com.typesafe.sbt.osgi.test.internal' in manifest!" + butWas)
if (!(lines contains "Private-Package: com.github.sbt.osgi.test.internal"))
sys.error("Expected 'Private-Package: com.github.sbt.osgi.test.internal' in manifest!" + butWas)
} catch {
case e: IOException => sys.error("Expected to be able to read the manifest, but got exception!" + newLine + e)
} finally manifestIn.close()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.typesafe.sbt.osgi.test.exportme
package com.github.sbt.osgi.test.exportme

class Foo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.typesafe.sbt.osgi.test
package com.github.sbt.osgi.test
package internal

import org.osgi.framework._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.typesafe.sbt.osgi.test.undecided
package com.github.sbt.osgi.test.undecided

class Undecided
10 changes: 5 additions & 5 deletions src/sbt-test/sbt-osgi/test-08-packageWithJVMJar/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test08 = (project in file("")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand All @@ -20,8 +20,8 @@ TaskKey[Unit]("verifyBundleActivator") := {

TaskKey[Unit]("verifyBundleSymbolicName") := {
val name = OsgiKeys.bundleSymbolicName.value
if (name != "com.typesafe.sbt.osgi.test")
sys.error("Expected bundle-symbolic-name to be %s, but was %s!".format("com.typesafe.sbt.osgi.test", name))
if (name != "com.github.sbt.osgi.test")
sys.error("Expected bundle-symbolic-name to be %s, but was %s!".format("com.github.sbt.osgi.test", name))
}

TaskKey[Unit]("verifyBundleRequiredExecutionEnvironment") := {
Expand Down Expand Up @@ -62,8 +62,8 @@ TaskKey[Unit]("verifyFragmentHost") := {

TaskKey[Unit]("verifyPrivatePackage") := {
val pkg = OsgiKeys.privatePackage.value
if (pkg != Seq("com.typesafe.sbt.osgi.test.*"))
sys.error("Expected private-package to be %s, but was %s!".format(Seq("com.typesafe.sbt.osgi.test.*"), pkg))
if (pkg != Seq("com.github.sbt.osgi.test.*"))
sys.error("Expected private-package to be %s, but was %s!".format(Seq("com.github.sbt.osgi.test.*"), pkg))
}

TaskKey[Unit]("verifyRequireBundle") := {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
lazy val test01 = (project in file(".")).enablePlugins(SbtOsgi)

organization := "com.typesafe.sbt"
organization := "com.github.sbt"

name := "sbt-osgi-test"

Expand All @@ -10,11 +10,11 @@ libraryDependencies += "org.osgi" % "org.osgi.core" % "4.3.0" % "provided"

osgiSettings

OsgiKeys.bundleActivator := Some("com.typesafe.sbt.osgi.test.internal.Activator")
OsgiKeys.bundleActivator := Some("com.github.sbt.osgi.test.internal.Activator")

OsgiKeys.dynamicImportPackage := Seq("scala.*")

OsgiKeys.exportPackage := Seq("com.typesafe.sbt.osgi.test")
OsgiKeys.exportPackage := Seq("com.github.sbt.osgi.test")

OsgiKeys.bundleRequiredExecutionEnvironment := Seq("JavaSE-1.7", "JavaSE-1.8")

Expand Down Expand Up @@ -44,8 +44,8 @@ TaskKey[Unit]("verifyBundle") := {
if (!(lines contains moduleNameEntry))
sys.error(s"Expected '$moduleNameEntry' in manifest!" + butWas)

if (!(lines contains "Bundle-Activator: com.typesafe.sbt.osgi.test.internal.Activator"))
sys.error("Expected 'Bundle-Activator: com.typesafe.sbt.osgi.test.internal.Activator' in manifest!" + butWas)
if (!(lines contains "Bundle-Activator: com.github.sbt.osgi.test.internal.Activator"))
sys.error("Expected 'Bundle-Activator: com.github.sbt.osgi.test.internal.Activator' in manifest!" + butWas)
if (!(lines contains "Bundle-Description: sbt-osgi-test"))
sys.error("Expected 'Bundle-Description: sbt-osgi-test' in manifest!" + butWas)
if (!(lines contains "Bundle-DocURL: http://typesafe.com"))
Expand All @@ -56,20 +56,20 @@ TaskKey[Unit]("verifyBundle") := {
sys.error("Expected 'Bundle-Name: sbt-osgi-test' in manifest!" + butWas)
if (!(lines contains "Bundle-RequiredExecutionEnvironment: JavaSE-1.7,JavaSE-1.8"))
sys.error("Expected 'Bundle-RequiredExecutionEnvironment: JavaSE-1.7,JavaSE-1.8' in manifest!" + butWas)
if (!(lines contains "Bundle-Vendor: com.typesafe.sbt"))
sys.error("Expected 'Bundle-Vendor: com.typesafe.sbt' in manifest!" + butWas)
if (!(lines contains "Bundle-SymbolicName: com.typesafe.sbt.osgi.test"))
sys.error("Expected 'Bundle-SymbolicName: com.typesafe.sbt.osgi.test' in manifest!" + butWas)
if (!(lines contains "Bundle-Vendor: com.github.sbt"))
sys.error("Expected 'Bundle-Vendor: com.github.sbt' in manifest!" + butWas)
if (!(lines contains "Bundle-SymbolicName: com.github.sbt.osgi.test"))
sys.error("Expected 'Bundle-SymbolicName: com.github.sbt.osgi.test' in manifest!" + butWas)
if (!(lines contains "Bundle-Version: 1.2.3"))
sys.error("Expected 'Bundle-Version: 1.2.3' in manifest!" + butWas)
if (!(lines contains "DynamicImport-Package: scala.*"))
sys.error("Expected 'DynamicImport-Package: scala.*' in manifest!" + butWas)
if (!(lines exists (_ containsSlice "Export-Package: com.typesafe.sbt.osgi.test")))
sys.error("Expected 'Export-Package: com.typesafe.sbt.osgi.test' in manifest!" + butWas)
if (!(lines exists (_ containsSlice "Export-Package: com.github.sbt.osgi.test")))
sys.error("Expected 'Export-Package: com.github.sbt.osgi.test' in manifest!" + butWas)
if (!(lines exists (l => (l containsSlice "org.osgi.framework") && (l containsSlice "Import-Package: "))))
sys.error("""Expected 'Import-Package: ' and 'org.osgi.framework' in manifest!""" + butWas)
if (!(lines contains "Private-Package: com.typesafe.sbt.osgi.test.internal"))
sys.error("Expected 'Private-Package: com.typesafe.sbt.osgi.test.internal' in manifest!" + butWas)
if (!(lines contains "Private-Package: com.github.sbt.osgi.test.internal"))
sys.error("Expected 'Private-Package: com.github.sbt.osgi.test.internal' in manifest!" + butWas)
} catch {
case e: IOException => sys.error("Expected to be able to read the manifest, but got exception!" + newLine + e)
} finally manifestIn.close()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.typesafe.sbt.osgi.test
package com.github.sbt.osgi.test

class Foo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.typesafe.sbt.osgi.test
package com.github.sbt.osgi.test
package internal

import org.osgi.framework._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import com.typesafe.sbt.osgi.OsgiKeys

inThisBuild(
Seq(
organization := "com.typesafe.sbt",
organization := "com.github.sbt",
homepage := Some(url("https://github.com/woq-blended/blended")),
version := "1.2.3",
libraryDependencies += "org.osgi" % "org.osgi.core" % "4.3.0" % "provided",
Expand Down

0 comments on commit 7bad671

Please sign in to comment.