felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Florian Brunner (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FELIX-4831) Simplify the declaration of capabilities
Date Tue, 17 Mar 2015 22:46:38 GMT
Florian Brunner created FELIX-4831:

             Summary: Simplify the declaration of capabilities
                 Key: FELIX-4831
                 URL: https://issues.apache.org/jira/browse/FELIX-4831
             Project: Felix
          Issue Type: Improvement
          Components: Maven Bundle Plugin
    Affects Versions: maven-bundle-plugin-2.5.3
            Reporter: Florian Brunner

Declaring capabilities is currently rather cryptic. It requires a specific syntax, which I
believe is hard to remember for non-OSGi experts.

E.g. to provide a CDI extension using PAX-CDI you would need something like this:
                            org.ops4j.pax.cdi.extension; extension=my-extension

To require the CDI extension you would need something like this:
                            osgi.extender; filter:="(osgi.extender=pax.cdi)", org.ops4j.pax.cdi.extension;

The proposed solutions consists of 3 parts:
 - a new property for the bundle goal of the Maven Bundle Plugin: instructionsFile 
  This property defines a properties file containing additional BND instruction to take into
consideration when executing the goal
- a annotation library, which provides annotations for declaring BND instructions
- a custom annotation processor, which generates the instructionsFile from the annotations

This approach would:
- guide the developer what to specify
- doesn't require the developer to know the exact syntax
- helps avoiding typos

This message was sent by Atlassian JIRA

View raw message