Stuart McCulloch wrote:
2008/10/17 Sahoo <[EMAIL PROTECTED]>
My project has a lot of subprojects that get released together. I want
packages exported as part of all the bundles to have same version attribute.
I can't rely on automatic conversion of maven version to OSGi version
because while 3.0.0-SNAPSHOT < 3.0.0 in maven, the corresponding mapped OSGi
versions behave differently, i.e. 3.0.0.SNAPSHOT > 3.0.0 in OSGi. SO, I
would like to set the package version as 3.0. Do I have to specify it in
every Export-Package/_exportcontents instruction?
well, you have to tell BND to use that particular version (3.0) somehow
- but you should be able to take advantage of Maven to ease the pain
for example, you could try setting a property in one of the parent poms
and then use that in the Export-Package/_exportcontents instructions
I wanted to avoid having to specify this property expression in every
Export-Package instruction. I was asking if there was any property that
I could set for maven bundle plugin to use if no version was explicitly
specified. Looks like the answer is no. BTW, I once remember Peter
mentioning about some macro called maven_version. This is what he wrote:
/Peter Kriens commented on FELIX-677:
------------------------------------
I am getting afraid there is no end to the places where I have to clean up
maven version. I therefore have added a macro ${maven_version;1.0-SNAPSHOT}
that will convert the maven version string to an OSGi version string. You can
use macros and properties inside macros./
How does one take advantage of this?
btw - do you have a more concrete example for this usecase?
Yes, I am doing it in GlassFish project, where we build close to 80
bundles and it's a bit painful to go and change all 80 osgi.bundle files
with version information.
(also I guess this relates to your other question about exportcontents)
Yes, because of exportcontents issue, I am forced to use Export-Package
in my osgi.bundle file.
Thanks,
Sahoo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]