Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3AFAD187AA for ; Wed, 28 Oct 2015 08:58:28 +0000 (UTC) Received: (qmail 49123 invoked by uid 500); 28 Oct 2015 08:58:28 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 49047 invoked by uid 500); 28 Oct 2015 08:58:28 -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 49031 invoked by uid 99); 28 Oct 2015 08:58:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2015 08:58:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BE4262C14F2 for ; Wed, 28 Oct 2015 08:58:27 +0000 (UTC) Date: Wed, 28 Oct 2015 08:58:27 +0000 (UTC) From: "Peter Kriens (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FELIX-5091) Allow to exclude system packages without redefining all exports MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-5091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14977993#comment-14977993 ] Peter Kriens commented on FELIX-5091: ------------------------------------- The format of the org.osgi.framework.system.packages.extra is standardized by the OSGi so you are creating proprietary extensions. In this particular case it is a bad idea anyway since you can run into problems with the uses constraints. I think sql packages referent to jta. Since the sql packages come from the JVM, you create a nice mess. The only proper solution Ive found is to put the correct JTA package on the same class path as where framework resides. This will then fill in the missing package from the JVM. In bndtools this is easily done by placing the jar on the -runpath -runpath: javax.transaction;version=1.1 If it has an exports they will be automatically added to the system packages. > Allow to exclude system packages without redefining all exports > --------------------------------------------------------------- > > Key: FELIX-5091 > URL: https://issues.apache.org/jira/browse/FELIX-5091 > Project: Felix > Issue Type: Improvement > Components: Framework > Affects Versions: framework-5.4.0 > Reporter: Christian Schneider > Fix For: framework-5.6.0 > > > There are several cases where the OSGi framework exports system packages by default but the result is not usable. > For example javax.transaction is exported but the package is not complete. So a regular case is to exclude this package and provide it as a bundle. > Currently this can be done by redefining org.osgi.framework.system.packages. The problem is that you then need to redefine all the system packages which is a big list and additionally differs between java versions. > So I propose to allow to exclude single packages without having to redefine them all. > One simple solution would be to use org.osgi.framework.system.packages.extra and allow to specify a package to exclude by prefixing it with "-". > E.g. > org.osgi.framework.system.packages.extra=-javax.transaction,-javax.transaction.xa > This would avoid creating another framework property. > Alternatively we could introduce a new property like: > org.osgi.framework.system.packages.exclude=javax.transaction,javax.transaction.xa > This property would then only allow to exclude exports. -- This message was sent by Atlassian JIRA (v6.3.4#6332)