felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <mccu...@gmail.com>
Subject Re: maven bundle plugin - getting the export-packages version automatically
Date Tue, 16 Aug 2011 17:04:18 GMT
On 15 August 2011 22:47, Marshall Schor <msa@schor.com> 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/users@felix.apache.org/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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message