From issues-return-39351-archive-asf-public=cust-asf.ponee.io@karaf.apache.org Tue Apr 10 10:48:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 02BEC18067B for ; Tue, 10 Apr 2018 10:48:04 +0200 (CEST) Received: (qmail 19052 invoked by uid 500); 10 Apr 2018 08:48:03 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 19032 invoked by uid 99); 10 Apr 2018 08:48:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2018 08:48:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6C324C0148 for ; Tue, 10 Apr 2018 08:48:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 5I__fnqdP_xJ for ; Tue, 10 Apr 2018 08:48:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 50C0C5F47B for ; Tue, 10 Apr 2018 08:48:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 81672E0B6E for ; Tue, 10 Apr 2018 08:48:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2940B240C6 for ; Tue, 10 Apr 2018 08:48:00 +0000 (UTC) Date: Tue, 10 Apr 2018 08:48:00 +0000 (UTC) From: "Grzegorz Grzybek (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KARAF-5376) Processor mechanism for feature definitions (a.k.a. "better overrides") 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/KARAF-5376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431939#comment-16431939 ] Grzegorz Grzybek commented on KARAF-5376: ----------------------------------------- Here's a quick description (I really plan to provide exhaustive documentation) of the changed mechanism. Fundamentally, Karaf's Feature Service has been extended (in features model and in provisioning/resolution parts): * feature, bundle and repository JAXB classes contain "blacklisted" flags and (in case of bundles) and "original URI" for the purposes of overriding (which is much more than we had with {{etc/overrides.properties}} * features service, after reading features model from e.g., {{mvn:org.apache.cxf.karaf/apache-cxf/3.1.11/xml/features}} *processes it* using instructions contained in {{etc/org.apache.karaf.features.xml}} * {{etc/org.apache.karaf.features.xml}} may contain instructions to: ** blacklist repositories, features and bundles (by _pattern_) ** override bundles (both within the same groupId/artifactId and entirely different - for example you can tell features service this: {code:xml} {code} ** override even entire feature definitions! so if you see some no-longer maintained feature file (like jclouds) contains some bundle you don't want, you can override entire feature definition. I did it for example with broken hibernate-validator feature (https://hibernate.atlassian.net/browse/HV-1429): {code:xml} hibernate-validator wrap:mvn:com.thoughtworks.paranamer/paranamer/${version.com.thoughtworks.paranamer} {code} (original uses {{wrap:mvn:com.thoughtworks.paranamer:paranamer:}} instead of {{wrap:mvn:com.thoughtworks.paranamer/paranamer/}} * {{etc/org.apache.karaf.features.xml}} may be provided by you in the KAR that's foundation of your custom distro or may be generated from {{}}, {{}} and {{}} configuration options of {{karaf-maven-plugin}}. * Additionall, in Karaf 4.2.0 features may be blacklisted with glob patterns (KARAF-5273), {{mvn:}} based bundle and repository URIs may be blacklisted using version ranges and non {{mvn:}} bundle and repository URIs may be blacklisted using globs. > Processor mechanism for feature definitions (a.k.a. "better overrides") > ----------------------------------------------------------------------- > > Key: KARAF-5376 > URL: https://issues.apache.org/jira/browse/KARAF-5376 > Project: Karaf > Issue Type: Proposal > Components: karaf-feature > Reporter: Grzegorz Grzybek > Assignee: Grzegorz Grzybek > Priority: Major > Fix For: 4.2.0.M2 > > > It'd be good to have a mechanism that could transform/enhance/process feature definitions after reading them from original feature XML descriptors and before passing them to Karaf features deployer. > Current overrides mechanism could be generalized beyond simple version change for {{/}} URIs. -- This message was sent by Atlassian JIRA (v7.6.3#76005)