Return-Path: Delivered-To: apmail-incubator-felix-dev-archive@www.apache.org Received: (qmail 75128 invoked from network); 9 Mar 2007 12:48:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Mar 2007 12:48:57 -0000 Received: (qmail 96639 invoked by uid 500); 9 Mar 2007 12:48:58 -0000 Delivered-To: apmail-incubator-felix-dev-archive@incubator.apache.org Received: (qmail 96525 invoked by uid 500); 9 Mar 2007 12:48:57 -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 96509 invoked by uid 99); 9 Mar 2007 12:48:54 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [194.138.12.133] (HELO atvies1zrx.siemens.at) (194.138.12.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Mar 2007 04:48:49 -0800 Received: from vies1k7x.sie.siemens.at ([158.226.129.83]) by atvies1zrx.siemens.at with ESMTP id l29Cj7Bq018574 for ; Fri, 9 Mar 2007 13:45:07 +0100 Received: from nets138a.ww300.siemens.net ([158.226.129.98]) by vies1k7x.sie.siemens.at (8.12.11.20060308/8.12.1) with ESMTP id l29CkAoh012944 for ; Fri, 9 Mar 2007 13:46:16 +0100 Received: from nets13ga.ww300.siemens.net ([158.226.250.76]) by nets138a.ww300.siemens.net with Microsoft SMTPSVC(6.0.3790.1830); Fri, 9 Mar 2007 13:46:14 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: maven-bundle-plugin, wrapping and excludeTransitive Date: Fri, 9 Mar 2007 13:46:13 +0100 Message-ID: In-Reply-To: <81f0d9c0703090017v50896890xdd0fb5e5ebd72ec3@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: maven-bundle-plugin, wrapping and excludeTransitive Thread-Index: AcdiK9XFDC9W7yNXSe+BEbObLf36OwAF6b4w References: <87eb8aee0703080518n5fb818absd3e7f3ad4a9fbab5@mail.gmail.com> <81f0d9c0703090017v50896890xdd0fb5e5ebd72ec3@mail.gmail.com> From: "Hampel, Michael" To: X-OriginalArrivalTime: 09 Mar 2007 12:46:14.0349 (UTC) FILETIME=[EC362FD0:01C76248] X-purgate: clean X-purgate: This mail is considered clean X-purgate-type: clean X-purgate-Ad: Checked for Spam by eleven - eXpurgate www.eXpurgate.net X-purgate-ID: 149917::070309134507-25819BB0-444A50EA/0-0/0-15 X-purgate-size: 5341/999999 X-Virus-Checked: Checked by ClamAV on apache.org =20 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 = executed for example The hibernate osgi pom with or without excluding hibernate's transitive = dependencies - I always got the same resulting jar file - the dependencies never got = added 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 = (BundlePlugin.java) as I have a problem With its regular expression handling with maven SNAPSHOT versions when = bundling my own osgi projects. (I still have this problem, although I was building it from the felix = trunk, version 0.9.0-incubator-SNAPSHOT). As you all probably know Carlos Sanchez developed a maven-bundle-plugin = with some additional goals but also the bundle goal.=20 So I replaced the felix BundlePlugin class with the one of Carlos. This = fixed the version handling, but apparently Changed something else as well - when bundling with this plugin the = transitive dependencies are not added to the resulting bundle jar. After remembering this, I then tried again with the 'original' felix = maven 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 = changing between Maven and OSGi world and how they could work together = the best way. So, thanx again, Michael=20 =20 =20 -----Urspr=FCngliche Nachricht----- Von: Stuart McCulloch [mailto:mcculls@gmail.com]=20 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 = added 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 & = bloat). If you decide to not include a dependency inside a bundle, you should = probably 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 = capability 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 = only > 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 = that the > targeted jar has extensive dependencies and irrelevant to the process = of > 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 = that > 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/m= aven/plugin/dependency/utils/filters/TransitivityFilter.html > > Alin Dreghiciu > > PS. Maven does not support a property of the articat as isTransitive() > > = >