Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E5EF6200D2E for ; Tue, 31 Oct 2017 10:22:24 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E47B51609EC; Tue, 31 Oct 2017 09:22:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0FAA01609EB for ; Tue, 31 Oct 2017 10:22:23 +0100 (CET) Received: (qmail 29585 invoked by uid 500); 31 Oct 2017 09:22:23 -0000 Mailing-List: contact dev-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 dev@karaf.apache.org Received: (qmail 29573 invoked by uid 99); 31 Oct 2017 09:22:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Oct 2017 09:22:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 16D4F183D10 for ; Tue, 31 Oct 2017 09:22:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id FFPG3Umf2EMC for ; Tue, 31 Oct 2017 09:22:19 +0000 (UTC) Received: from mail-qk0-f173.google.com (mail-qk0-f173.google.com [209.85.220.173]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 729375FD38 for ; Tue, 31 Oct 2017 09:22:19 +0000 (UTC) Received: by mail-qk0-f173.google.com with SMTP id d67so19544302qkg.5 for ; Tue, 31 Oct 2017 02:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=FT0cCulwc/uavoqb0EFIZ7xow4EEeg0bMfjKjCp2mEY=; b=hV6ZsL4MwLBzghfBILwTY+fr1sqdGYF/WUznlsdOTbmfXPfva3ZlJFM8xGPeQQY1Jz E6lZBhfmpywuBhxIX9cxJsh6oA9CmdJw7tGn09Q0TET+qbs3CQel3z0jYjOtkppJifIZ KjGHGPLjKleU86X6ABF9mZZBcQOXIzBX0FrHqG9jqDSQn1zL2aWaAXxKrn5PFNeKu+1G PNQgEWFC9to1/uSKC8UK7HE9/wqymjJ5F/DtamgZcvNTaXVrLvoir8D8jHu9HJ5pqC0m dUsUfFrXLuU3ij+2VV7aK0XLCS5cNSIC7Py9J7/5bTjmP9UcnqkKN3LTUxPk6Bsh/UFC zcrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=FT0cCulwc/uavoqb0EFIZ7xow4EEeg0bMfjKjCp2mEY=; b=jIvrwffiDbDFb8VxXd+bgs04W3dnRrC5rhIz99ILV78lYEEP6e0tO/+0vh92Q9SMkb Jj/IM+KweocKT09FZfnEKHrniZRYsNGZ5sGA+KoDBHBUhodDZ0+TNs4I8ezCMd7iFz9N JvCXSkJyirRY2DlURg4sjRjPX5cVmO6HxTiN4Y4sc7D9bpxilhGgUyu9Qe1TAkKYpTRr MvVmacp5/NO6JNe+X1BmH5D/awS43nkTkTv1SWze0Z8vKJ0Y/XiZE1Ffl5C6YijEvA3r GGLwS80+GDeg66J3axphJgbg4IHkC0iOhBfPXgfY6CsANBs4TU/RTFnOLFQP8pjzrbnj CIbA== X-Gm-Message-State: AJaThX4J7m33vy28n+Th2/G6pkSoRsHu+UTZESNms73BzjRd/C+4kYwQ eOTFh6DtCeX3ex4QF0t/t6wV6YJ6Zg4mkX1fMSzvCQ== X-Google-Smtp-Source: ABhQp+StbFslpMd3hbJGeZN3xIqzuGJVBBsMKLVYvlxY7qm9asBvwzsWf+0IU1s3NRsMF9jNlhJkA5+O4YlAn6TcO7g= X-Received: by 10.55.156.141 with SMTP id f135mr1646505qke.309.1509441738837; Tue, 31 Oct 2017 02:22:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.28.137 with HTTP; Tue, 31 Oct 2017 02:21:58 -0700 (PDT) In-Reply-To: References: From: Grzegorz Grzybek Date: Tue, 31 Oct 2017 10:21:58 +0100 Message-ID: Subject: Re: Integrating "overrides" and "blacklisting" for repositories, features and bundles To: dev@karaf.apache.org Content-Type: multipart/alternative; boundary="94eb2c0749bea713ba055cd44ade" archived-at: Tue, 31 Oct 2017 09:22:25 -0000 --94eb2c0749bea713ba055cd44ade Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Continuing the thread, here's draft XML configuration file for feature overriding/altering/blacklisting. This file could be generated by karaf-maven-plugin and could be used in addition to/instead of etc/overrides.properties and/or etc/blacklisted.properties: mvn:org.hibernate/hibernate-validator-osgi-karaf-features/5.*/x= ml/features *jetty* mvn:commons-logging/* pax-jsf-support mvn:org.ops4j.pax.web/pax-web-resources-extender/6.0.7<= /bundle> mvn:org.ops4j.pax.web/pax-web-resources-jsf/6.0.7 What do you think? regards Grzegorz Grzybek 2017-10-30 15:08 GMT+01:00 Grzegorz Grzybek : > Hello > > Continuing my investigation of Processor mechanism for feature definition= s > (a.k.a. "better overrides")[1], I want to give you insight to what I plan > to change in Karaf's FeatureService. > > Currently we have two separate mechanisms: > > "blacklisting": > - may remove bundles from feature at features XML load time > - may remove features from repository at features XML load time > - may skip adding/analyzing features XML at karaf-maven-plugin:assembly > invocation time > - doesn't prevent given features XML to be added later > - clears runtime information about blacklisted features/bundles - we > can't query for blacklisted features or see (in `feature:list`) which > features were blacklisted > > "overrides": > - may replace G:A:V of some bundle with another G:A:V2 when downloading > bundles of a feature > - doesn't allow to change G:A:V into different G2:A2:V2 (e.g., > "mvn:org.eclipse.jetty.orbit/javax.servlet/3.0.0.v201112011016" =E2=86=92 > "mvn:org.apache.geronimo.specs/geronimo-servlet_3.0_spec/1.0") > - doesn't allow to change "dependency" flag on given bundle > - doesn't allow to add bundles to a feature (assuming we "know better" > than original feature's author - but it's a problem more often than we'd > want) > > What I'm working on (till you tell me we don't need it), is better > separation of concerns. I assume that feature XML files are loaded in one > place (JAXB) and then may be further processed (which involves > blacklisting, overriding and altering of entire features) before they're > actually used by FeaturesService. > > Currently org.apache.karaf.features.internal.service.RepositoryCache > class holds JAXB model and uses org.apache.karaf.features.internal.servic= e.Blacklist > class to alter (to some degree) it. > I want to integrate "Blacklist" class into more generic > org.apache.karaf.features.internal.service.FeaturesProcessor interface. > > Repository, Feature and BundleInfo classes will have "isBlacklisted()" > method for diagnostic purposes. Blacklisted items are not simply removed, > but can't be used to alter runtime (State). > > I want to be as much consistent between FeaturesService (dynamic aspect) > and karaf-maven-plugin:assembly (static aspect) as possible. Maven goal's > configuration will be used to generate special (new?) file in etc/ of the > distro and then used at runtime. > > As the area I'm playing with is very fragile, it's slower (than I want) > process. I'll continue my work, but I welcome any comments if I attempt > something silly. > > regards > Grzegorz Grzybek > =3D=3D=3D > [1]: https://issues.apache.org/jira/browse/KARAF-5376 > --94eb2c0749bea713ba055cd44ade--