OSGi DS generally work with m2e-tycho and "Eclipse Application" launch configurations but I don't know anything about maven-scr-plugin so can't tell if there is anything special about it.
-- Regards, Igor On 2013-07-16 2:12 AM, Philipp Marx wrote:
Thanks Igor and Alejandro, So adding the m2e-tycho plugin worked. If I add the profile as suggested to create the MANIFEST.MF in the root path, the launch config will show up as expected and up-to-date..... ...unfortunately in this case when launching I will receive errors for my DS-services (which are generated by the maven-scr-plugin) like: !ENTRY com.xyz.servlet.discovery 4 0 2013-07-16 00:07:41.520!MESSAGE Component descriptor entry 'OSGI-INF/com.xyz.servlet.discovery.impl.DiscoveryMessageBodyWriter.xml' not found The OSGI-INF is located in target/classes. I tried copying it to the next to the META-INF as well, but this give me just other creepy errors (something like: The path com.xyz.servlet.discovery was not found but was in target/classes/com.xyz.servlet.discovery). Anyhow you already helped me a lot. Thanks to everyone :) Cheers Philipp Message: 1 Date: Mon, 15 Jul 2013 11:39:34 -0400 From: alejandro.e...@miranda.com <mailto:alejandro.e...@miranda.com> To: Maven Integration for Eclipse users mailing list <m2e-users@eclipse.org <mailto:m2e-users@eclipse.org>> Subject: Re: [m2e-users] Problem with M2E and OSGi runtime launch config Message-ID: <off85cacd2.9ca243c1-on85257ba9.0054958a-85257ba9.00560...@beldencdt.com> Content-Type: text/plain; charset=US-ASCII It does work with OSGi Framework launchers. We use them every day. Two tricks are 1) Install the Tycho Configurator 2) configure the MBP to put the manifest in the place PDE expects it and the plugin.xml if you use extension points This is the profile I created to configure everything for PDE <profiles> <profile> <id>in-eclipse</id> <!-- activated only when running in m2e (eclipse) --> <activation> <property> <name>m2e.version</name> </property> </activation> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</ artifactId> <configuration> <manifestLocation>META-INF</ manifestLocation> <!-- PDE expects it in the root of the project --> </configuration> </plugin> </plugins> <resources> <resource> <!-- pde (project root) --> <directory>src/main/resources</ directory> <targetPath>${basedir}</targetPath> <includes> <include>plugin.xml</include> </includes> </resource> <resource> <!-- normal (output dir , /target/classes) --> <directory>src/main/resources</ directory> <targetPath>$ {project.build.outputDirectory}</targetPath> </resource> </resources> </build> </profile> </profiles> Alejandro Endo | Software Designer/Concepteur de logiciels From: Igor Fedorenko <i...@ifedorenko.com <mailto:i...@ifedorenko.com>> To: m2e-users@eclipse.org <mailto:m2e-users@eclipse.org>, Date: 2013-07-14 09:00 AM Subject: Re: [m2e-users] Problem with M2E and OSGi runtime launch config Sent by: m2e-users-boun...@eclipse.org <mailto:m2e-users-boun...@eclipse.org> For projects that use maven-bundle-plugin (m-b-p for short), m2e-tycho, despite the name, will execute m-b-p to generate bundle manifest as part of eclipse workspace build. It will also make projects using m-b-p visible to PDE tools, launch configuration in particular, so you can add these projects to the list of bundles enabled in the launch configuration. I only use this with "Eclipse Application" and "JUnit Plug-in Test" and do not know if it works with "OSGi Framework" launch configurations. Theoretically, you should not need to change anything in your pom.xml files, but due to some PDE bugs I did not care to debug you have to change location of generated bundle manifest to META-INF/manifest.mf. I usually do this in pom profile activated by m2e.version property, so regular command line build works as is. I also lock version qualifier '.qualifier' (or any constant string, really) in the same profile to avoid unnecessary workspace builds. -- Regards, Igor _______________________________________________ m2e-users mailing list m2e-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________ m2e-users mailing list m2e-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/m2e-users