tycho-ds:declarative-services

Full name:

org.eclipse.tycho:tycho-ds-plugin:4.0.3:declarative-services

Description:

This mojo generates OSGi Declarative Services component description XMLs based on OSGi DS annotations in the process-classes phase. The generated component description XMLs end up in project.build.outputDirectory below the given path. This mojo uses Bnd under the hood.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • The goal is thread-safe and supports parallel builds.
  • Binds by default to the lifecycle phase: process-classes.

Optional Parameters

Name Type Since Description
<classpath> boolean - Controls if the DS components annotations are made available on the compile-classpath, this means no explicit import is required.
Default value is: true.
User property is: tycho.ds.classpath.
<dsVersion> String - Controls the declarative services specification version to use as maximum. This mojo may generate component descriptions in a version lower than the given one in case the annotations don't require features from newer versions. Values need to be given in format V<major>_<minor> or <major>.<minor>.
Default value is: 1.3.
User property is: tycho.ds.version.
<enabled> boolean - Enables the processing of declarative services by Tycho, this could be overridden by project specific configuration. If set to true will enable DS it for all projects except for those that have explicitly disabled DS processing in their per-project configuration, if set to false will only process projects which have DS processing explicitly enabled in their per-project configuration.
Default value is: false.
User property is: tycho.ds.enabled.
<header> HeaderConfiguration - Configures how the "Service-Component" should be handled:
  • auto - the header is added if it is currently missing
  • keep - the header is kept as is an never modifies it
  • replace - the header is always replaced

Default value is: auto.
User property is: tycho.ds.header.
<path> String - The desired path where to place component definitions. If it is given as relative path it is relative to project.build.outputDirectory.
Default value is: OSGI-INF.
User property is: tycho.ds.path.
<skip> boolean - Skips the generation of any DS processing regardless of project configuration
Default value is: false.
User property is: tycho.ds.skip.

Parameter Details

<classpath>

Controls if the DS components annotations are made available on the compile-classpath, this means no explicit import is required.
  • Type: boolean
  • Required: No
  • User Property: tycho.ds.classpath
  • Default: true

<dsVersion>

Controls the declarative services specification version to use as maximum. This mojo may generate component descriptions in a version lower than the given one in case the annotations don't require features from newer versions. Values need to be given in format V<major>_<minor> or <major>.<minor>.
  • Type: java.lang.String
  • Required: No
  • User Property: tycho.ds.version
  • Default: 1.3

<enabled>

Enables the processing of declarative services by Tycho, this could be overridden by project specific configuration. If set to true will enable DS it for all projects except for those that have explicitly disabled DS processing in their per-project configuration, if set to false will only process projects which have DS processing explicitly enabled in their per-project configuration.
  • Type: boolean
  • Required: No
  • User Property: tycho.ds.enabled
  • Default: false

<header>

Configures how the "Service-Component" should be handled:
  • auto - the header is added if it is currently missing
  • keep - the header is kept as is an never modifies it
  • replace - the header is always replaced
  • Type: org.eclipse.tycho.ds.HeaderConfiguration
  • Required: No
  • User Property: tycho.ds.header
  • Default: auto

<path>

The desired path where to place component definitions. If it is given as relative path it is relative to project.build.outputDirectory.
  • Type: java.lang.String
  • Required: No
  • User Property: tycho.ds.path
  • Default: OSGI-INF

<skip>

Skips the generation of any DS processing regardless of project configuration
  • Type: boolean
  • Required: No
  • User Property: tycho.ds.skip
  • Default: false