Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] how to create pom-first source bundles?

Hi Simon,

you are right, currently to be able to use maven-source-plugin to create the source bundle for embedded jars in the main bundle it is need to copy and extract the sources. To do this I used maven-dependency-plugin, then maven-source-plugin could find them. There is a created issue for improve maven-source-plugin, though.

Your solution is good, but the drawback is that we need to create another project just for the sources.

thanks a lot for your help.



On 05/01/13 19:04, Simon Goodall wrote:
Hi Cristiano,

It might be possible to do something with the roots parameter in the manifest directive. Otherwise you would need to extract the sources from the jars into your main bundle. I've used the maven-bundle-plugin to do this specifically for a source bundle. Add the source maven deps as dependencies to your project (with sources classifier), then I've used the following snippet for the maven-bundle-plugin configuration.
<!-- This defines the bundle we provide the source for -->
<!-- Extract all sources into this bundle -->


On 5 January 2013 21:48, Cristiano Gavião <cvgaviao@xxxxxxxxx> wrote:
Hi Simon, thanks for sharing...

I'm consuming the pom-first bundles in a tycho build. I asked here with a hope that someone would have tried :)

I could create the source jar using the configuration you suggested, but it contains only the Activator class that I have added to the src/ of the bundle. Unfortunately, I couldn't find a way to include the sources from the embedded jars whose packages I'm exporting.

Do you know how could I achieve this?



On 05/01/13 17:23, Simon Goodall wrote:
Hi Cristiano,

Tycho won't help you in this case. Eclipse source bundles need some extra manifest entries - they are OSGi bundles in their own right and also need a reference to the binary bundle they are the source for. Try adding something similar to the snippet below to the configuration for the maven-source-plugin;

<!-- Generate required manifest headers to create a consumable source bundle in eclipse -->

Here Bundle-SymblicName is the symbolic name of your binary bundle and Bundle-QualifiedVersion is the full OSGi version number including qualifier (if present).



On 5 January 2013 18:46, Cristiano Gavião <cvgaviao@xxxxxxxxx> wrote:

I'm using maven-bundle-plugin to create a pom-first bundle that wraps some non-osgi jars.

To be able to use it in eclipse debug I need to create a source bundle that includes the non-osgi source code. 

I have tried to use maven-source-plugin but its not working properly because it can't find any source...

could someone point me the way to achieve this ?

any tip is welcome...

thanks, Cristiano

tycho-user mailing list

tycho-user mailing list

Back to the top