Return-Path: X-Original-To: apmail-directory-api-archive@minotaur.apache.org Delivered-To: apmail-directory-api-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61F8E17601 for ; Thu, 16 Apr 2015 13:39:54 +0000 (UTC) Received: (qmail 78478 invoked by uid 500); 16 Apr 2015 13:39:54 -0000 Delivered-To: apmail-directory-api-archive@directory.apache.org Received: (qmail 78438 invoked by uid 500); 16 Apr 2015 13:39:54 -0000 Mailing-List: contact api-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: api@directory.apache.org Delivered-To: mailing list api@directory.apache.org Received: (qmail 78424 invoked by uid 99); 16 Apr 2015 13:39:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Apr 2015 13:39:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [66.111.4.28] (HELO out4-smtp.messagingengine.com) (66.111.4.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Apr 2015 13:39:28 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2E01A21147 for ; Thu, 16 Apr 2015 09:37:19 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute5.internal (MEProxy); Thu, 16 Apr 2015 09:37:19 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=babernathy.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=aUCBJgP6AAhysddIKIMm3qOZg4I=; b=YeUzqT iRF/ajSLuPlZ5tn+WgD7NbkSQWfAhJ8oSnjKnqlw5pdFmXYMcxSrOGFRG+DEZCcU sDFQRMTFUGMNDIpRjvb8NA2QdGDaXWFPrv9p81Iie1lKQ5LTuj4dlozHvtevdpQe K9PM70vbssdIKHf4yeePBN4qjCNdUZjR2lgrU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=aUCBJgP6AAhysdd IKIMm3qOZg4I=; b=IOwTFmNXHTA0XdJal4B+KJlekfCt8O3e14xJ6bdvWr22zFZ qbaAcyfHUDseFY7pzo72w7wvn2fRFsQIywgrJ/Ng2mqY2CzpI/JdrwcMF0VleW1l 3Rh/ayRv+HwJJgF+e0dgooLf7TD7zN+4Lmv2xQBohGB5okmtHH5863gpVggM= Received: by web5.nyi.internal (Postfix, from userid 99) id B6BBFACA59B; Thu, 16 Apr 2015 09:37:18 -0400 (EDT) Message-Id: <1429191438.1222075.254600081.55B7CB7B@webmail.messagingengine.com> X-Sasl-Enc: 6M1yIE6Xj5sdo8wR5Td7z83FP8pcx7kK0d5+cDQ5jcRw 1429191438 From: Benjamin Abernathy To: api@directory.apache.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: MessagingEngine.com Webmail Interface - ajax-424f40c2 Subject: Re: Request for slf4j import package in API bundles changes Date: Thu, 16 Apr 2015 07:37:18 -0600 In-Reply-To: <552EDB77.3000204@stefan-seelmann.de> References: <1428355583.368130.249955045.52BFA2EA@webmail.messagingengine.com> <55242F64.9070103@stefan-seelmann.de> <1428508865.981582.250821073.1F75FF03@webmail.messagingengine.com> <1428526642.1662155.250956749.5219E12B@webmail.messagingengine.com> <552E087C.2080604@stefan-seelmann.de> <552EDB77.3000204@stefan-seelmann.de> X-Virus-Checked: Checked by ClamAV on apache.org Stefan, That sounds like a really good idea. Thanks for doing that for me. Ben On Wed, Apr 15, 2015, at 03:43 PM, Stefan Seelmann wrote: > On 04/15/2015 08:43 AM, Stefan Seelmann wrote: > > On 04/08/2015 10:57 PM, Benjamin Abernathy wrote: > >> Stefan, > >> > >> I think I have found a reasonable solution. I implemented it and it > >> passes the integration tests as well as solves the problem I am > >> experiencing in OSGi. Here is what I did. > >> > >> 1. I updated the parent pom by adding the following properties: > >> > >> 1.7 > >> 1.8 > >> > >> 2. Then in each child pom that had an import declaration for org.slf4j, > >> I changed the import statement from: > >> > >> org.slf4j;version=3D${slf4j.api.version}, > >> > >> to:=20 > >> > >> org.slf4j;version=3D"[${slf4j.api.version.min},${slf4j.api.version.max= })", > >> > >> > >> This approach has some drawbacks: > >> > >> 1. You now have three places that may need to be updated when the > >> version of slf4j is updated.=20 > >> 2. BND (which is called by maven-bundle-plugin) is not the one deciding > >> the what version should be used. > >> > >> Now, supposedly BND can choose a version range, but I could not get > >> consistent behavior from the build using that approach. > >=20 > > You mean the following? I tried to use BND range macro which magically > > works: > >=20 > > org.slf4j;version=3D"$=ABrange;[=3D=3D,=3D+)=BB", > >=20 > > The result in mainifest is then org.slf4j;version=3D"[1.7,1.8)" > >=20 > > But I didn't find lot of documenation why it works. And the maven build > > prints out a warning (but still it works): > >=20 > > [INFO] --- maven-bundle-plugin:2.5.3:bundle (default-bundle) @ > > api-ldap-model --- > > [WARNING] Bundle > > org.apache.directory.api:api-ldap-model:bundle:1.0.0-M30-SNAPSHOT : No > > translation found for macro: range;[=3D=3D,=3D+), in > >=20 >=20 > I think I finally found a good solution. >=20 > In parent pom I added a property that defines the range macro >=20 > "$=ABrange;[=3D=3D,=3D+)=BB" >=20 > And in the actual poms the Import-Package instruction just looks like > this >=20 > org.slf4j;version=3D${slf4j.api.bundleversion}, >=20 > So in case the macro magic makes problems we just have to change the > property in parent pom. All tests (API, ApacheDS, Studio) work fine, > I'll commit the changes tomorrow. >=20 > Kind Regards, > Stefan >=20