Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 31992 invoked from network); 28 Dec 2007 14:39:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Dec 2007 14:39:36 -0000 Received: (qmail 98447 invoked by uid 500); 28 Dec 2007 14:39:23 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 98373 invoked by uid 500); 28 Dec 2007 14:39:23 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 98364 invoked by uid 99); 28 Dec 2007 14:39:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Dec 2007 06:39:23 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of carlossg@gmail.com designates 209.85.198.185 as permitted sender) Received: from [209.85.198.185] (HELO rv-out-0910.google.com) (209.85.198.185) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Dec 2007 14:39:01 +0000 Received: by rv-out-0910.google.com with SMTP id k20so2785462rvb.30 for ; Fri, 28 Dec 2007 06:39:04 -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:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=OkvbP/5rOGmlsqjK3BVBSF0vQXldh0WD+L0KwoaCij4=; b=AVNOlrSbDMjg8tkcX4c7nf5wTQHmR9qdebYrj1OsaP4N1AAl8ivuIclnq/DAYRzp1ptaM9SD+S/Uk84rm04CYOjNt0CFH5KYQVjr0B/t5iLjokF/xvz18ykus9ewfShY4h/N9Gv+XTX1lmz1lNT5YFk2pB6/W2ckwzodciHr9xM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=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=LaeiSdInIfSb+n0GQq8BHN6rgiaYzluRor2wd4jGMMztdqQ2pahgfUm1v1fLllhkzBFk48Q9dvXosa5rVvJqX/WU49WvTJx08xYc24Iu/+q8BY1SFKlCPC3lhVl679ARCSFv8+qtSPUFEhFS6R12firlvNs1p1RshaOYblFAxMQ= Received: by 10.140.144.4 with SMTP id r4mr4778983rvd.175.1198852744900; Fri, 28 Dec 2007 06:39:04 -0800 (PST) Received: by 10.141.43.9 with HTTP; Fri, 28 Dec 2007 06:39:04 -0800 (PST) Message-ID: <1a5b6c410712280639h139c7e20p1ac40a3a9c58c148@mail.gmail.com> Date: Fri, 28 Dec 2007 15:39:04 +0100 From: "Carlos Sanchez" Sender: carlossg@gmail.com To: "Jakarta Commons Developers List" Subject: Re: Support for OSGi In-Reply-To: <4774EDAB.1060208@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47692CCB.7020608@apache.org> <55afdc850712191242k32107b51pa1d4f83291bedb0a@mail.gmail.com> <8ED8F00A-73D1-4BB9-BA79-7D805060E11F@apache.org> <476A73F1.4000801@apache.org> <4c39e3030712200601m6ee67bd4jd8233f04bf841668@mail.gmail.com> <476A7830.8010500@apache.org> <4774EDAB.1060208@apache.org> X-Google-Sender-Auth: 0561ec438a804728 X-Virus-Checked: Checked by ClamAV on apache.org Two things: - if the bundle plugin could be released, it'd be great, if not projects won't be able to make a release - my approach to add an osgified manifest to the current project is different in order not to change the packaging to bundle. bundle packaging only needs to be used to osgify 3rd party libraries. The manifest goal of the bundle plugin will generate the OSGi manifest for any maven project. org.apache.felix maven-bundle-plugin *;version=${pom.version} manifest org.apache.maven.plugins maven-jar-plugin 2.1 ${project.build.outputDirectory}/META-INF/MANIFEST.MF On Dec 28, 2007 1:35 PM, Carsten Ziegeler wrote: > Hi, > > in the meantime Stuart fixed the problem with the maven bundleplugin, so > I think we can give it a test drive :) > > Attached is a patch for the parent pom of commons and one to demonstrate > how to add support for OSGi to commons-lang. > > The changes to the parent pom are minimal: it just adds the maven > bundleplugin from the Apache Felix project. We currently need to use a > snapshot version, but a release is comming soon. > Besides adding the plugin, the patch also configures the bundle symbolic > name for all modules. The symbolic name is the unique identifier which > should follow java package naming. The best value is to use something > like "org.apache.commons.{artifactId}" where artifact id is commons-lang > or commons-collections etc. > > The patch to commons lang is also very simple. It changes the parent pom > to the current snapshot (which includes the changes from above) and sets > the packaging to bundle - this ensures that the bundleplugin runs and > creates the resulting jar file. So the bundleplugin replaces the maven > jar plugin. If you leave the packaging as "jar" the bundleplugin will > not run. > The last part of the patch adds the configuration to the bundleplugin. > The export "*" exports all packages definied in this module for other > bundles, so all classes are public. All packages are marked with the > current version which allows to run different versions in parallel. > The imports are not specified as they are calculated automatically by > the bundleplugin. > > And that's it :) > > The changes to the other projects should be similar. > > > Carsten > > > -- > Carsten Ziegeler > cziegeler@apache.org > > Index: /Users/cziegeler/Developer/workspaces/default/commons-proper/commons-parent/pom.xml > =================================================================== > --- /Users/cziegeler/Developer/workspaces/default/commons-proper/commons-parent/pom.xml (revision 605909) > +++ /Users/cziegeler/Developer/workspaces/default/commons-proper/commons-parent/pom.xml (working copy) > @@ -159,6 +159,12 @@ > maven-release-plugin > 2.0-beta-7 > > + > + org.apache.felix > + maven-bundle-plugin > + 1.1.0-SNAPSHOT > + true > + > > > > @@ -194,6 +200,15 @@ > ${maven.compile.source} > > > + > + org.apache.felix > + maven-bundle-plugin > + > + > + org.apache.commons.${pom.artifactId} > + > + > + > > > > > Index: /Users/cziegeler/Developer/workspaces/default/commons-proper/lang/pom.xml > =================================================================== > --- /Users/cziegeler/Developer/workspaces/default/commons-proper/lang/pom.xml (revision 605909) > +++ /Users/cziegeler/Developer/workspaces/default/commons-proper/lang/pom.xml (working copy) > @@ -22,13 +22,14 @@ > > org.apache.commons > commons-parent > - 5 > + 6-SNAPSHOT > > 4.0.0 > commons-lang > commons-lang > 2.4-SNAPSHOT > Commons Lang > + bundle > > 2001 > > @@ -401,6 +402,16 @@ > gnu > > > + > + org.apache.felix > + maven-bundle-plugin > + true > + > + > + *;version=${pom.version} > + > + > + > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > -- I could give you my word as a Spaniard. No good. I've known too many Spaniards. -- The Princess Bride --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org