Return-Path: Delivered-To: apmail-incubator-felix-dev-archive@www.apache.org Received: (qmail 90547 invoked from network); 14 Mar 2007 17:27:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 17:27:10 -0000 Received: (qmail 58590 invoked by uid 500); 14 Mar 2007 17:27:17 -0000 Delivered-To: apmail-incubator-felix-dev-archive@incubator.apache.org Received: (qmail 58562 invoked by uid 500); 14 Mar 2007 17:27:17 -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 58551 invoked by uid 99); 14 Mar 2007 17:27:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 10:27:17 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of carlossg@gmail.com designates 64.233.182.186 as permitted sender) Received: from [64.233.182.186] (HELO nf-out-0910.google.com) (64.233.182.186) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 10:27:06 -0700 Received: by nf-out-0910.google.com with SMTP id d4so304669nfe for ; Wed, 14 Mar 2007 10:26:44 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=mbHyGhDu5LijMKbtU0BO/Xpz2412MfgMJq9OQQzwXvZCf2xXXd+kd5kT361gj+4SMg5qQlkwMsqqfkwCrM0RWHVVkQKqwLoAVsDT7xBgoDTqAmSbygUZuQMXgx8e8/gs+LFTzGHWBBl7HCd211N1pbvqxWKnB5F/5SE1UN0gics= 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:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=IRYbywww9KwoBzug0MJugAn5Wb5obWEDweROKqRaNZ9XdEMme05S4xzIhSEdijmnwnY2rnmvOezTWzRLTwd5CeXGItbynYr4N7tOm3hI8YFaf6+oFk3sCKc4w99CuTcUXprbl+7uvhAtOPUQay6ws5hRLlHqP4oNB8YxgGf4bQU= Received: by 10.78.178.5 with SMTP id a5mr1326897huf.1173893203830; Wed, 14 Mar 2007 10:26:43 -0700 (PDT) Received: by 10.82.166.6 with HTTP; Wed, 14 Mar 2007 10:26:43 -0700 (PDT) Message-ID: <1a5b6c410703141026n79690e2ep2c7faf247a8f6364@mail.gmail.com> Date: Wed, 14 Mar 2007 10:26:43 -0700 From: "Carlos Sanchez" Sender: carlossg@gmail.com To: felix-dev@incubator.apache.org Subject: Re: maven-bundle-plugin, wrapping and excludeTransitive In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <87eb8aee0703080518n5fb818absd3e7f3ad4a9fbab5@mail.gmail.com> <81f0d9c0703090017v50896890xdd0fb5e5ebd72ec3@mail.gmail.com> X-Google-Sender-Auth: c3b300d051dce7e9 X-Virus-Checked: Checked by ClamAV on apache.org As part of https://issues.apache.org/jira/browse/FELIX-199 there's the functionality to package jars one by one, and to generate only the manifest. I had the same problem, I just wanted exact copies of the jars but with the osgi manifest On 3/9/07, Hampel, Michael wrote: > > > > Hello all, > > Thank's a lot for your answers. > In the beginning I was even more confused by your answers but then... > What I did not understand was the packaging issue, because when I execute= d for example > The hibernate osgi pom with or without excluding hibernate's transitive d= ependencies - > I always got the same resulting jar file - the dependencies never got add= ed to the > Jar, only 'declarative' in the MANIFEST file. > So that's why I did not understand why to exclude the dependencies. > But then I remembered that I changed the felix maven bundle plugin (Bundl= ePlugin.java) as I have a problem > With its regular expression handling with maven SNAPSHOT versions when bu= ndling my own osgi projects. > (I still have this problem, although I was building it from the felix tru= nk, version 0.9.0-incubator-SNAPSHOT). > As you all probably know Carlos Sanchez developed a maven-bundle-plugin w= ith some additional goals but also the > bundle goal. > So I replaced the felix BundlePlugin class with the one of Carlos. This f= ixed the version handling, but apparently > Changed something else as well - when bundling with this plugin the trans= itive dependencies are not added to the resulting bundle jar. > After remembering this, I then tried again with the 'original' felix mave= n bundle plugin and voila the dependencies(exploded packages) were added to= the osgi jar file and then I understood the excluding issue. > I don't know now if this was an intended feature that Carlos added - but = if - it looks like you don't have to exclude > Anymore. > But anyway your answers helped a lot because I still have problems with c= hanging between Maven and OSGi world and how they could work together the b= est way. > > So, thanx again, > > Michael > > > > > -----Urspr=FCngliche Nachricht----- > Von: Stuart McCulloch [mailto:mcculls@gmail.com] > Gesendet: Freitag, 09. M=E4rz 2007 09:17 > An: felix-dev@incubator.apache.org > Betreff: Re: maven-bundle-plugin, wrapping and excludeTransitive > > Hi Michael, > > If the original jar has dependencies with 'compile' scope then they're ad= ded to > the build classpath and packaged in the final bundle. This may or may not= be > what you want - some jars have dependencies that form a collective module > and would never appear separately, so you'd like those dependencies added= . > > Other jars have dependencies that could be shared among a lot of bundles > (ie. jdbc) - in that case you'd make a separate bundle of the dependency = and > would not want it added to the parent jar (to avoid classpath issues & bl= oat). > > If you decide to not include a dependency inside a bundle, you should pro= bably > declare the import as optional using ";resolution:=3Doptional". > > Cheers, Stuart > > On 09/03/07, Hampel, Michael wrote: > > > > Hello Alin, > > > > I don't understand why you would have to exclude the dependencies - as = far as I > > Understood the maven-bundle plugin is not doing anything with the maven= dependencies. > > If the dependencies are excluded (like in the hibernate osgi pom) and I= add the hibernate > > Osgi jar as a dependency to my project, I would loose the transitive ca= pability of maven as the > > Transitive dependencies of hibernate are not added anymore, e.g.: when = doing eclipse:eclipse. > > On the other side it makes sense to exclude the dependencies, because I= also will have to wrap the > > Hibernate dependencies to become osgi bundles - so the jta dependencies= will change to a jta-osgi dependency.... > > Does this mean I have to forget about maven's transitive capabilites? > > > > Maybe I am thinking completely wrong here - but probably you could shed= some light, > > > > Thanx, > > > > Michael > > > > > > > > > > > > > > -----Urspr=FCngliche Nachricht----- > > Von: Alin Dreghiciu [mailto:adreghiciu@gmail.com] > > Gesendet: Donnerstag, 08. M=E4rz 2007 14:18 > > An: felix-dev@incubator.apache.org > > Betreff: maven-bundle-plugin, wrapping and excludeTransitive > > > > About jar wrapping: > > > > Most of the time (at least in the cases I had) you would like to wrap o= nly > > the content of the jar you are targeting and not also the transitive > > dependencies that the targeted jar has. You can do this in at least two > > ways: > > 1. add to the dependency. This is verbose for the case tha= t the > > targeted jar has extensive dependencies and irrelevant to the process o= f > > wrapping > > 2. set the Export-package directive to export only those packages that= you > > want. here you have to know the internals of the package and if the jar= has > > some resources as licences, xmls' outside the main package you have to = add > > them one by one. > > > > So, here I am proposing a new configuration option: excludeTransitive t= hat > > is suppose to exclude the transitive artifacts if set to true. > > > > An example implementation can be found at the following location: > > http://maven.apache.org/plugins/maven-dependency-plugin/xref/org/apache= /maven/plugin/dependency/utils/filters/TransitivityFilter.html > > > > Alin Dreghiciu > > > > PS. Maven does not support a property of the articat as isTransitive() > > > > > > > --=20 I could give you my word as a Spaniard. No good. I've known too many Spaniards. -- The Princess Bride