Return-Path: Delivered-To: apmail-incubator-felix-dev-archive@www.apache.org Received: (qmail 50485 invoked from network); 9 Feb 2007 08:39:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2007 08:39:23 -0000 Received: (qmail 68923 invoked by uid 500); 9 Feb 2007 08:39:29 -0000 Delivered-To: apmail-incubator-felix-dev-archive@incubator.apache.org Received: (qmail 68894 invoked by uid 500); 9 Feb 2007 08:39:29 -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 68883 invoked by uid 99); 9 Feb 2007 08:39:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 00:39:29 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of fmeschbe@gmail.com designates 64.233.184.234 as permitted sender) Received: from [64.233.184.234] (HELO wr-out-0506.google.com) (64.233.184.234) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2007 00:39:19 -0800 Received: by wr-out-0506.google.com with SMTP id i20so782240wra for ; Fri, 09 Feb 2007 00:38:58 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=QLW9CnqdoxzDv4hGdUV2iHOcVQQK5PmKQwIUcPD9K8fWm74M+QGzZhOf1oqipO8tULhahI5+HOczvzOp29IrH+NWEkkoB1goRmzlgS84GBGDQnl14cziWn/V5uHmW3qDKrkmrRllaMVEoa96oJKMnQZU5i7w5npF45bCregtt5I= Received: by 10.114.126.1 with SMTP id y1mr4667479wac.1171010338137; Fri, 09 Feb 2007 00:38:58 -0800 (PST) Received: by 10.114.72.20 with HTTP; Fri, 9 Feb 2007 00:38:58 -0800 (PST) Message-ID: Date: Fri, 9 Feb 2007 09:38:58 +0100 From: "Felix Meschberger" Sender: fmeschbe@gmail.com To: felix-dev@incubator.apache.org Subject: Re: How to reexport packages when using import-package In-Reply-To: <1a5b6c410702081605y5a665ee7q42a3f3ecf8ed27bf@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20692_30886050.1171010338098" References: <1a5b6c410702081545u36761abbi50943d42c42cede5@mail.gmail.com> <1a5b6c410702081605y5a665ee7q42a3f3ecf8ed27bf@mail.gmail.com> X-Google-Sender-Auth: 6bbbf61b9f1f080f X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_20692_30886050.1171010338098 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi On 2/9/07, Carlos Sanchez wrote: > > ok, so there's no "transitive dependency" thing like Maven has, > basically I have to reference all the bundles I need. Maybe there is some confusion here... By listing Java packages your bundle needs in the Import-Package header you place an order to the framework for these packages and have the framework resolve the bundles providing those packages in their Export-Package headers. So, the nice thing here is, that you do not need to care as much for finding the right libraries/bundles as you do in Maven, where you declare the providers of the packages and not the packages themselves. Consequently, there is no such thing as transitive imports for packages because either your bundle needs a package, in which case it is imported, or your bundle does not need it and then you don't care. And the list of packages required by a bundle may be automatically generated by the BND tool. Hope this helps. Regards Felix On 2/8/07, Richard S. Hall wrote: > > On Feb 8, 2007, at 6:45 PM, Carlos Sanchez wrote: > > > > > I know about visibility:=reexport with Require-Bundle, but how can I > > > reexport packages imported with Import-Package? > > > > You cannot do so. > > > > This issue is a little confusing, especially given the terminology that > > was adopted, but even require-bundle with "reexport" does not re-export > > the packages as I think you are imagining. > > > > Consider A requires B requires C. If B requires C with "reexport" then > > A will see C's packages too. If B requires C privately, then A will not > > see C's packages. > > > > The only form of re-export available in OSGi R4 is if a bundle requires > > several bundles and then declares an Export-Package for some of the > > packages in the required bundles. This use case was only intended to be > > used for cases where you wanted to split a package into multiple > > bundles (using mandatory directives to avoid accidental importation) > > and then the split packages could be recombined into a whole package > > using require-bundle + Export-Package. > > > > -> richard > > > > > > > > -- > > > I could give you my word as a Spaniard. > > > No good. I've known too many Spaniards. > > > -- The Princess Bride > > > > > > > -- > I could give you my word as a Spaniard. > No good. I've known too many Spaniards. > -- The Princess Bride > ------=_Part_20692_30886050.1171010338098--