Confirmed: The feature we depend on for getting the version info was removed from later versions of maven-bundle-plugin.
-Marshall -------- Original Message -------- Subject: Re: maven bundle plugin - getting the export-packages version automatically Date: Tue, 16 Aug 2011 18:04:18 +0100 From: Stuart McCulloch <[email protected]> Reply-To: [email protected] To: [email protected] On 15 August 2011 22:47, Marshall Schor <[email protected]> wrote: > After spending a whole day on various experiments, I found that if I > changed the > version of the maven-bundle-plug from 2.3.4 back to 2.1.0, then the > version="xxx" > strings re-appeared. > > So I'm guessing this was a feature that was removed at some point. > Hi Marshall, The added version looks like the project version - the only places the old bundleplugin did this was in the bundleall goal (which is now deprecated) and the manifest goal because they used a modified subclass of bnd's Analyzer called PackageVersionAnalyzer. This (mis-)feature was deliberately removed as part of the process of upgrading to a more recent version of bnd, because the modified subclass was no longer compatible with the new Analyzer: http://www.mail-archive.com/[email protected]/msg09656.html The general consensus was that the bundle version should not be used as the default for exported packages. -- Cheers, Stuart -Marshall > > On 8/15/2011 11:39 AM, Marshall Schor wrote: > > I have one use of maven-bundle-plugin where the generated > <Export-Package> lines > > in the generated MANIFEST.MF file contain version specifiers. The > instruction > > to maven-bundle-plugin looks like: > > > > <Export-Package>pkgname1, pkgname2, etc.</Export-Package> > > > > and the generated manifest has this: > > > > > <Export-Package>pkgname1;version="2.3.2.SNAPSHOT",pkgname2;version="2.3.2.SNAPSHOT", > > etc > > > > > > > > I have another use of maven-bundle-plugin, where things seem to be > similar, but > > the generated manifest doesn't have the version="xxx" added. > > > > In the first case, I do not have packageinfo or package-info.java files > in the > > packages. > > > > > > > > Where is BND picking up this version information? I'd like to set up the > 2nd > > case to pick it up, too, but after trying lots of experiments and looking > on the > > internet, all I can find is this line in the maven-bundle-plugin: > > > > Besides explicitly listing package version attributes, BND will also > determine > > package versions by examining the source JAR file or from packageinfo > files in > > the package directory. > > > > >From this I presume it is determining package versions by "examining the > source > > JAR file" - but that doesn't make sense to me, because in the case where > it is > > supplying the version, there is no source Jar file - it is suppose to be > > generating that file with the bnd command, I think. > > > > Any help specifying more detail where maven-bundle-plugin BND gets its > package > > version info from so I can set up the 2nd case above to work like the 1st > one, > > would be greatly appreciated. > > > > -Marshall Schor > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected]
