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 2530F200D30 for ; Mon, 30 Oct 2017 15:09:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 23A23160BE4; Mon, 30 Oct 2017 14:09:20 +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 68D631609EF for ; Mon, 30 Oct 2017 15:09:19 +0100 (CET) Received: (qmail 67680 invoked by uid 500); 30 Oct 2017 14:09:18 -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 67667 invoked by uid 99); 30 Oct 2017 14:09:18 -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; Mon, 30 Oct 2017 14:09:18 +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 7E6E4180033 for ; Mon, 30 Oct 2017 14:09:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 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_LOW=-0.7, 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 zoPieaxBdRky for ; Mon, 30 Oct 2017 14:09:16 +0000 (UTC) Received: from mail-qt0-f182.google.com (mail-qt0-f182.google.com [209.85.216.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 01A6C5FD38 for ; Mon, 30 Oct 2017 14:09:15 +0000 (UTC) Received: by mail-qt0-f182.google.com with SMTP id z50so16489827qtj.4 for ; Mon, 30 Oct 2017 07:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Wh44VtKzt+6oSYP9V7pYMf0unm2ViuHgmguNe1Kfp9g=; b=lG9tOvGDpwHDL/+lH7X3ELphkZgmKSdKYA4M4Rrwx5GYwGmqaiT4VUA0gKKpcA/d+B uz75VHrSpLNI7M+8358La5EMaU+dMESKmD0V+YSuEGst+hV/BqT2JLfz3VCsOzeWNrWv +vNiEcdjvFUr3yx9impcIZqrKjlznAZbQkJbgSkrWtpIhKVM7IPF5gWyfhCL8qOc/2e3 3Ay8qnlqPVmDvV+f2qEf3pU1iQiLdbo4mvB8uFoixYPQY6YFT/Tftm74hdP6aIPmcvKr eyBOwmpGmhPi/waSG6Z5bcLlodr6gb205zR/6ULhbV43/y8yTtXyy5iKTGR+ZkctLLQf 5qyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Wh44VtKzt+6oSYP9V7pYMf0unm2ViuHgmguNe1Kfp9g=; b=CX/Z9fXdFnMOmodpl/8MA+VpCrhbO4PsMt3foemqQIK0Ttshn1HTSjiO/3jXawBAH3 bAFQnSXVTkzPEAZs8nFZ4sKT8SYA+lsJxO3Cc3lcEkK5wpVUIr8+RdquVvF22Zmmcbf7 A8Wa2u7/iwCis73BgTbamxz/9zfTI/vU9tkBqY5Nb8HK+DqjeySZ6yuW99B5EMl/FfwG ZFfPbD8Irx3t/F0d9ZujHgwJ2RtX3c2wgtc/0/hq+XeFdEq1zswfo1jO7GILoySWJhBz 3HUWSGvz6QUMSviMgdgi7iih5vXztZlj5nMBTEZuS4AeX5zJFSUDz6CGvSt66PCfeopW l26Q== X-Gm-Message-State: AMCzsaVAyOknFMmcO0j/c7z7Bq2/+oKSbDe3ZLCJsfYsZT4QeDfeOePl pHQ1qEWI8C/xZpVKLvBTJobqP422DLkDqZM3Ou+DtQ== X-Google-Smtp-Source: ABhQp+T75sSoQZUqeGgIEqrYo/SheiTxEUZsNR33hVQgxwxE/kz/avZrbSd1wE/VuIsbqJ4mkXqsSlc/7MS7cum80ak= X-Received: by 10.200.26.99 with SMTP id q32mr14120116qtk.222.1509372554865; Mon, 30 Oct 2017 07:09:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.28.137 with HTTP; Mon, 30 Oct 2017 07:08:54 -0700 (PDT) From: Grzegorz Grzybek Date: Mon, 30 Oct 2017 15:08:54 +0100 Message-ID: Subject: Integrating "overrides" and "blacklisting" for repositories, features and bundles To: dev@karaf.apache.org Content-Type: multipart/alternative; boundary="f403045d62fcf78b29055cc42ec5" archived-at: Mon, 30 Oct 2017 14:09:20 -0000 --f403045d62fcf78b29055cc42ec5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Continuing my investigation of Processor mechanism for feature definitions (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.service.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 --f403045d62fcf78b29055cc42ec5--