[
https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13735924#comment-13735924
]
Pierre De Rop commented on FELIX-4135:
--------------------------------------
Hi Carsten;
> - I'm wondering if we should return "false" from the analyzeJar method?
I do agree (thanks for pointing out this). This method should return false
because the plugin does not modify the classpace.
I've committed a fix for this in rev 1512721.
> I think the ds annotations are already processed by bnd, so we don't need to
> process them within this plugin
Indeed, if the "-dsannotations: *" directive is specified in the bnd
configuration, then DS annotations are parsed by bnd itself.
I also fixed the pom.xml in rev 1512721. in order to remove all references to
the "org.apache.felix.scr.ds-annotations" artifact, so it won't be used at all.
This means that if a bundle contains a mix of DS/SCR annotations, then the
"-dsannotation: *" directive has to be specified in the bnd config.
For example:
-plugin: org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin
-dsannotations: *
(if someone asks in the future to be able to choose between the bnd or
scrplugin DS annotations scanner, then in a later version, perhaps we will
consider to add a new property in the plugin in order to enable/disable the ds
scanner in the bnd scrplugin ?)
> the "Service-Component" header is overwritten, maybe we should append in
> order to play well with other plugins
Yes, I also fixed this in rev 1512721.
> Bnd scrplugin contrib
> ---------------------
>
> Key: FELIX-4135
> URL: https://issues.apache.org/jira/browse/FELIX-4135
> Project: Felix
> Issue Type: Improvement
> Components: Maven SCR Plugin
> Reporter: Pierre De Rop
> Priority: Minor
> Attachments: bnd-scr-plugin.2.tgz, bnd-scr-plugin.3.tgz,
> bnd-scr-plugin.tgz, test.bndtools.scrplugin.2.tgz, test.bndtools.scrplugin.tgz
>
>
> This issue is related to the following post, which is about writing a
> bndtools plugin for the Apache Felix Scrplugin annotations:
> http://www.mail-archive.com/[email protected]/msg29200.html
> If this may help, I have attached to this issue a simple BND plugin, which
> internally invokes the SCRDescriptorGenerator in order to generate the
> descriptors for Apache Felix Scr annotations, as well as DS 1.2 annotations
> (using the scrplugin generator).
> Basically, just adding the following parameter in a directives.bnd file
> allows to invoke the plugin:
> -plugin
> org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin;destdir=target/classes
> I did some tests using a BND Ant task, and it seems to work, and will try to
> do a test with bndtools this week (for now I don't know how to add a plugin
> in bndtools, but I guess it's easy).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira