As we discussed during the wonderful Liferay event a few hints at what we could do with bndtools to make the life of m2e users better.
The bndrun files work very well based on the BndPomRepository. However, the missing piece is debugging with an M2E build. In Bndtools we have automatic updates during debugging but that does not happen in M2E.
In the Sling plugin, they hook into the build cycle and automatically load any bundles in the target framework.
I think we need a similar hook into the m2e build cycle. Slight complication is that m2e does not build a JAR, only the target/classes directory. In the bnd maven plugin we do not create the JAR but I guess we can assume this directory holds a faithful copy.
To make this as effective as possible I think we need to create a m2e workspace repository that is active in a bndrun file when it runs inside Eclipse/M2E.
So when we run a standalone bndrun inside Eclipse we need to inject an extra m2e repository. This m2e repository should listen to the workspace changes and use the repository API to inform bnd of changes. It should also jar the target/classes directory when there are changes.
Hmm, that should be all I think?
Ideas?
Kind regards,
Peter Kriens
On 15 Dec 2016, at 19:24, Greg Amerson <gregory...@liferay.com> wrote:
Hey everyone,So this work now has landed here. Thanks to BJ for all the review help.This support is now available as a separate installable feature called "Bndtools m2e". So naturally this requires m2e installed which is available by default from both Java and JavaEE distros of eclipse. Or you can install m2e here if you are running another distro.Here is the Bndtools Dev build url if you want to give it a try. There is nothing you need to do to get this working other than import your Maven projects as usual that have 'bnd-maven-plugin' configured in the pom to execute in default lifecycle (the default setup). If you already have the projects imported into eclipse, m2e should detect the new mapping after you restart Eclipse.To confirm if it is properly configured (if you are trying this out) you can right click your maven project in Eclipse and go to "Properties > Maven > Lifecycle Mapping" and you should see that the 'bnd-process' goal is mapped to "extension/configurator". Then you know this new integration is active.
<Screen Shot 2016-12-15 at 1.14.18 PM.png>
The upshot of this integration is that during normal Eclipse incremental builder the actual real jars are getting built just like with Bnd workspaces. So when you run your Bnd launches, any updates to your bundles get updated automatically in the running framework, just like you have come to expect.If anyone is interested in a similar integration with maven-bundle-plugin let me know, as maven projects that use that plugin wont see this same behavior. This integration is specifically tied to bnd-maven-plugin.
On Fri, Dec 9, 2016 at 12:52 AM, Greg Amerson <gregory...@liferay.com> wrote:First cut at this is done here: https://github.com/bndtools/bndtools/pull/1605If we all agree this is the right direction I can finish up this implementation (feature work, add tests, etc)--On Thu, Nov 17, 2016 at 9:21 AM, Peter Kriens <pkr...@gmail.com> wrote:As we discussed during the wonderful Liferay event a few hints at what we could do with bndtools to make the life of m2e users better.
The bndrun files work very well based on the BndPomRepository. However, the missing piece is debugging with an M2E build. In Bndtools we have automatic updates during debugging but that does not happen in M2E.
In the Sling plugin, they hook into the build cycle and automatically load any bundles in the target framework.
I think we need a similar hook into the m2e build cycle. Slight complication is that m2e does not build a JAR, only the target/classes directory. In the bnd maven plugin we do not create the JAR but I guess we can assume this directory holds a faithful copy.
To make this as effective as possible I think we need to create a m2e workspace repository that is active in a bndrun file when it runs inside Eclipse/M2E.
So when we run a standalone bndrun inside Eclipse we need to inject an extra m2e repository. This m2e repository should listen to the workspace changes and use the repository API to inform bnd of changes. It should also jar the target/classes directory when there are changes.
Hmm, that should be all I think?
Ideas?
Kind regards,
Peter Kriens--
--
You received this message because you are subscribed to the Google Groups "bndtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The upshot of this integration is that during normal Eclipse incremental builder the actual real jars are getting built just like with Bnd workspaces. So when you run your Bnd launches, any updates to your bundles get updated automatically in the running framework, just like you have come to expect.
Hi Greg,This all sounds really awesome! I do have a question though…The upshot of this integration is that during normal Eclipse incremental builder the actual real jars are getting built just like with Bnd workspaces. So when you run your Bnd launches, any updates to your bundles get updated automatically in the running framework, just like you have come to expect.What exactly do I need to do to get this behaviour? Do I need to set up my bndrun in a particular way? Will it work with the indexer plugin?Regards,Tim
On 15 Dec 2016, at 19:51, Neil Bartlett <njbar...@gmail.com> wrote:
This is excellent work, thank you Greg (and BJ).Neil
On 15 Dec 2016, at 19:24, Greg Amerson <gregory...@liferay.com> wrote:
Hey everyone,So this work now has landed here. Thanks to BJ for all the review help.This support is now available as a separate installable feature called "Bndtools m2e". So naturally this requires m2e installed which is available by default from both Java and JavaEE distros of eclipse. Or you can install m2e here if you are running another distro.Here is the Bndtools Dev build url if you want to give it a try. There is nothing you need to do to get this working other than import your Maven projects as usual that have 'bnd-maven-plugin' configured in the pom to execute in default lifecycle (the default setup). If you already have the projects imported into eclipse, m2e should detect the new mapping after you restart Eclipse.To confirm if it is properly configured (if you are trying this out) you can right click your maven project in Eclipse and go to "Properties > Maven > Lifecycle Mapping" and you should see that the 'bnd-process' goal is mapped to "extension/configurator". Then you know this new integration is active.<Screen Shot 2016-12-15 at 1.14.18 PM.png>The upshot of this integration is that during normal Eclipse incremental builder the actual real jars are getting built just like with Bnd workspaces. So when you run your Bnd launches, any updates to your bundles get updated automatically in the running framework, just like you have come to expect.If anyone is interested in a similar integration with maven-bundle-plugin let me know, as maven projects that use that plugin wont see this same behavior. This integration is specifically tied to bnd-maven-plugin.
On Fri, Dec 9, 2016 at 12:52 AM, Greg Amerson <gregory.amerson@liferay.com> wrote:First cut at this is done here: https://github.com/bndtools/bndtools/pull/1605If we all agree this is the right direction I can finish up this implementation (feature work, add tests, etc)--On Thu, Nov 17, 2016 at 9:21 AM, Peter Kriens <pkr...@gmail.com> wrote:As we discussed during the wonderful Liferay event a few hints at what we could do with bndtools to make the life of m2e users better.
The bndrun files work very well based on the BndPomRepository. However, the missing piece is debugging with an M2E build. In Bndtools we have automatic updates during debugging but that does not happen in M2E.
In the Sling plugin, they hook into the build cycle and automatically load any bundles in the target framework.
I think we need a similar hook into the m2e build cycle. Slight complication is that m2e does not build a JAR, only the target/classes directory. In the bnd maven plugin we do not create the JAR but I guess we can assume this directory holds a faithful copy.
To make this as effective as possible I think we need to create a m2e workspace repository that is active in a bndrun file when it runs inside Eclipse/M2E.
So when we run a standalone bndrun inside Eclipse we need to inject an extra m2e repository. This m2e repository should listen to the workspace changes and use the repository API to inform bnd of changes. It should also jar the target/classes directory when there are changes.
Hmm, that should be all I think?
Ideas?
Kind regards,
Peter Kriens----
You received this message because you are subscribed to the Google Groups "bndtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-dev+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "bndtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-dev+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "bndtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-dev+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-dev...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-dev...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-dev...@googlegroups.com.