Return-Path: Delivered-To: apmail-incubator-felix-dev-archive@www.apache.org Received: (qmail 73584 invoked from network); 18 Oct 2006 19:04:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2006 19:04:35 -0000 Received: (qmail 32253 invoked by uid 500); 18 Oct 2006 19:04:35 -0000 Delivered-To: apmail-incubator-felix-dev-archive@incubator.apache.org Received: (qmail 32066 invoked by uid 500); 18 Oct 2006 19:04:34 -0000 Mailing-List: contact felix-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: felix-dev@incubator.apache.org Delivered-To: mailing list felix-dev@incubator.apache.org Received: (qmail 32055 invoked by uid 99); 18 Oct 2006 19:04:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 12:04:34 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 12:04:33 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 714C771430D for ; Wed, 18 Oct 2006 12:03:35 -0700 (PDT) Message-ID: <15955270.1161198215445.JavaMail.jira@brutus> Date: Wed, 18 Oct 2006 12:03:35 -0700 (PDT) From: "Lonnie Pryor (JIRA)" To: felix-dev@incubator.apache.org Subject: [jira] Commented: (FELIXM2-5) Enable support for inter-bundle transitive dependencies In-Reply-To: <1607166109.1143078062256.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/FELIXM2-5?page=comments#action_12443337 ] Lonnie Pryor commented on FELIXM2-5: ------------------------------------ John, Marking a dependency as "osgi-bundle" when using this patch will allow it to be passed to other projects transitively without embedding it in the resulting JAR. This should work even if the artifact targeted by the dependency is not actually an OSGi bundle. So yes, this patch should allow you to incrementally migrate your projects without disrupting your multi-project build. -Lonnie > 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-2-patch.txt, 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 paths. > 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