Hi Guillaume,

I have found the solution. The source plugin can be configured to add headers to the manifest.
The following snippet will do the trick for camel:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<archive>
<manifestEntries>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}.source</Bundle-SymbolicName>
<Eclipse-SourceBundle>${project.groupId}.${project.artifactId};version="${project.version}"</Eclipse-SourceBundle>
</manifestEntries>
</archive>
</configuration>
</plugin>

The only problem is that the version for snapshots is wrong. But for realeases this works quite well.

Greetings

Christian


Am 19.05.2010 10:03, schrieb Guillaume Nodet:
Well, if I read correctly, the header has to be added on the source
bundle, not the bundle containing the classes.
Currently, source jars are always generated by the
maven-source-plugin, so you'd have to find how to modify the
generation of this jar to include the needed headers I suppose.  This
is more a question for the maven users list I guess.

On Wed, May 19, 2010 at 08:45, Christian Schneider
<[email protected]>  wrote:
Hi all,

currently I am using the pde mode in Eclipse to work with osgi bundles. The
problem is that most source jars are not attached to their binary bundles by
eclipse.

After long searching I found that a special manifest header is required for
this to work.
http://wiki.eclipse.org/PDE/FAQ#How_do_source_attachments_for_bundles_work

I would like to integrate this header in the build of Apache Camel:
https://issues.apache.org/activemq/browse/CAMEL-2734

Camel uses the maven-bundle-plugin to create the manifest files. Is it
possible to add the "Eclipse-SourceBundle:" Header using the
maven-bundle-plugin? If not can this feature be added to the plugin?

Greetings

Christian

--
----
http://www.liquid-reality.de


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





--
----
http://www.liquid-reality.de


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to