felix icon indicating copy to clipboard operation
felix copied to clipboard

FELIX-4009 maven bundle plugin should be integrated directly with eclipse

Open stefanseifert opened this issue 9 years ago • 4 comments

define m2e lifecycle mapping metadata, enable incremental build for manifest (and SCR metadata) generation - important for unit tests e.g. with sling/osgi-mock make sure all files that are written use file output streams created via BuildContext to make sure eclipse get notice of it

stefanseifert avatar Mar 11 '16 22:03 stefanseifert

In general this looks great, just some questions about that:

  1. How does the maven-bundle-plugin behave if m2eclipse-tycho (https://github.com/tesla/m2eclipse-tycho) is installed as well (which can also deal with bundle packagings)?
  2. For m2eclipse-tycho the incremental build was explicitly ignored for the manifest generation for performance issue (https://github.com/tesla/m2eclipse-tycho/commit/85cd048ffcd47020992bdec2cd44f1a4945173bf). Since bndlib cannot really deal with incremental updates the manifest generation is quite slow IMHO. Since your addition will require a manifest regeneration whenever any source file was touched I would fear that this really slows down Eclipse. Have you tested your change with bigger bundle projects?

kwin avatar Mar 12 '16 09:03 kwin

How does the maven-bundle-plugin behave if m2eclipse-tycho (https://github.com/tesla/m2eclipse-tycho) is installed as well (which can also deal with bundle packagings)?

no idea, never tried. is this in broad use? do you have experience with it?

Since bndlib cannot really deal with incremental updates the manifest generation is quite slow IMHO

good point - so far i've tested it only with small and mid-sized projects. will do some more testing on big projects.

some ideas to improve this:

  • in case of incremental build detect which files changed since last build and trigger manifest generation only if the changeset includes a file with SCR annotations.
  • make the incremental build support configurable in the pom - so each project can do the right choice between comfort and performance
  • ask the bndlib to add support for incremental SCR generation (no short term solution)

stefanseifert avatar Mar 12 '16 10:03 stefanseifert

How does the maven-bundle-plugin behave if m2eclipse-tycho (https://github.com/tesla/m2eclipse-tycho) is installed as well (which can also deal with bundle packagings)?

no idea, never tried. is this in broad use? do you have experience with it?

This plugin is automatically offered for installation by m2e through the catalog (https://github.com/takari/m2e-discovery-catalog) whenever some bundle project is imported (see https://github.com/takari/m2e-discovery-catalog/blob/master/org.eclipse.m2e.discovery.oss/src/main/resources-filtered/connectors.xml#L38). Therefore I assume a lot of people have installed it. I assume that with your m2e additions both the m2e connector as well as the bundle-plugins m2e lifecycle management will kick in. But I am not too sure about that either, therefore I asked the question on the m2e-users mailing list (http://dev.eclipse.org/mhonarc/lists/m2e-users/msg05444.html)

some ideas to improve this:

  • in case of incremental build detect which files changed since last build and trigger manifest generation only if the changeset includes a file with SCR annotations.
    

Actually the manifest will not only change in that case, but also if a new package has been added which does not have "impl" in its name (because it will be automatically exported). Another use case is that the version annotation on the package has been changed (this will be reflected in the export-package directive as well)

kwin avatar Mar 12 '16 11:03 kwin

in case of incremental build detect which files changed since last build and trigger manifest generation only if the changeset includes a file with SCR annotations.

You would need to handle the case where a file previously had SCR annotations but it no longer has them -> SCR descriptor needs to be deleted and the MANIFEST updated.

rombert avatar Mar 14 '16 06:03 rombert