[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13694818#comment-13694818 ]
Pierre De Rop commented on FELIX-4135: -------------------------------------- OK, I simply added a shade plugin, and now it's working fine ! (thanks Guillaume). So I'm attaching the fixed/final bnd scrplugin project (bnd-scr-plugin.3.tgz). Also attaching another sample test.bndtools.scrplugin.2.tgz project: it contains two components: one annotated with standard DS annotations (org.example.DictionaryClient) and another one annotated with the Apache Felix Scr annotations, including metatypes (see org.example.EnglishDictionary). To test: 1- Unfold the bnd-scr-plugin.3.tgz in felix-trunk/scrplugin/ directory, mvn clean install. 2- Compile and import the latest bndtools project into Eclipse (http://bndtools.org/development.html) 3- Copy Or make a symlink to org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar in the bndtools "cnf/plugins/org.apache.felix.scr.bnd" directory. 4- restart Eclipse 5- import the test.bndtools.scrplugin.2.tgz project, and build it by clicking on the "bnd.bnd" file In that bnd.bnd file, you will find: Private-Package: org.example -buildpath: ${build}/plugins/org.apache.felix.scr.bnd/org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar;version=file -plugin: org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin;log=debug;destdir=bin;path:=${build}/plugins/org.apache.felix.scr.bnd/org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar Debug logs are generated in /tmp/scrplugin-bnd.log (the logfile is removed when Eclipse is exiting). 5- Finally, install and start generated/test.bndtools.scrplugin.jar in a Felix console 6- in webconsole "OSGi Configuration", click on the "EnglishDictionary" bundle, then select any log level and you will see the following in the felix shell output: g! START: {service.pid=org.example.EnglishDictionary, name.log.level=INFO, component.name=org.example.EnglishDictionary, component.id=1} word "hello" is correct ? -> true > 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.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/dev@felix.apache.org/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