Return-Path: Delivered-To: apmail-incubator-aries-dev-archive@minotaur.apache.org Received: (qmail 47913 invoked from network); 8 Oct 2009 02:17:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Oct 2009 02:17:25 -0000 Received: (qmail 13418 invoked by uid 500); 8 Oct 2009 02:17:25 -0000 Delivered-To: apmail-incubator-aries-dev-archive@incubator.apache.org Received: (qmail 13350 invoked by uid 500); 8 Oct 2009 02:17:25 -0000 Mailing-List: contact aries-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: aries-dev@incubator.apache.org Delivered-To: mailing list aries-dev@incubator.apache.org Received: (qmail 13340 invoked by uid 99); 8 Oct 2009 02:17:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 02:17:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of linsun.unc@gmail.com designates 209.85.218.226 as permitted sender) Received: from [209.85.218.226] (HELO mail-bw0-f226.google.com) (209.85.218.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 02:17:16 +0000 Received: by bwz26 with SMTP id 26so4419342bwz.12 for ; Wed, 07 Oct 2009 19:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=mpPeuS7zt+GZ5AxVDX/S+11Kbp8xN1nlBpMC+tQCQCw=; b=WDLIDaDfL1s+x+5CD7IxDFpquyQE9H0vRBc30bM+0fPOWpXI3USjRPkVCCW7JgeftM NH4zCkUT1nLFeDk0olmW1BL2ELzIdDxz4ciyzRBq8miifTCsGPUwq0b6rUMuJTTQFDVe +SV1cZPpjLhB7srWSP+o1Pl70m62siUykVY5Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=D/LwABSWS/VORIsXUJdgjUhPPvNfIgeFv6uKPdn1SU4yAgFYEHMlUa1PiJCnuB1w70 VMmf3Iz+keUwXU3s5xGtIMSKmhC0Afdk8O/gSKRVbAvJZiGUEDZX+smD5B9knsSjzPrZ CKOas6SYTmzgLd/OVoU5LPWpGtcyAAfPhyQzo= MIME-Version: 1.0 Received: by 10.223.22.133 with SMTP id n5mr202784fab.16.1254968214884; Wed, 07 Oct 2009 19:16:54 -0700 (PDT) In-Reply-To: <713DB748-956E-4223-BDBE-EA1E96887BEC@gmail.com> References: <4AC671EC.8090603@gmail.com> <4AC79325.2000402@googlemail.com> <713DB748-956E-4223-BDBE-EA1E96887BEC@gmail.com> Date: Wed, 7 Oct 2009 22:16:54 -0400 Message-ID: Subject: Re: Wab url handler and imports From: Lin Sun To: aries-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi, Thanks for the clarification on this. I had a bit confused myself with Bundle-Classpath and Import-Package. I had hoped that by having these web-inf/lib jars in the Bundle-Classpath (which RFC 66 mandates) OSGi framwork would automatically detect the import-package for the jars listed in the Bundle-Classpath thus eliminate the need to scan these web-inf/lib jars, but it doesn't seem to be the case. Lin On Mon, Oct 5, 2009 at 1:32 PM, Valentin Mahrwald wrote: > We shouldn't need to scan embedded jars (i.e. in web-inf/lib) if they have a > valid bundle manifest. > > Otherwise, we probably want to scan them for the reason that they might use > common app server packages on behalf of the war (such as Spring using JTA > for example). However, it makes (some) sense to generate them as optional > because otherwise common utility libraries like commons logging are going to > generate loads of random imports that will almost certainly not be > satisfied. > > As for the packages directly used from the war (i.e. out of > web-inf/classes), they will probably not be optional most of the time. But > then according to what Ian wrote earlier, I think the initial assumption is > that the WAR should not be using any dependencies other than those in the > embedded libraries and possibly standard app server dependencies. > > In any case generating everything as optional seems to me like the simplest > solution that will provide some value. Even if dependencies are missing the > user would be able to work out which ones those are from the generated > optional imports. So we are not doing a lot worse than failing at install > time with that. > > Regards, > > Valentin > > On 5 Oct 2009, at 18:21, Lin Sun wrote: > >> Is this scanning going to be done for the classes in web-inf/classes >> dir or both the web-inf/classes & jars in web-info/lib dir? RFC 66 >> requires all jars from web-inf/lib to be added to the Bundle-Classpath >> manifest header and if we assume the user has packed the war >> dependencies in the war file, I wonder if we need to scan the jars in >> web-inf/lib dir? >> >> If we do need to scan both (the later case), would the packages needed >> by the classes in web-inf/classes dir marked as required (if it is >> not importing from within the war) while the packages needed by >> classes in web-inf/lib dir marked as optional? >> >> Thanks >> >> Lin >> >> On Mon, Oct 5, 2009 at 9:41 AM, Valentin Mahrwald >> wrote: >>> >>> My suggestion was, going with Guillaume's initial suggestion, to scan for >>> dependencies but generate them all as optional. >>> > >