felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konrad Windszus <konra...@gmx.de>
Subject Re: How do the maven-scr-plugin and maven-bundle-plugin cooperate?
Date Fri, 04 Dec 2015 18:29:58 GMT
I would rather rewrite the maven-bundle-plugin mojo to correctly use the BuildContext as being
recommended in https://wiki.eclipse.org/M2E_compatible_maven_plugins#BuildContext.
The bnd-maven-plugin did it in a similar fashion (https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BndMavenPlugin.java)
and relies for m2e just on the lifecycle-mapping-metadata in addition to the regular mojo

> Am 04.12.2015 um 19:02 schrieb Konrad Windszus <konrad_w@gmx.de>:
> Hi Robert,
> is this really worth the effort?
> I guess we should now focus only on the maven-bundle-plugin as that can even parse scr-compatible
annotations now (compare with http://www.mail-archive.com/dev@felix.apache.org/msg38291.html).
> That way we don’t need to further examine the communications across different plugins,
but just fix m2eclipse-tycho to generate the manifest and the service descriptors whenever
some class has been added/removed or just add the m2e extension to the maven-bundle-plugin
itself (you suggested that already in http://www.mail-archive.com/dev@felix.apache.org/msg38332.html).
> Is there any reason why you want m2eclipse-tycho to communicate with maven-scr-plugin
instead of just relying on the internal bnd feature?
> Konrad
>> Am 04.12.2015 um 16:19 schrieb Robert Munteanu <rombert@apache.org>:
>> Hi,
>> I'm looking at the Eclipse integration netweem the maven-bundle-plugin
>> and the maven-scr-plugin. For the bundle plugin this is handled by
>> m2eclipse-tycho [1], while for the scr plugin this is done by the
>> plugin itself, by using a special set of APIs which work in both
>> Eclipse and the CLI.
>> Unfortunately, more recent versions of m2eclipse-tycho are more
>> conservative about regenerating the bundle manifest [2], which means
>> that unless a full build is triggered the manifest does not include
>> changes to the Service-Component header.
>> I am trying to fix this (somehow), but I did not find the way the two
>> plugins cooperate. I see that the scr plugin sets certain project
>> properties related to the Service-Component header [3], but I have no
>> idea where the bundle plugin reads those.
>> If anyone has an idea about how the plugins cooperate, or of any
>> approach which can fix the Eclipse integration, please let me know.
>> Thanks,
>> Robert
>> [1]: https://github.com/tesla/m2eclipse-tycho
>> [2]: https://github.com/tesla/m2eclipse-tycho/commit/85cd048ffcd4702099
>> 2bdec2cd44f1a4945173bf
>> [3]: https://github.com/apache/felix/blob/f6c2e7f15e825521f2a9f778a8ab6
>> e0cacc208d5/tools/maven-scr-
>> plugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.
>> java#L461-L465

View raw message