[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701299#comment-13701299 ]
Pierre De Rop commented on FELIX-4135: -------------------------------------- ok, I just committed the plugin, in revision 1500228. :) Some remarks about the commit: - So, as we discussed, the destdir parameter is not required anymore, and defaults to ${basedir}/bin/ - I tested with latest bndtools (dev version) and juno. - the logs are now generated in /tmp/scrplugin/ directory and the log file name is created using the bundle symbolic name of the bundle being compiled. (the log file is truncated each time a build is performed) - notice that when you recompile the bnd scrplugin, you then have to restart eclipse, in order to let it reload the plugin - To use the plugin: * put the org.apache.felix.scr.bnd-x.x.x-SNAPSHOT.jar in the cnf/plugins/org.apache.felix.scr.bnd/ bndtool directory (you can choose whatever directory name under the cnf/plugins/ dir). * in order to avoid specifying the "path:=" parameter in the "-plugin" option in the bnd config, you can just configure only one time the plugin path by clicking in the "cnf" eclipse project , then go to build.bnd, then click on the '+' in the plugin path section, and finally just add the path to the bnd scrplugin. This will generate the following in the cnf/build.bnd: -pluginpath: /home/pierre/workspace/FELIX/cnf/plugins/org.apache.felix.scr.bnd/org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar In this way, in your bndtools projects, you just only have to declare the -plugin and -buildpath (and not anymore the "path:=" option in -plugin parameter). For example: 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 Let me know if you have problems while testing all this. > 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/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