Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 87303 invoked from network); 7 Dec 2007 07:07:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2007 07:07:41 -0000 Received: (qmail 69696 invoked by uid 500); 7 Dec 2007 07:07:29 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 69660 invoked by uid 500); 7 Dec 2007 07:07:29 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 69649 invoked by uid 99); 7 Dec 2007 07:07:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2007 23:07: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 (athena.apache.org: domain of gnodet@gmail.com designates 66.249.92.173 as permitted sender) Received: from [66.249.92.173] (HELO ug-out-1314.google.com) (66.249.92.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 07:07:09 +0000 Received: by ug-out-1314.google.com with SMTP id a2so968159ugf for ; Thu, 06 Dec 2007 23:07:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=KlhrDr2k+uEq/HkWfAcflGe+zXYpqen5fATvwOYVFw8=; b=Zv/LDF2TGFHaJyr8gD3sn0iWLxrbXyi9QMY9jwofAEAAvpDATJzTWG/PNYpHTsnbxLjyruTJI04CjF9c+nEAY7h5QpLOZAJnVEsuBLDfSYebmo6qima0XhLEoe1l/Bpxeu6nbCaHlMEJ+oEgLm41sfJPCcGC3koCaVuX25qM8so= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=AyUFDtRorNJ7dNrqqk3BNIZemVZ3JFS5/XyoCCs2dfpET+jBEMG5pk1POPuAlnvM5kt5r1vNHLf2654HriV8yq2QXVYgLNb3+ORlm2qkLKxEFUrq1Gy5DKUGB0PkfTmrsX7ML0kYeLCXL5kunrm3cSzNr176iRJReXhKzoLVoCE= Received: by 10.66.233.14 with SMTP id f14mr1950282ugh.1197011230797; Thu, 06 Dec 2007 23:07:10 -0800 (PST) Received: by 10.67.121.1 with HTTP; Thu, 6 Dec 2007 23:07:10 -0800 (PST) Message-ID: Date: Fri, 7 Dec 2007 08:07:10 +0100 From: "Guillaume Nodet" To: dev@felix.apache.org Subject: Re: Problem with the bundle plugin (and patch) In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5555_18713442.1197011230781" References: <81f0d9c0712062259i4fd2399boef30abaf27b5195@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_5555_18713442.1197011230781 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Note that the benefit of adding that to the maven-bundle-plugin is that you can configure it on the top pom and you'd not have to add a new plugin / config in each sub module (as it would be the case when using the dependency plugin), so while I agree this is a workaround for a known maven bug, i think the patch is still handy. On Dec 7, 2007 8:05 AM, Guillaume Nodet wrote: > Yeah, I understand the problem. > FYI, the patch Hiram attached adds an optional flag to unpack the artifact > (which is set to false by default to keep the existing behavior), so the > patch is quite harmless and it seems this is want you are just talking about > ;-) > > > On Dec 7, 2007 7:59 AM, Stuart McCulloch > wrote: > > > On 06/12/2007, Guillaume Nodet wrote: > > > > > > While working on the ServiceMix project, Hiram found a bug and raise a > > > JIRA > > > with an attached patch [1]. > > > The problem is that in a reactor build (multiproject build), maven > > uses > > > the > > > ./target/classes folder of dependant modules and add those in the > > > classpath. > > > > > > yes, this is actually a known bug with the core Maven code, specifically > > with the > > MavenProject.java class - it always uses 'target/classes' for projects > > in > > the same > > reactor rather than the final artifact. > > > > ( see the Felix mail archives for previous discussions on this topic ) > > > > unfortunately because MavenProject.java is a core class, it's not easy > > to > > patch > > or workaround this behaviour - so what people usually do is use the > > dependency > > plugin to unpack the bundle after it's been built. > > > > the maven-pax-plugin (as used in Pax-Construct) provides another > > solution by > > extending the Maven compiler mojo so it uses the original bundle, which > > means > > no unpacking is required (it also handles compiling against embedded > > entries). > > > > This causes a problem, because the bundle plugin does not > > > extract the classes in that folder, which cause the classpath to not > > > contain > > > the neeed classes. > > > Can someone review the patch and apply it please ? > > > > > > so far I've been resisting the urge to add an unpack feature to the > > bundle-plugin > > because the same result is possible by adding the > > maven-dependency-plugin to > > the pom, and it's often better to combine plugins in the pom than have a > > plugin > > grow into a huge 'does-everything-you-ever-need' jar with duplicated > > source. > > > > anyway, I'll take a look and think about making this an optional feature > > - > > because > > some folks may not want the extra cost of unpacking the bundle, or might > > want > > the target/classes directory kept as-is (ie. not replaced with the > > bundle > > contents) > > > > Thanks! > > > > > > [1] https://issues.apache.org/jira/browse/FELIX-433 > > > > > > -- > > > Cheers, > > > Guillaume Nodet > > > ------------------------ > > > Blog: http://gnodet.blogspot.com/ > > > > > > > > > > > -- > > Cheers, Stuart > > > > > > -- > > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------=_Part_5555_18713442.1197011230781--