From dev-return-93308-archive-asf-public=cust-asf.ponee.io@sling.apache.org Wed Nov 7 16:37:06 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 7805A180649 for ; Wed, 7 Nov 2018 16:37:05 +0100 (CET) Received: (qmail 14847 invoked by uid 500); 7 Nov 2018 15:37:04 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 14836 invoked by uid 99); 7 Nov 2018 15:37:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2018 15:37:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 031CCCD816 for ; Wed, 7 Nov 2018 15:37:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 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, 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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id FuL5blz1byQ5 for ; Wed, 7 Nov 2018 15:37: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 C163A621E0 for ; Wed, 7 Nov 2018 15:37: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 0495FE2618 for ; Wed, 7 Nov 2018 15:37:01 +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 60648266AE for ; Wed, 7 Nov 2018 15:37:00 +0000 (UTC) Date: Wed, 7 Nov 2018 15:37:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@sling.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SLING-8078) New Analyser task which is able to detect Export-Package dependencies between regions 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/SLING-8078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16678397#comment-16678397 ] ASF GitHub Bot commented on SLING-8078: --------------------------------------- simonetripodi edited a comment on issue #16: SLING-8078 - New Analyser task which is able to detect Export-Package dependencies between regions URL: https://github.com/apache/sling-slingfeature-maven-plugin/pull/16#issuecomment-436665191 Just to give you more background, Given a generic Feature File where `api-regions` names are arbitrary: ```{ "id":"org.apache.sling:slingfeature-maven-plugin-test:1.0.0-SNAPSHOT", "bundles":[ { "id":"org.apache.aries.versioning:org.apache.aries.versioning.checker:0.3.1", "start-level":"20" } ], "api-regions:JSON|false": [ { "name": "my-global", "exports": [ "org.apache.aries.versioning.check" ] }, { "name": "my-deprecated", "exports": [ "org.objectweb.asm" ] } ] }``` the plugin can be now configured in order to handle that two regions: ``` **/*.json api-regions-dependencies my-global my-deprecated ``` and produces expected error: ```[ERROR] Bundle 'org.apache.aries.versioning:org.apache.aries.versioning.checker:0.3.1' (defined in feature 'org.apache.sling:slingfeature-maven-plugin-test:1.0.0-SNAPSHOT') declares 'org.apache.aries.versioning.check' in the 'Export-Package' header, enlisted in the 'my-global' region, which requires 'org.objectweb.asm' package that is in the 'my-deprecated' region``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > New Analyser task which is able to detect Export-Package dependencies between regions > ------------------------------------------------------------------------------------- > > Key: SLING-8078 > URL: https://issues.apache.org/jira/browse/SLING-8078 > Project: Sling > Issue Type: New Feature > Components: Feature Model, Maven Plugins and Archetypes > Affects Versions: Feature Model Analyser 0.2.0 > Reporter: Simone Tripodi > Assignee: David Bosschaert > Priority: Major > Fix For: Feature Model Analyser 0.2.2 > > > It may be helpful users have the need to define a {{deprecated}} region in order to mark which APIs don't have to be exposed to end users, a new Analyser Task implementation will help to detect if {{global}} exported APIs don't have {{uses}} dependencies to APIs that are declared in the {{deprecated}} region. > i.e. given a feature: > {noformat} > ... > [ > { > "name": "global" > "exports": ["org.osgi.util.function"] > }, > { > "name": "deprecated", > "exports": ["org.objectweb.asm"] > } > ] > ... > {noformat} > and a bundle declares the OSGi header in the Manifest as below: > {noformat} > Export-Package: org.osgi.util.function;uses:="org.objectweb.asm" > {noformat} > the new Analyser Task implementation will detect that "violation" > {noformat} > Bundle 'org.osgi:org.osgi.util.function:1.0.0', defined in feature 'org.apache.sling.testing:org.apache.sling.testing.apiregions:1.0.0', declares 'org.osgi.util.function' in the 'Export-Package' header which requires 'org.objectweb.asm' package that is in the 'deprecated' region > {noformat} > PR is coming -- This message was sent by Atlassian JIRA (v7.6.3#76005)