felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre De Rop (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
Date Sat, 22 Jun 2013 10:22:20 GMT

    [ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13691092#comment-13691092
] 

Pierre De Rop commented on FELIX-4135:
--------------------------------------

I did some progress: Under bndtools, the SCRDescriptorBndPlugin is now able to correctly generate
descriptors for DS annotations (org.osgi.service.component.annotations.*), but still fails
when parsing Felix ScrPlugin annotations (org.apache.felix.scr.annotations.*).

With scr annotations, I'm still having "No Service Component Descriptors found in project."
log.

I'm attaching a second version of the bndtools plugin (bnd-scr-plugin.2.tgz), as well as a
bndtools test project with DS annotations (test.bndtools.scrplugin.tgz) which seems to work
!

WARNING: when you recompile the bnd plugin, you have to restart eclipse (it seems that bndtoolds
plugins can't be reloaded dynamically ??)

The bnd scrplugin has to be put in 'cnf/plugins/org.apache.felix.scr.bnd/org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar'

in the bndtools test project, the two following directives are used:

-buildpath: ${build}/plugins/org.apache.felix.scr.bnd/org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar;version=file,
\
        osgi.core, \
        osgi.cmpn
-plugin: org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin;loglevel=debug;generateAccessors=false;destdir=bin;path:=${build}/plugins/org.apache.felix.scr.bnd/org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar

I have slightly modified the BndLog class, in order to log into the bnd 'Reporter' object
as well as to /tmp/scrplugin-bnd.log; and the log level can now be specified in the -plugin
directive, using "log=debug" (valid values are "error", "warn", "info", or "debug"). Notice
that the log file in deleted after eclipse has exited.

Will continue next week to try to debug why the scrplugin annotations are not working ...


                
> 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.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

Mime
View raw message