Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A768B233B for ; Sun, 1 May 2011 11:52:54 +0000 (UTC) Received: (qmail 57211 invoked by uid 500); 1 May 2011 11:52:54 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 57003 invoked by uid 500); 1 May 2011 11:52:53 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 56995 invoked by uid 99); 1 May 2011 11:52:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 May 2011 11:52:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mcculls@gmail.com designates 209.85.216.49 as permitted sender) Received: from [209.85.216.49] (HELO mail-qw0-f49.google.com) (209.85.216.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 May 2011 11:52:45 +0000 Received: by qwi2 with SMTP id 2so3405452qwi.22 for ; Sun, 01 May 2011 04:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=Wh71pmKqZMqVfOcArUc5iNs2KxvXrIHRA3bxErGMVlg=; b=gd2Cq5JYbquX4zNWEsVADAcuEHsI81vkXzjgfkl5pXyiRLZBpoBFTj0wAhLTPiAq25 exCHQJdxzWM6HfBj6N5txV0UTaI0USnFWjIX9gbOJiqbhgH7vhSVBDFQy7yqy6yV1htE fvYYbKQENm1r0+uy+nBB2T0EWejj8pJR8lor8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=teRymoqGnKk1vd1sXsdSA9nOrsKv29IxOl6q5f0qSdag9P0VrRj1safzQvkRmqrX7X Gq5Hqykr6/fWLC5rNH4bf5jwDJexfsC7872lo9qjXzDGea/zkQdsjCBzqXtkY7MvHoYR j2mR0x3B/wSzTqMM3zgOnSann7LGNQV7DBwVA= MIME-Version: 1.0 Received: by 10.229.127.144 with SMTP id g16mr5255641qcs.152.1304250743613; Sun, 01 May 2011 04:52:23 -0700 (PDT) Received: by 10.229.188.194 with HTTP; Sun, 1 May 2011 04:52:23 -0700 (PDT) In-Reply-To: References: Date: Sun, 1 May 2011 12:52:23 +0100 Message-ID: Subject: Re: maven-bundle-plugin and .impl and .internal packages From: Stuart McCulloch To: users@felix.apache.org Content-Type: multipart/alternative; boundary=000e0cd5bbea456ab104a2358ae8 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd5bbea456ab104a2358ae8 Content-Type: text/plain; charset=ISO-8859-1 On 30 April 2011 23:47, Yuri de Wit wrote: > I have been going in circles trying to figure out why certain packages > weren't being exported until I noticed, after taking a look at the > sources, that the maven-bundle-plugin seems to be skipping .impl and > .internal packages. That's correct - if you don't define any Export-Package then it defaults to the local non-internal / non-impl packages, as described in the "Default Behavior" section: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html After I renamed my package to something else it > worked as expected. > > Is this restriction imposed by the OSGi specs? Although in theory > .impl means an internal package it is not always the case. Renaming > the package is an option, but seems a bit invasive (specially without > knowing a good reason for it to be the way it is). Last, is there a > simple work around for this beyond renaming the package? > There is nothing in the specs that restrict implementation packages from being exported, the bundleplugin defaults are based on user feedback and current best-practice. But they are only defaults - if you want to export internal packages then you can do so by explicitly setting Export-Package (or _exportcontents if you're exporting packages from embedded JARs, see the above link and FAQ for more details). Though ideally you wouldn't want to export implementation packages, since one benefit of modularity is that you can hide away internal / implementation details and instead communicate via interfaces and services. That way you get loose coupling, and substitutable bundles. > -- yuri > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org > For additional commands, e-mail: users-help@felix.apache.org > -- Cheers, Stuart --000e0cd5bbea456ab104a2358ae8--