[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13768124#comment-13768124 ] Carsten Ziegeler commented on FELIX-4135: - Great! I guess we can now resolve this issue and create separate issues for all to come :) 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13766435#comment-13766435 ] Pierre De Rop commented on FELIX-4135: -- please ignore my previous message, I finally successfully bootstrapped the tutorial using CMS interface (work in progress). 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13764253#comment-13764253 ] Pierre De Rop commented on FELIX-4135: -- I would like to publish an (overdue) tutorial about the bnd plugin currently committed (we need some documentations before doing any release). Are you ok if I do this, or do you prefer me to just attach in this issue the proposed tutorial ? If you are ok, then I some questions regarding CMS site documentation: Basically, I'd like to add a link to a new apache-felix-scr-bndtools-use.mdtext file, in the current apache-felix-maven-scr-plugin.mdtext page (in the Where to go from here part): ## Where to go from here * [{{ refs.apache-felix-maven-scr-plugin-use.headers.excerpt }}]({{ refs.apache-felix-maven-scr-plugin-use.path }}) * [{{ refs.apache-felix-scr-ant-task-use.headers.excerpt }}]({{ refs.apache-felix-scr-ant-task-use.path }}) * [{{ refs.apache-felix-scr-bndtools-use.headers.excerpt }}]({{ refs.apache-felix-scr-bndtools-use.path }}) * [{{ refs.scr-annotations.headers.excerpt }}]({{ refs.scr-annotations.path }}) * [{{ refs.scr-javadoc-tags.headers.excerpt }}]({{ refs.scr-javadoc-tags.path }}) * [{{ refs.extending-scr-annotations.headers.excerpt }}]({{ refs.extending-scr-annotations.path }}) and I will then add my tutorial in the new apache-felix-maven-scr-plugin/apache-felix-scr-bndtools-use.mdtext file. Now, my question is: may I do this from the CMS GUI (I have installed the ASF CMS bookmarklet) ? or should I first manually commit the initial version just using svn, and then finalize the formatting using the CMS GUI ? If I update http://felix.apache.org/documentation/subprojects/apache-felix-maven-scr-plugin.html; using the CMS bookmarklet, and add the new link : * [{{ refs.apache-felix-scr-bndtools-use.headers.excerpt }}]({{ refs.apache-felix-scr-bndtools-use.path }}) then will CMS automatically create and commit the new apache-felix-scr-bndtools-use.mdtext in svn ? (I am under the impression that I should first bootstrap my tutorial manually, and then finish the formatting using CMS GUI, right ?) thanks. 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13749756#comment-13749756 ] Pierre De Rop commented on FELIX-4135: -- Hi Carsten, FWI, I'm starting to do some documentations, but while doing a tutorial, I came across an issue in bndtools. You can check https://github.com/bndtools/bndtools/issues/739, if you are interested. Moreover, it seems that we cant' currently use the plugin path general option in bndtools (I have to post another issue about this). So for now, we have to specify the path parameter in the -plugin directive like this: -plugin: org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin;path:=${build}/plugins/../org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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/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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13727710#comment-13727710 ] Carsten Ziegeler commented on FELIX-4135: - I finally could give this a spin and it works pretty nicely; So minor comments. - I'm wondering if we should return false from the analyzeJar method? - I think the ds annotations are already processed by bnd, so we don't need to process them within this plugin - the Service-Component header is overwritten, maybe we should append in order to play well with other plugins 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13711083#comment-13711083 ] Carsten Ziegeler commented on FELIX-4135: - I've added the project to the reactor pom and updated to the latest version of the generator 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13711127#comment-13711127 ] Pierre De Rop commented on FELIX-4135: -- ok, thanks. 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13700123#comment-13700123 ] Carsten Ziegeler commented on FELIX-4135: - Great work, Pierre - this looks good to me. We should add this to our svn. Is there any chance to get the value for destdir from bnd without having to specify this in the bnd file? I assume bnd already knows where the class files are. 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13700216#comment-13700216 ] Pierre De Rop commented on FELIX-4135: -- Thanks Carsten; Yes; the destdir parameter could be made optional, because by default bndtools generates classes in the bin directory (and I'm not sure if it's even possible to configure this directory from bndtools at all?). So it makes sense to configure destdir param to bin as the default value in the code, in order to avoid specifying it in the bnd configuration. But before doing it, may be you (or me ?) could first commit the attached bnd-scr-plugin.3.tgz, and then I will commit the modif for the destdir parameter in svn ? 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13700469#comment-13700469 ] Carsten Ziegeler commented on FELIX-4135: - Just go ahead and commit your implementation :) Yes, defaulting to bin makes sense. 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13694544#comment-13694544 ] Guillaume Sauthier commented on FELIX-4135: --- The maven-shade-plugin has a resource transformer for that use case (mergining META-INF/services/* resources): http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13694555#comment-13694555 ] Pierre De Rop commented on FELIX-4135: -- Many thanks Guillaume, that's what I was looking for. I will try it ! On Thu, Jun 27, 2013 at 9:24 AM, Guillaume Sauthier (JIRA) 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13694090#comment-13694090 ] Pierre De Rop commented on FELIX-4135: -- finally, I think I found why the scr annotations were not parsed by the scr bnd plugin: the problem comes from the META-INF/services/org.apache.felix.scrplugin.annotations.AnnotationProcessor in the org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar file, which contains this: org.apache.felix.scrplugin.ds.DSAnnotationProcessor So the other processors are missing (scr and sling processors), and if I manually add the other processors in the META-INF/services/org.apache.felix.scrplugin.annotations.AnnotationProcessor resource file, then all is working fine (scr annotations + DS annotations are properly handled in bndtools): org.apache.felix.scrplugin.ds.DSAnnotationProcessor org.apache.felix.scrplugin.processing.SCRAnnotationProcessor org.apache.felix.scrplugin.processing.SlingAnnotationProcessor The problem actually comes from the pom.xml of the attached scr bnd project, which is including the org.apache.felix.scr.annotations and the org.apache.felix.scr.ds-annotations artifacts in the target bndtools jar like this: includeArtifactIds ...,org.apache.felix.scr.annotations,org.apache.felix.scr.ds-annotations /includeArtifactIds So, the META-INF/services/org.apache.felix.scrplugin.annotations.AnnotationProcessor included from org.apache.felix.scr.ds-annotations artifact just overrides the one from org.apache.felix.scr.annotations. That's why the sling and scr processors are missing. I have to find a way to merge the META-INF/services/org.apache.felix.scrplugin.annotations.AnnotationProcessor resource file from org.apache.felix.scr.ds-annotations and org.apache.felix.scr.annotations artifacts into the the target bndtools jar (org.apache.felix.scr.bnd) ... 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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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
[jira] [Commented] (FELIX-4135) Bnd scrplugin contrib
[ https://issues.apache.org/jira/browse/FELIX-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13688985#comment-13688985 ] Pierre De Rop commented on FELIX-4135: -- FWI, I tested the attached patch with bndtools, but unfortunately it does not yet work correctly: I can plug the plugin in bndtools (it is correctly called), but when the scr generator scans my component, no descriptor is generated, and I then see the following log: No Service Component Descriptors found in project. it looks like the @Component scr annotations is not correctly parsed, maybe it's a classloader issue ... I will continue to investigate. I'm using the following bnd directive: -plugin org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin;destdir=bin;path:=../cnf/plugins/org.apache.felix.scr.bnd/org.apache.felix.scr.bnd-1.0.0-SNAPSHOT.jar Notice that I also had to include the osgi.compendium 4.3.0 in the bnd scrplugin jar. Will let you know about the progress. 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