felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Conlon (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIXM2-5) Enable support for inter-bundle transitive dependencies
Date Wed, 11 Oct 2006 16:50:36 GMT
    [ http://issues.apache.org/jira/browse/FELIXM2-5?page=comments#action_12441495 ] 
John Conlon commented on FELIXM2-5:

Am working with others to migrate an existing Apache M2 multi-project based 'project' to OSGi
and Felix.  We would like to gently migrate our maven POM's to OSGi plugin poms without cascading
problems through out the multiproject build.  Our build creates packaging for pom, jar, osgi-bundle,
(future ipojo-bundle), and zip.

To accomplish this migration we need to retain maven transitive dependency functionality as
we update individual poms.

Can the M2 OSGi plugin, with the applied patch and using an "osgi-bundle" typed dependency
mechanism as described above in one pom, interact with 'standard' M2 poms?

> Enable support for inter-bundle transitive dependencies
> -------------------------------------------------------
>                 Key: FELIXM2-5
>                 URL: http://issues.apache.org/jira/browse/FELIXM2-5
>             Project: Felix M2 Plugin
>          Issue Type: New Feature
>    Affects Versions: 0.1.2, 0.1.3
>         Environment: Multi-bundle build environemnt
>            Reporter: Lonnie Pryor
>         Assigned To: Timothy Bennett
>            Priority: Minor
>         Attachments: maven-osgi-plugin-transitiveDependencies-patch.txt
> The OSGi R4 specification supports transitive dependencies via the "visibility:=reexport"
directive on the "Require-Bundle" manifest header (see OSGi Service Platform Core Specification,
Release 4, Chapter 3, Section 13). Unfortunately, the Felix M2 Plugin does not support declaring
this kind of relationship in the POM.
> By only using the dependency scope setting, developers can declare that a specific dependency
is not to be embedded in the bundle, but that dependency is then never transitively passed
on to other projects. It would be optimal if the Maven transitive dependency mechanism could
be configured to mirror the one provided by OSGi.
> Since the OsgiJarMojo class only embeds dependencies with the "jar" type, a transitive,
non-embedded dependency can be declared by giving it a type of "osgi-bundle". There are, however,
a couple of issues with this approach:
> 1.) The ArtifactHandler implementation configured in META-INF/plexus/components.xml specifies
"includesDependencies" as true. This makes any dependencies inherited through an "osgi-bundle"
typed dependency unavailable to other phases of the build life cycle. Setting "includesDependencies"
to false will resolve this issue. While this change will create more overhead during bundle
builds (a bundle dependency and all of its embedded dependencies will be downloaded separately),
this is required if any of the transitive dependencies are needed on the compile or test class
> 2.) The OsgiJarMojo class currently embeds any dependency with the type "jar" that is
on the runtime or compile scope. With transitive dependencies as described above enabled,
all jars embedded in bundle dependencies will also be embedded in the dependent bundle. To
resolve this, the OsgiJarMojo class should be changed to only embed dependencies with the
type "jar", on the runtime or compile scope, and not inherited from a dependency with the
"osgi-bundle" type. The latter can be accomplished by analyzing the the contents of the getDependencyTrail()
method for each candidate "jar" artifact.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message