Thomas, 

I don't believe that bnd has ever used Bundle-Version to set the version of an 
exported package, indeed I would consider it bad practice to do so.

If versioning matters to you (and it apparently matters enough for you to write 
this email!) then I would encourage you to do it properly with package 
versions. Probably the best way is to create a "packageinfo" file inside the 
source package, as described in the bnd docs.

Regards,
Neil


On Wednesday, 25 January 2012 at 10:31, Thomas GILLET wrote:

> 
> Hello,
> 
> I'm using the maven-bundle-plugin to develop a bundle containing a package
> which is exported AND imported (i.e it is a public package which is used by
> private code, so BND adds the import statement in the manifest as it is
> considered a good practice).
> 
> I'm not using package versioning, so, from my understanding of the BND
> documentation, the export statement should use the bundle version, and the
> import statement should use the version from the export statement. It was
> all working fine until I run a "mvn clean" before my "mvn package" and end
> up with no version on my import statement.
> 
> My guess was that after a clean there is no manifest file, so there is no
> export statement to get the package version from.
> As a workaround I added the "bundle:manifest" goal just before the
> "bundle:bundle" goal so the manifest is generated a first time before the
> bundle creation. It's now working fine.
> 
> But I wonder if this is "normal" behavior or not. Did I do something wrong ?
> Is it a bug ? Should I add an issue about that in the Felix Jira ?
> 
> Not a very big problem but, if someone knows something about it, I would
> like to understand.
> 
> Thomas GILLET
> -- 
> View this message in context: 
> http://old.nabble.com/maven-bundle-plugin-%3A-no-import-version-for-packages-being-both-imported-and-exported-after-a-clean-build-tp33200339p33200339.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com 
> (http://Nabble.com).
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected] 
> (mailto:[email protected])
> For additional commands, e-mail: [email protected] 
> (mailto:[email protected])




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

Reply via email to