You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Todor Boev <t....@prosyst.bg> on 2009/08/22 17:20:58 UTC

maven-bundle-plugin: a postprocessing step?

Hi,
Has anyone contemplated the idea for a validation step after a bundle's manifest
is generated?

E.g. check if only exported packages are imported. It seems BND already detects
OSGi manifests on the classpath to collect version information for the imports.
So the manifests of all jars on the build classpath are available for other
validations as well. Such validations will in fact check if the build classpath
is potentially be identical to the runtime classpath. I.e. we build only against
bundles and import only their exported stuff. Does this make sense?

Cheers,
Todor

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: maven-bundle-plugin: a postprocessing step?

Posted by Todor Boev <t....@prosyst.bg>.
Stuart McCulloch wrote:

> it depends how much of the JARs on the classpath are already OSGi bundles,
> a lot of the Maven projects I see using the bundleplugin are compiling
> against 'normal' JARs, so their manifests wouldn't have the necessary information
> 

Well the idea is to have two "layers" in the build. First we lift all non-OSGi 
jars into the bundle space. Than we build against bundles only. The idea is to 
converge the build and runtime classpaths so it is easier for developers to keep 
  track of the runtime structure of the system.

> you'd also have to remove JDK packages from the list (depending of course on
> the required execution environment) as the system bundle would be exporting
> those packages

Yup there should be an exclusion filter for various purposes. Maybe the entire 
feature should have an on/off switch:

<_validate-constraints>true</_validate-constraints>

> I'd suggest talking to Peter directly as sounds more like a general BND
> option
> 

Sure. Hopefully he is not too busy with OSGi 4.2 :)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: maven-bundle-plugin: a postprocessing step?

Posted by Stuart McCulloch <mc...@gmail.com>.
2009/8/22 Todor Boev <t....@prosyst.bg>

> Hi,
> Has anyone contemplated the idea for a validation step after a bundle's
> manifest
> is generated?
>
> E.g. check if only exported packages are imported. It seems BND already
> detects
> OSGi manifests on the classpath to collect version information for the
> imports.
> So the manifests of all jars on the build classpath are available for other
> validations as well. Such validations will in fact check if the build
> classpath
> is potentially be identical to the runtime classpath. I.e. we build only
> against
> bundles and import only their exported stuff. Does this make sense?
>

it depends how much of the JARs on the classpath are already OSGi bundles,
a lot of the Maven projects I see using the bundleplugin are compiling
against
'normal' JARs, so their manifests wouldn't have the necessary information

you'd also have to remove JDK packages from the list (depending of course on
the required execution environment) as the system bundle would be exporting
those packages

I'd suggest talking to Peter directly as sounds more like a general BND
option

Cheers,
> Todor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

-- 
Cheers, Stuart