Hi,
Am Freitag, den 04.02.2011, 21:33 +0000 schrieb Alasdair Nottingham:
> Hi,
>
> Currently we specify versions of exported packages in the pom. This is
> not ideal as it means whenever anyone makes a change in a package they
> have to edit the pom,
You could argue that modifying exported packages is critical, so making
it harder to do might get people to think twice ... Granted this is kind
of a weak argument ;-)
On the other hand, the problem is always the same: you have to update
information in a secondary location -- regardless of whether this is the
packaginfo or the pom.xml file.
The advantage of doing it in the pom.xml file IMHO is that you have a
complete overview of your exports incl. their versions. YMMV.
> also you need to sync the version correctly
> between the bundles
the bundle plugin takes care of this (fortunately) -- assuming you mean
the "Import-Package" versioning.
> and the uber bundles.
>
> bnd supports the packageinfo files (and also annotations in
> package-info.java), but those are not currently picked up and used in
> our build. I raise FELIX-2819 and a workaround has been suggested,
> which I managed to get working.
>
> The fix would be to add the following to the default-pom and get the
> modules to use the updated parent:
>
> <resource>
> <directory>${project.build.sourceDirectory}</directory>
> <includes>
> <include>**/packageinfo</include>
> </includes>
> </resource>
Unfortunately, you will still have the regular resources in the
src/main/resources tree. So you have to explicitly list this to in the
<resources> element of the parent POM to not miss these...
In Sling we currently maintain the exported package version in the POMs.
This works fine but is also kind of suboptimal.
I think the most important thing is to make it consistent: Do it either
way, but stick to.
Regards
Felix
>
> Thoughts?
> Alasdair
>