Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1421C91CD for ; Wed, 30 Nov 2011 11:34:34 +0000 (UTC) Received: (qmail 72892 invoked by uid 500); 30 Nov 2011 11:34:33 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 72853 invoked by uid 500); 30 Nov 2011 11:34:33 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 72845 invoked by uid 99); 30 Nov 2011 11:34:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 11:34:33 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of njbartlett@gmail.com designates 209.85.212.49 as permitted sender) Received: from [209.85.212.49] (HELO mail-vw0-f49.google.com) (209.85.212.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 11:34:26 +0000 Received: by vbbfs19 with SMTP id fs19so399578vbb.22 for ; Wed, 30 Nov 2011 03:34:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=S0nYIIAwJYnTZ1e+oWt3yKWXMKV8yLqsucUkpnUP7fU=; b=IIAtHe+jgYtfQgkMXLcZ1PnSHbwUPxN+0fAwR/NbfhaIgQs61jz4YmB7g6qQo1rzvw 0fbiF7hxen7Bf67q73S0f+eO9alx9jZeS4m/buP/rpN3d210E9sCXwcmuBxSicA3nUKQ bMNpC9jAzxujRCYcwq5yXzrLmgzjtnNq5Dzoo= MIME-Version: 1.0 Received: by 10.52.20.209 with SMTP id p17mr1680848vde.60.1322652845672; Wed, 30 Nov 2011 03:34:05 -0800 (PST) Received: by 10.52.181.161 with HTTP; Wed, 30 Nov 2011 03:34:05 -0800 (PST) In-Reply-To: References: Date: Wed, 30 Nov 2011 11:34:05 +0000 Message-ID: Subject: Re: Embed-Dependency problem with Maven Bundle plugin From: Neil Bartlett To: users@felix.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Barbara, I believe what you're seeing is correct behaviour.... you're unfortunately now paying the price of embedding. Embedding a dependency doesn't get you out of jail for free. When you embed a library, you now inherit all of its dependencies. If you embed all those libraries as well, then you inherit an even bigger set of dependencies! Unless you can find a way to cut through this, you end up building a huge bundle with a Bundle-Classpath that looks very much like the classpath you had before you started using OSGi... Ultimately the only real solution is to depend on fewer third party libraries, especially ones that drag in a huge tree of transitive dependencies. Sadly this is the point where many people get pissed off with OSGi, but they're only shooting the messenger. Sorry for the pessimistic tone. An acceptable interim position for many people is to create a single large bundle containing all of their third-party library dependencies; at least they can then apply OSGi modularity to their own application code. Regards, Neil On Wed, Nov 30, 2011 at 11:19 AM, Barbara Rosi-Schwartz wrote: > Thanks Stuart, very clear explanation. > > The problem I am facing now is that, in the generated manifest, the Impor= t-Package clause contains packages that are not immediately required by the= classes in the bundle to be. Why is that? The main issue is that these Imp= ort-Package elements end up dragging in all sorts of transitive dependencie= s and I am finding myself pulling on a very long string... > > Do I need to configure the Import-Package clause as well? > > TIA, > B. > > -----Original Message----- > From: Stuart McCulloch [mailto:mcculls@gmail.com] > Sent: 29 November 2011 12:35 > To: users@felix.apache.org > Subject: Re: Embed-Dependency problem with Maven Bundle plugin > > On 29 Nov 2011, at 12:09, Barbara Rosi-Schwartz wrote: > >> Hello. >> >> I am using Maven Bundle plugin version 2.3.5 and I am having a problem >> with it. If I use the >> >> *;scope=3Dcompile|runtime;inline=3Dfalse> cy> >> >> clause, all dependencies are embedded, as expected. If I instead specify= the ones I want embedded as: >> >> uk.co.igindex.singlesignon.client,uk.co.igindex.spri >> ngrest.client,uk.co.igindex.springrest.domain;scope=3Dcompile|runtime;in >> line=3Dfalse > > The Embed-Dependency grammar is defined here: > > =C2=A0 http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.= html#ApacheFelixMavenBundlePlugin%28BND%29-Embeddingdependencies > > Clauses are separated by commas and if you don't specify an attribute (ie= . attr=3Dvalue) then it defaults to the artifactId > > Therefore: > > =C2=A0 uk.co.igindex.singlesignon.client,uk.co.igindex.= springrest.client,uk.co.igindex.springrest.domain;scope=3Dcompile|runtime;i= nline=3Dfalse > > is parsed as: > > =C2=A0 ( artifactId=3Duk.co.igindex.singlesignon.client ) > =C2=A0 OR ( artifactId=3Duk.co.igindex.springrest.client ) > =C2=A0 OR ( artifactId=3Duk.co.igindex.springrest.domain AND ( scope=3Dco= mpile OR scope=3Druntime ) AND don't inline ) > > If you want to list alternative values for a given attribute use the pipe= symbol | as follows > > =C2=A0 uk.co.igindex.singlesignon.client|uk.co.igindex.= springrest.client|uk.co.igindex.springrest.domain;scope=3Dcompile|runtime;i= nline=3Dfalse > > Finally is "uk.co.igindex.singlesignon.client" the concatenated groupId += artifact? If so then you could use something like: > > =C2=A0 artifactId=3Dclient|domain;groupId=3Duk.co.igind= ex.*;scope=3Dcompile|runtime;inline=3Dfalse > > to select dependencies with groupIds that start with "uk.co.igindex..." a= nd that have "client" or "domain" artifactIds > > HTH > >> I get the following warning: >> >> [WARNING] Embed-Dependency: clause "uk.co.igindex.singlesignon.client" >> did not match any dependencies [WARNING] Embed-Dependency: clause >> "uk.co.igindex.springrest.client" did not match any dependencies >> [WARNING] Embed-Dependency: clause >> "uk.co.igindex.springrest.domain;scope=3Dcompile|runtime;inline=3Dfalse" >> did not match any dependencies >> >> and no dependencies are actually embedded. What am I doing wrong? >> >> TIA, >> B. >> >> BARBARA ROSI-SCHWARTZ >> Senior Developer >> >> IG Group|Cannon Bridge House >> 25 Dowgate Hill|London|EC4R ZYA >> >> t: +44(0)20 7573 0208 (Direct) >> t: +44(0)20 7896 0011 (Switchboard) >> w: www.iggroup.com >> >> >> ________________________________ >> The information contained in this email is strictly confidential and for= the use of the addressee only, unless otherwise indicated. If you are not = the intended recipient, please do not read, copy, use or disclose to others= this message or any attachment. Please also notify the sender by replying = to this email or by telephone (+44 (0)20 7896 0011) and then delete the ema= il and any copies of it. Opinions, conclusions (etc) that do not relate to = the official business of this company shall be understood as neither given = nor endorsed by it. IG Group Holdings plc is a company registered in Englan= d and Wales under number 01190902. VAT registration number 761 2978 07. Reg= istered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Auth= orised and regulated by the Financial Services Authority. FSA Register numb= er 114059. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > For additional commands, e-mail: users-help@felix.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > For additional commands, e-mail: users-help@felix.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org