de.tototec.sbuild.addons.bnd

BndJar

class BndJar extends AnyRef

Create OSGi Bundles based on instructions processed by the Bundle Tools (bnd).

To easily configure and execute the BndJar addon in one go, see BndJar$#apply.

Example:

class SBuild(implicit _project: Project) {
// Your compile dependencies
val compileCp = ...

// The bndlib jar
val bndCp = "mvn:biz.aQute:bndlib:1.50.0"

// your bundle jar
val jar = "target/org.example.bundle-1.0.0.jar"

Target(jar) dependsOn "compile" ~ compileCp ~ bndCp ~ "scan:target/classes" exec { ctx: TargetContext =>
  addons.bnd.BndJar(
    bndClasspath = bndCp.files,
    classpath = compileCp.files ++ Seq(Path("target/classes")),
    destFile = ctx.targetFile.get,
    props = Map(
      "Bundle-SymbolicName" -> "org.example.bundle",
      "Bundle-Version" -> "1.0.0",
      "Import-Package" -> "*",
      "Export-Package" -> """org.example.bundle;version="${Bundle-Version}"""",
      "Include-Resource" -> "src/main/resources")
  )
}
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BndJar
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BndJar(bndClasspath: Seq[File] = null, classpath: Seq[File] = null, props: Map[String, String] = null, destFile: File = null)(implicit project: Project)

    Creates a new BndJar instance.

    Creates a new BndJar instance. All parameters can be omitted and set later.

    bndClasspath

    The Classpath which contains the bndlib and its dependencies. (E.g. bndlib.jar) If not specified, bndlib will be loaded from SBuilds classpath, in which case, you have to add it e.g. with

    @classpath("mvn:biz.aQute:bndlib:1.50.0")
    classpath

    The classpath where bnd will search classes. Depending on the instructions, those classes will be included in the resulting bundle JAR or used to infer a reasonable version constraint for the import statements.

    props

    Proerties containing the bnd instructions. For a complete reference of bnd instructions, refer the bnd project page at http://www.aqute.biz/Bnd/Bnd.

    destFile

    The resulting JAR file.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from BndJar to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (BndJar, B)

    Implicit information
    This member is added by an implicit conversion from BndJar to ArrowAssoc[BndJar] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. var bndClasspath: Seq[File]

    The Classpath which contains the bndlib and its dependencies.

    The Classpath which contains the bndlib and its dependencies. (E.g. bndlib.jar) If not specified, bndlib will be loaded from SBuilds classpath, in which case, you have to add it e.g. with

    @classpath("mvn:biz.aQute:bndlib:1.50.0")
  10. var classpath: Seq[File]

    The classpath where bnd will search classes.

    The classpath where bnd will search classes. Depending on the instructions, those classes will be included in the resulting bundle JAR or used to infer a reasonable version constraint for the import statements.

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. var destFile: File

    The resulting JAR file.

  13. def ensuring(cond: (BndJar) ⇒ Boolean, msg: ⇒ Any): BndJar

    Implicit information
    This member is added by an implicit conversion from BndJar to Ensuring[BndJar] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: (BndJar) ⇒ Boolean): BndJar

    Implicit information
    This member is added by an implicit conversion from BndJar to Ensuring[BndJar] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean, msg: ⇒ Any): BndJar

    Implicit information
    This member is added by an implicit conversion from BndJar to Ensuring[BndJar] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean): BndJar

    Implicit information
    This member is added by an implicit conversion from BndJar to Ensuring[BndJar] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  19. def execute: Unit

  20. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from BndJar to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. var props: Map[String, String]

    Proerties containing the bnd instructions.

    Proerties containing the bnd instructions. For a complete reference of bnd instructions, refer the bnd project page at http://www.aqute.biz/Bnd/Bnd.

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def [B](y: B): (BndJar, B)

    Implicit information
    This member is added by an implicit conversion from BndJar to ArrowAssoc[BndJar] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from BndJar to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (bndJar: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from BndJar to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (bndJar: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: BndJar

    Implicit information
    This member is added by an implicit conversion from BndJar to ArrowAssoc[BndJar] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (bndJar: ArrowAssoc[BndJar]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: BndJar

    Implicit information
    This member is added by an implicit conversion from BndJar to Ensuring[BndJar] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (bndJar: Ensuring[BndJar]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from BndJar to StringAdd

Inherited by implicit conversion any2stringfmt from BndJar to StringFormat

Inherited by implicit conversion any2ArrowAssoc from BndJar to ArrowAssoc[BndJar]

Inherited by implicit conversion any2Ensuring from BndJar to Ensuring[BndJar]

Ungrouped