Declarative Services Annotations Support

Add this URL to your Eclipse Installation to reach this solution's update site.

Mars (4.5)
Luna (4.4)
Kepler (4.3)

Learn more...

Details Group Tabs


OSGi Declarative Services offer a powerful mechanism for developing complex, service-oriented applications. However, Eclipse PDE tooling to support this functionality has been lacking.

This project delivers an Eclipse plugin with the ability to automatically generate and update DS Component Definition files from appropriately annotated source code. It does this without adding any custom builders to your project. In addition to generating/updating the descriptor files it also maintains the bundle's MANIFEST.MF and file.


A public p2 repository with this feature is available at


The functionality is enabled by default. To disable and/or change the default descriptor folder, go to Preferences -> DS Annotations.

Individual projects may override these settings in the project's Properties -> DS Annotations property page.


In a PDE Plug-in project, simply annotate your component implementation classes with @Component and related annotations; the DS Annotations Support plug-in will do the rest*.

Note that the descriptor files generated from source annotations are overwritten on every source change; however, manually created descriptor files (i.e., those that are not generated from annotated classes) are left unchanged. Thus it is possible to combine automated generation with manually created and maintained descriptors.

* By default the plug-in makes DS Annotation types available to all PDE Plug-in projects in the workspace. However, you must make sure they are also added to your project's "permanent" build path used by external builders outside of the workbench. There are several ways to accomplish that. E.g.,

A. Additional bundle: Add bundle ca.ecliptical.pde.ds.lib under Automated Management of Dependencies in your Plug-in Manifest Editor's Dependencies tab.

B. Extra library: Add the following line to your Plug-in project's file:

extra.. = platform:/plugin/ca.ecliptical.pde.ds.lib/annotations.jar
jars.extra.classpath = platform:/plugin/ca.ecliptical.pde.ds.lib/annotations.jar

See PDE documentation for more details.

C. Import package: In your Plug-in Manifest Editor's Dependencies tab import package org.osgi.service.component.annotations and mark it as optional. This is the least preferred option as it unnecessarily modifies your bundle's runtime classpath (in META-INF/MANIFEST.MF).


This software is made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at

Additional Details
Eclipse Versions: 
Mars (4.5), Luna (4.4), Kepler (4.3)
Platform Support: 
Windows, Mac, Linux/GTK
Organization Name: 
Date Created: 
Tue, 2013-07-16 21:47
Development Status: 
Date Updated: 
Fri, 2016-02-26 04:19
December 2018868/8921 (0%)12
November 2018820/9394 (0%)16
October 2018761/9437 (0%)17
September 2018928/9411 (0%)13
August 2018833/9393 (0%)12
July 2018918/9401 (0%)11
June 2018847/9473 (0%)18
May 2018858/9543 (0%)14
April 2018808/9465 (0%)7
March 2018769/9616 (0%)6
February 2018845/9403 (0%)12
January 2018731/9457 (0%)13
View Data for all Listings

Unsuccessful Installs in the last 7 Days: 0

Download last 500 errors (CSV)
External Install Button

Marketplace Drag to Install button

By adding the following code below to your website you will be able to add an install button for Declarative Services Annotations Support.

HTML Code:

Markdown Syntax:

Output: Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client
Wednesday, December 12, 2018 - 13:00
smaffeis32o's picture


I've installed the plugin into Eclipse 4.6.3. In my plug-in project I cannot find the library holding the @Component annotation. Do I need to download it separately?


dfauth's picture


you don't need to install this plugin in 4.6.3. It is already part of Eclipse Neon. You only need to enable it via Preferences. The usage is explained in my Getting Started with OSGi Declarative Services tutorial at the vogella blog.

In the end you need to add the necessary package as optional Import-Package statement.


dfauth's picture

I tried to use the Declarative Services Annotations Support 1.2.8 (latest) in Neon M5. But it doesn't resolve due to a missing dependency to org.eclipse.pde.ds.core [1.0.300, 1.1.0). Are there any activities to update this plugin or will it be included in Neon shortly?

pnehrer's picture

Dirk, the functionality implemented by this plugin has been added directly to Eclipse PDE as of Neon M6 (to be released shortly). See

shusler's picture


first of all, thanks for this useful plugin, we used it a lot in the past. Recently, we tried to build a new Eclipse Development environment based on Mars and were "forced" to upgrade to the new 1.2.5 version. Now, all service @Reference annotations deliver compile errors, as we did not define specific unbind methods.

I am curious why this behaviour has been changed?


pnehrer's picture


this behavior was added to notify the user that a corresponding unbind method wasn't found for their reference using the default algorithm, which is typically the use-case. This clearly breaks another use-case -- where the unbind method is intentionally omitted.

I have since published an update (v1.2.6) that addresses this through a new preference -- you can suppress this particular validation on your project or the entire workspace.