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 BDCEC200B42 for ; Sun, 10 Jul 2016 18:29:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BC6D1160A66; Sun, 10 Jul 2016 16:29:12 +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 0FBB5160A58 for ; Sun, 10 Jul 2016 18:29:11 +0200 (CEST) Received: (qmail 63322 invoked by uid 500); 10 Jul 2016 16:29:11 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 63311 invoked by uid 99); 10 Jul 2016 16:29:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jul 2016 16:29:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EDE5C2C02A5 for ; Sun, 10 Jul 2016 16:29:10 +0000 (UTC) Date: Sun, 10 Jul 2016 16:29:10 +0000 (UTC) From: "Christian Schulte (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MNG-6056) Implement Feature Toggle Module to handle Feature Toggles MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 10 Jul 2016 16:29:12 -0000 [ https://issues.apache.org/jira/browse/MNG-6056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369833#comment-15369833 ] Christian Schulte commented on MNG-6056: ---------------------------------------- Exactly. Allow users to choose a different implementation than what is the default. And those defaults may change in a new major version. We are already doing it in Maven 3. Ship the most recent default and allow for manual downgrade. {code} -llr,--legacy-local-repository Use Maven 2 Legacy Local Repository behaviour, ie no use of _remote.repositories. Can also be activated by using -Dmaven.legacyLocalRepo=true {code} > Implement Feature Toggle Module to handle Feature Toggles > --------------------------------------------------------- > > Key: MNG-6056 > URL: https://issues.apache.org/jira/browse/MNG-6056 > Project: Maven > Issue Type: Task > Affects Versions: 3.4.0 > Reporter: Karl Heinz Marbaise > Assignee: Karl Heinz Marbaise > Priority: Minor > Fix For: 3.4.0 > > Attachments: knob.jpg > > > Implement a feature toggle module to handle feature toggles in Maven. The best from my point of view at the moment is having a relationship to the JIRA which defines all kinds of bugs, issues and of course features. > Create a separate module: {{maven-feature}} to have no other dependency which means it can be integrated into any other module of maven. > Add appropriate command line option like {{--activate-features}} to activate one or more features in one go. This prevents us from changing the command line every time we add or remove a feature toggle. > So a command line option could look like this: > {code} > mvn --activate-features MNG2345,MNG1299 clean package > {code} > This will activate the features {{MNG2345}} and {{MNG1299}}. If you try to activate a feature toggle which does not exist we should simply print out a warning and just continue. This will simplify also future changes which means if 3.4.0 introduces a feature toggle {{MNG-XXXX}} but in Maven 3.5.0 this feature toggle does not exists anymore or made default calling the command line that way will only produce a warning nothing more. > It should be compile time save which means if the feature toggle will be removed the compiler should show where this features has been used or questioned if it is activated. This will simplify the removal of the dependent code. > Simplify adding of new feature toggles. > Currently the best seemed to be an enumeration which contains this information. > It should also be possible to list all available feature toggles via command line option like {{--list-features}} which should print out the existing feature toggles plus an appropriate description for the user (in particular intended for maven devs). > It should also be simple to query for a feature toggle like: > {code:java} > @Requirement > private SelectedFeatures featureToggle; > ... > if (featureToggle.isFeatureActive(Feature.MNG10000)) { > // The feature is implemented here or a different selection is done. > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)