Overview

sigil.properties is the common configuration file used in both the Eclipse and Ivy plugins. It is also used for the repository configuration (sigil-repos.properties).

It supports 4 types of property:

  • simple - e.g. name: foo or -activator: org.acme.Activator
  • list - e.g. -bundles: foo-api, foo-impl
  • map - e.g. -imports: org.foo; version=1.2, org.bar; version="[1.0, 1.1)"
  • sub-property - e.g. header;Bundle-Vendor: Acme or foo-api;-exports: org.foo

The sub-property type allows values to be set that are groups of properties. The key prefix before ';' identifies the sub-property name. All keys with the same prefix contribute to the sub-property value.

The -defaults mechanism allows projects to share common bundle headers and default package import versions.

Most values are passed to Bnd, so Bnd syntax can usually be used, for example: -resources: @lib, to embed a library.

Reference

Name

Type

Description

-bundles

list

Set bundles to create. Each bundle should be defined as sub-properties prefixed with the bundle name, unless only a single bundle is defined, when the prefix can be omitted.

-repositories

list

Set repositories to use. Each repository should be defined as sub-properties prefixed with the repository name.

-defaults

simple

Reads in specified defaults file. If prefixed with '-' then any error reading file is ignored. Default is -../sigil-defaults.properties

header;key

sub-property

Specify additional bundle headers.

package;key

sub-property

Specify default Import-Package versions. e.g. package;org.osgi.framework: 1.4

bundle;key

sub-property

Specify default Require-Bundle versions.

name

simple

Set Bundle-SymbolicName. Default is bundle id from -bundles.

version

simple

Set bundle version and default export version.

-activator

simple

Set bundle activator.

-contents

list

Add specified packages to bundle. Defaults from -sourcedirs, or if not set -exports.

-sourcedirs

list

Alternative way to specify bundle contents.

-resources

list

Specify additional resources to add to bundle. Supports BND use of {} to filter files and @name.jar to embed jar from classpath.

-exports

map

Set Export-Package bundle header. Export version defaults from bundle version.

-requires

map

Specify Require-Bundle dependencies.

-imports

map

Specify Import-Package dependencies. Sigil adds the resolve attribute:

  • resolve=compile Only use import to determine compile dependencies; do NOT add to bundle headers.
  • resolve=runtime Always add import to bundle headers (even if it appears unneeded). Do NOT generate compile dependency.

-fragment

map

Set Fragment-Host bundle header.

-libs

map

Add jars to bundle. Attributes:

  • kind=classpath also adds jar to Bundle-Classpath
  • kind=codebase sets Newton RMI-Codebase

option;name

sub-property

Specify Sigil options:

  • option;addMissingImports=true Let Bnd calculate imports (i.e. specify *) then update with Sigil versions. Default: true.
  • option;omitUnusedImports=true (implies addMissingImports=true) Avoids Bnd warnings when project contains multiple bundles which don't all use all imports. Default: true for projects with multiple bundles; otherwise false.
  • No labels